Closed ivmarkov closed 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...
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 :(
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.
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?