cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 158 forks source link

Correct JDK version? #80

Closed ivmarkov closed 8 years ago

ivmarkov commented 8 years ago

See https://github.com/cincheo/jsweet-eclipse-plugin/issues/8 What is the correct JDK version to be used with jsweet?

Also, I guess the answer would be that the javax.tools API is missing something that com.sun.* has, but what is the reason of not using javax.tools.* in JSweetTranspiler?

ivmarkov commented 8 years ago

Just answered the second question myself - javax.tools.* does not expose any AST. It is basically a toy to compile .java to .class files...

renaudpawlak commented 8 years ago

JSweet only works with JDK because you need the Java compiler, and version 8 because you need the lambdas....

At some point the transpiler was raising a nice error when a JDK 8 was not found in the path. But obviously, this regressed -- it is hard to test such things :(

renaudpawlak commented 8 years ago

So, the outcome is that JSweet works with any 1.8 version. To use the Eclipse plugin, it is preferred to have JAVA_HOME properly set. This constraint should be relaxed in future versions of the plugin.