1

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?

1
  • some error message related to compilation fail would be helpful Commented Feb 24, 2011 at 11:29

2 Answers 2

5

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 starting JavaLocation=. 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.

1

I got similar errors installing rational rhapsody developer and then installing stuff like MingW, Visual C++ , etc.. the easiest way for me was to do in "control Panel->Software->Rhapsody->Change -> Repair/reinstall" rhapsody after it, so all internal necessary settings were performed by rhapsody itself. hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.