Alan,
If the user's project's JDK has a higher version than the JDK of JDeveloper, the compile is done out-of-process. Otherwise an in-process JSR199 is attempted. Yes, -source/-target/-Xbootclasspath (and now -release) for cross-compiling is another way, but it doesn't use the Javac of the user's project's JDK. The user can easily set up a cross-compile in JDeveloper, but some users want to use the actual Javac of their project's JDK.

Keimpe Bronkhorst
JDeveloper


On 10/8/2015 1:36 PM, Alan Bateman wrote:


On 08/10/2015 17:47, Keimpe Bronkhorst wrote:
Jon,

Users of JDeveloper want to be able to compile and run their code with
any JDK on their filesystem, not just compile and run with the JDK
JDeveloper is running on.
I'm curious about this. If JDeveloper is running on JDK 7 for example and someone configures it to use a JDK 8 then would you have attempted to load from the JDK 8 tools.jar in that case? As JDK 7 doesn't know anything about 52.0 class files then I assume not.

So maybe the loading from the target tools.jar was when the target JDK is the same or older than the version that the IDE is running? In that case I'm curious as to whether it can be made to use -source/-target/-Xbootclasspath instead of attempt to run the javac from the target JDK in the same VM. On JDK 9 then you have the wonderful new -release option to try too.

-Alan.

Reply via email to