Java Compile & Java Run language services
Will Spoofax Core have the
compileandrunfeatures for theJavalanguage?Currently I’m invoking
javacandjavawith:(exitCode, output) := <call-read-output> ("javac", ["-cp", <dirname>$[[project-path]/[javaFileName]], javaFileName]); (exitCode, output) := <call-read-output> ("java", ["-cp", classPath, className])But with the pre-packaged Eclipse installs containing a JRE I get a Java version exception
java.lang.unsupportedclassversionerror unsupported major.minor version 52.0as the included Java is a different version (1.7?) than the one on my machine (1.8).If we would support
Submitted by Daco Harkes on 4 September 2015 at 09:55compileandrunfor Java as language features we can avoid these issues.
Issue Log
Nope, this is more of a Stratego issue. You can create a Java external strategy or primitive that runs and compiles Java code and use that instead. We can include such a primitive in Spoofax core of course :)
Where do you exactly get that error? If you compile something with JDK 8, you cannot run it with JRE 7 by default. You can pass the
-target 1.7option to javac to target JRE 7 and up.
Log in to post comments