由于“无法编译”而无法运行Rational Rhapsody错误 [英] Unable to run Rational Rhapsody due to "Unable to compile" error
问题描述
我在rhapsody中运行代码时遇到问题,我的错误信息是:
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?
推荐答案
错误是因为Rhapsody无法找到java编译器。如果要使用Rhapsody生成Java代码,则需要在安装Rhapsody之前安装JDK,而不仅仅是JRE。
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.
在安装Rhapsody之前安装了什么JDK,你在哪里告诉它所在的Rhapsody安装程序?
What JDK did you have installed before you installed Rhapsody, and where did you tell the Rhapsody installer it was located?
您的rhapsody.ini文件( C:\ Users \olle \IBM \ Rational\Rhapsody\7.5.3\rhapsody.ini
)将包含一行 JavaLocation =
。这需要匹配您的JDK目录,例如 C:\Program Files\Java\jdk1.6.0_24
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
此值也是硬编码的进入 jdkmake.bat
;如果你在文本编辑器中打开它,你可以看到这个。因此,如果在安装Rhapsody之后更新JDK ,则构建脚本不会获取新安装的java编译器的路径, javac 。
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.
将 javac 的路径放入 jdkmake.bat
第2行和第3行将解决问题。请注意,如果 javac 的路径中有空格,则需要使用8.3文件名样式。
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.
这篇关于由于“无法编译”而无法运行Rational Rhapsody错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!