Java Windows
Compiler and Builder
Required Packages
-
Download Java Development Kit (JDK) (
Windows 32-bit
orWindows 64-bit
)OR
-
Download Java Runtime Environment (JRE) (
Windows 32-bit
orWindows 64-bit
)
Java Native Access(JNA)
-
Move folder to
[DynamixelSDK folder]/java/dynamixel_functions_java/
Function Reference
-
The function reference file is located in
[DynamixelSDK folder]/java/dynamixel_functions_java/x86 or x64/Dynamixel.java
Building and Running the Sample Code
The DYNAMIXEL SDK example code for Java uses the library files(.dll for Windows) built in C language.
Each released DYNAMIXEL SDK have latest library files in [DynamixelSDK folder]/c/build/[winXX]/output/dxl_xYY_c.dll
which were built by its own source code.
Make Java Project
-
Set workspace
-
Make new project. Click
New - Project...
-
Select
Java Project
, then clickNext
-
Type
Project Name
, then clickNext
Import function reference
-
Open
Configure Build Path
-
Click
Link Additional Source to Project
-
Click Browse
-
Select the folder
output
inc
language folder, then clickok
-
Click
Finish
Import DynamixelSDK library
-
Click
Link Additional Source to Project
-
Click Browse
-
Select the folder
x64
injava
language folder, then clickok
(for x86 platform, select[DynamixelSDK folder]/java/dynamixel_functions_java/x86
) -
Tpye
Folder name
and ClickFinish
Import JNA
-
Go to
Libraries
tap and ClickAdd External JARs
. -
Choose the
jna-X.Y.Z.jar
downloaded previously. -
Click
Apply and Close
Run example
-
Put
ReadWrite.java
source into the foldersrc
on the screen -
Adjust the values surrounded with red circle to proper value as shown in the comment.
-
Click
Run
in the Eclipse toolbox above. Console window will show the results