I have problems with running the code in rhapsody and my error message is: "
Building ------------ MainDefaultComponent.class ------------
Executing: "C:\Users\olle\IBM\Rational\Rhapsody\7.5.3\Share\etc\jdkmake.bat" DefaultComponent.bat build
Unable to compile
Build Done
"
Do anybody know how to make my program to successfully compile?
The error is because Rhapsody can't find a java compiler. If you want to generate Java code using Rhapsody you need a JDK installed before you install Rhapsody, not just the JRE.
What JDK did you have installed before you installed Rhapsody, and where did you tell the Rhapsody installer it was located?
Your rhapsody.ini file (
C:\Users\olle\IBM\Rational\Rhapsody\7.5.3\rhapsody.ini
)will contain a line startingJavaLocation=
. This needs to match your JDK directory, e.g.C:\Program Files\Java\jdk1.6.0_24
This value is also hard-coded into
jdkmake.bat
; you can see this if you open it up in a text editor. So if you update your JDK after installing Rhapsody the build script doesn't pick up the path to the newly installed java compiler, javac.Putting the path to your javac into
jdkmake.bat
lines 2 and 3 will fix the issue. Note that you'll need to use 8.3 filename style if there are spaces in the path to your javac.