From an application (marked as “Application Block”) and its contained building blocks you can automatically generate an executable project. Code that you wrote manually within the building blocks is copied into the project, the rest is generated automatically.
Note that the result is an Eclipse project, by default marked with a suffix _exe. This project is, once generated, completely independent from the Reactive Blocks SDK.
Open the «application» building block that you want to generate code for, right-click and select Build in its context menu. Further, choose Select Build Target Platform… to open a dialog displaying all platform choices, e.g., J2SE, OSGi (see the next section). If the system was build before and you made changes to it, you will also see an option to rebuild the system for a specific target platform.
Another way to generate executable code is from the context menu of an application block listed in the Block view. You will find the same build menu as above.
You need to be online and signed in in order to implement a system. If you haven’t done so, you will be prompt to login.
Thereafter, a dialog will ask which code generator to be used to realize the application.
In the next dialog you can choose the logging framework and level you want to use and also change the project name of the generated system. Libraries that are used in the building block can be copied as jar-files or extracted so that you get also Java codes in the generated system.
An executable project is generated automatically. You can find it highlighted in the Java Package Explorer. This highlight will disappear after some time.
You can run the generated project by choosing Run As from the context menu of the *.launch file inside the project. Then, choose the first option as shown below.
The code generator deletes the previously generated project. If your are executing an application, it may be that jar files are locked by the JVM and deleting these projects fails if you generate them again.
The generated project is a pure Java project, independent of Reactive Blocks, so you can in principle treat it like any other Java project.
Check the classpath of the project.
If you observe the exception
java.lang.UnsupportedClassVersionError: ..., the compiler compliance level for the executable project is probably higher than the JRE your eclipse is using. There are several ways to solve this. One of them is to change the JRE used in the project. Open the Build Path configuration as described above. Open tab Libraries and edit the JRE System Library entry, choose a later version. Alternatively, you can change the default JRE for your entire workbench as described in this guide.