Rascal:在 Windows 命令行上找不到 JDK
Rascal: Doesn't Find JDK on Windows commandline
我正在尝试 运行 Rascal on Windows 从命令行,使用 webpage 上给出的命令,但我得到这个异常:
$ java -Xmx1G -Xss32m -jar rascal-0.18.2.jar
Version: 0.18.2
INFO: detected |lib://rascal| at |jar+file:///D:/workspace/mach/delphi2java/lib/rascal-0.18.2.jar!/|
unexpected error: Unexpected error in Rascal interpreter: Could not find an installed System Java Compiler, please provide a Java Runtime that includes the Java Development Tools (JDK 1.6 or higher).
org.rascalmpl.interpreter.asserts.ImplementationError: Unexpected error in Rascal interpreter: Could not find an installed System Java Compiler, please provide a Java Runtime that includes the Java Development Tools (JDK 1.6 or higher).
at org.rascalmpl.interpreter.utils.JavaBridge.<init>(JavaBridge.java:92)
at org.rascalmpl.interpreter.Evaluator.<init>(Evaluator.java:215)
at org.rascalmpl.interpreter.Evaluator.<init>(Evaluator.java:202)
at org.rascalmpl.shell.ShellEvaluatorFactory.getDefaultEvaluator(ShellEvaluatorFactory.java:33)
at org.rascalmpl.shell.REPLRunner.constructEvaluator(REPLRunner.java:45)
at org.rascalmpl.repl.RascalInterpreterREPL.initialize(RascalInterpreterREPL.java:85)
at org.rascalmpl.repl.BaseREPL.initialize(BaseREPL.java:153)
at org.rascalmpl.repl.BaseREPL.<init>(BaseREPL.java:108)
at org.rascalmpl.repl.BaseREPL.<init>(BaseREPL.java:62)
at org.rascalmpl.shell.REPLRunner.<init>(REPLRunner.java:34)
at org.rascalmpl.shell.RascalShell.main(RascalShell.java:91)
javac
在我的 PATH 中,我已将 JAVA_HOME 设置为 JDK 的根目录。我错过了什么?
问题是我的机器上同时有 JRE 和 JDK,java
命令首先在 JRE 中找到。我需要使用 JDK 中的 java
二进制文件调用 Rascal,例如在我的例子中明确调用
"c:\Program Files\Java\jdk8\bin\java" -Xmx1G -Xss32m -jar rascal-0.18.2.jar
正确设置 JAVA_HOME
并在路径中设置 javac
是不够的。
我正在尝试 运行 Rascal on Windows 从命令行,使用 webpage 上给出的命令,但我得到这个异常:
$ java -Xmx1G -Xss32m -jar rascal-0.18.2.jar
Version: 0.18.2
INFO: detected |lib://rascal| at |jar+file:///D:/workspace/mach/delphi2java/lib/rascal-0.18.2.jar!/|
unexpected error: Unexpected error in Rascal interpreter: Could not find an installed System Java Compiler, please provide a Java Runtime that includes the Java Development Tools (JDK 1.6 or higher).
org.rascalmpl.interpreter.asserts.ImplementationError: Unexpected error in Rascal interpreter: Could not find an installed System Java Compiler, please provide a Java Runtime that includes the Java Development Tools (JDK 1.6 or higher).
at org.rascalmpl.interpreter.utils.JavaBridge.<init>(JavaBridge.java:92)
at org.rascalmpl.interpreter.Evaluator.<init>(Evaluator.java:215)
at org.rascalmpl.interpreter.Evaluator.<init>(Evaluator.java:202)
at org.rascalmpl.shell.ShellEvaluatorFactory.getDefaultEvaluator(ShellEvaluatorFactory.java:33)
at org.rascalmpl.shell.REPLRunner.constructEvaluator(REPLRunner.java:45)
at org.rascalmpl.repl.RascalInterpreterREPL.initialize(RascalInterpreterREPL.java:85)
at org.rascalmpl.repl.BaseREPL.initialize(BaseREPL.java:153)
at org.rascalmpl.repl.BaseREPL.<init>(BaseREPL.java:108)
at org.rascalmpl.repl.BaseREPL.<init>(BaseREPL.java:62)
at org.rascalmpl.shell.REPLRunner.<init>(REPLRunner.java:34)
at org.rascalmpl.shell.RascalShell.main(RascalShell.java:91)
javac
在我的 PATH 中,我已将 JAVA_HOME 设置为 JDK 的根目录。我错过了什么?
问题是我的机器上同时有 JRE 和 JDK,java
命令首先在 JRE 中找到。我需要使用 JDK 中的 java
二进制文件调用 Rascal,例如在我的例子中明确调用
"c:\Program Files\Java\jdk8\bin\java" -Xmx1G -Xss32m -jar rascal-0.18.2.jar
正确设置 JAVA_HOME
并在路径中设置 javac
是不够的。