|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| [[Category:Language]]{{NoTitle}} | | #REDIRECT [[Language - Java]] |
| {|
| |
| |style="vertical-align:middle; width: 60%;"|
| |
| <font size=6>'''Language - Java'''
| |
| | |
| '''Windows with NetBeans'''</font>
| |
| | |
| Welcome to using Phidgets with Java! By using Java, you will have access to the complete Phidget22 API, including events.
| |
| | |
| NetBeans is an IDE used to write, compile, and run Java applications.
| |
| |{{TOC limit|2}}
| |
| |}
| |
| | |
| {{Language_-_Java_Intro|Windows|NetBeans}}
| |
| | |
| {{Finding Code Samples|Java}}
| |
| | |
| ==Setting up a New Project==
| |
| When you are building a project from scratch, or adding Phidget functionality to an existing project, you'll need to configure your development environment to properly link the Phidget Java library.
| |
| | |
| To start, open NetBeans and create a new project. Select ''Java Application'' then click ''Next >'':
| |
| [[Image:Java_netbeans_newproject.PNG|link=|center]]
| |
| | |
| | |
| Give your project a name and finish creating the project:
| |
| [[Image:Java_netbeans_nameproject.PNG|link= |center]]
| |
| | |
| | |
| Next, add a reference to phidget22.jar by right-clicking on the libraries folder:
| |
| [[Image:Java_netbeans_addjar_v3.png|link= |center]]
| |
| | |
| | |
| You can find phidget22.jar at the following location:
| |
| *C:\Program Files\Phidgets\Phidget22\phidget22.jar
| |
| | |
| | |
| [[Image:Java_netbeans_jarpath.png|link=|center]]
| |
| | |
| | |
| Your project now has access to Phidgets!
| |
| | |
| ==Using the Code Samples==
| |
| Now that you have configured a project to use Phidgets, you can copy the code sample from the [{{server}}/?view=code_samples&lang=Java Code Samples] page into your project. Be sure to change the name of the top class to match the name of the file in your project.
| |
| | |
| {{Language Page What's Next}}
| |