I will explain how to build in Java.
(G)Preparation
It is necessary to install Java Development Kit 6 in advance. (Note: It will not work with Java 1.5 (5.0).)
(G)Build procedure from RTC Builder
- RTC Profile Editor screen, open the [Language/Environment] tab and select [Java].
- Open the [Basic tab] and click the [Generate Code] button to generate the code.
- If the development environment plug-in of the code generation target language is installed, the following confirmation message will be displayed Click [Yes]. Then select [Java (default)] in the dialog displayed and click the [OK] button.
For the Java language, JDT (Java Development Tools) is included in Eclipse in advance.
- The information of the project is displayed in the package explorer, but since it is not displayed at all, select [File] > [Update] from the menu or click the [F5] key in the package explorer to display information Updating.
- Right-click the file of [build_ module name.xml] and select [Run] > [1 Ant Build].
- The build is executed and the build result is displayed on the console screen.
(G)Build procedure from the command prompt
- Download Apache Ant from the following site. Apache Ant is a software for running builds. Eclipse has built-in Ant plug-in as standard, but you need to download it in order to run build from the command prompt.
Download:the Apache Ant Website
- Unzip the Zip file and change the folder name as desired. (Eg: apache-ant-x.xx.x → ant)
- Move to any folder. (Ex:C:\Program Files\ant)
- Set environment variables. (The screen is for Windows 10)
- Open the Properties window of the system and click the [Environment Variables] button.
- Click "New" button in "System environment variable".
- Enter "ANT_HOME" in the variable name, "C:\Program Files\ant" in the variable value, and click the [OK] button. * The variable value specifies the path of the ant folder.
- From the "System environment variable" list, select the variable name "Path" and click the "Edit" button.
- Click the [New] button, enter "%ANT_HOME%\bin" and click the [OK] button.
- Set JAVA_HOME. It is unnecessary if already set.
Click "New" button in "System environment variable".
- Enter "JAVA_HOME" for the variable name and "C:\Program Files\Java\jdkx.x.x.x.x_xxx" for the variable value and click the [OK] button.
The variable value specifies the path of the Java installation destination folder.
- Return to the system property screen and click the [OK] button to close the screen.
- Reboot the PC.
- Reboot, start the command prompt and enter "ant -version" to check the version of Apache Ant.
Similarly, type "java-version" and check the Java version.
- Build from the command prompt.
When you enter the following command in the folder of the specified RTC project, the build will start. ant -f build_*****.xml (***** is the module name)
If build succeeds, the following display will be displayed.