Unable to run Rational Rhapsody due to “Unable to compile” error

只谈情不闲聊 提交于 2019-12-23 03:06:25

问题


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:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/5103958/unable-to-run-rational-rhapsody-due-to-unable-to-compile-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!