Java Linux
Compiler and Builder

Required Packages
-
Download Java Development Kit (JDK) (
Linux 32-bitorLinux 64-bit)

OR
-
Download Java Runtime Environment (JRE) (
Linux 32-bitorLinux 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(.so for Linux) built in C language.
Each released DYNAMIXEL SDK have latest library files in [DynamixelSDK folder]/c/build/[linuxXX]/libdxl_xYY_c.so which should be 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
-
Click
Link Additional Source to Project
-
Click Browse

-
Select the folder
linux64inclanguage folder, then clickok
(for x86 platform, select[DynamixelSDK folder]/java/dynamixel_functions_java/linux32)
-
Click
Finish
Import DynamixelSDK library
-
Click
Link Additional Source to Project
-
Click Browse

-
Select the folder
x64injavalanguage folder, then clickok
-
Click
Finish
Import JNA
-
Go to Libraries on the screen.

-
Click
Add External JARs
-
Choose the
jna-X.Y.Z.jardownloaded previously.
-
Click
Finish
Run example
-
Make the port be able to be used
$ sudo chmod a+rw /dev/ttyUSB0
-
Put
ReadWrite.javasource into the foldersrcon the screen
-
Adjust the values surrounded with red circle to proper value as shown in the comment.

-
Click
Runin the Eclipse toolbox above. Console window will show the results


