netbeans-gradle-project
netbeans-gradle-project copied to clipboard
Gradle / netbeans debug session Not using Correct JDK sources
Our Gradle build has
sourceCompatibility = '1.8' targetCompatibility = '1.8'
And the normal debug session loads/runs the current Java 8 JVM. However the Java Library source files are Always relate to the latest JAVA 7 JDK sources. This is not helpful when the actual runtime is Java 8.
On a related configuration. Setting the same project with sourceCompatibility = '1.7' targetCompatibility = '1.7'
Still runs Java 8 runtime and still uses the Java 7 JDK sources; which is still a problme since the rt.jar in use will (naturally) be the Java 8 runtime.
This makes tracking any code that needs to enter libraries almost impossible.
How do we specify the following in the gradle project?
- Java sources to use ?
- The actual Java run-time to use during test, run and debug tasks?
- How to reset these settings?
- Since apparently the Java 7 sources are being loaded from some kind of "remembered" setting or something (one speculates).
A related comment. On the Project Properties page -- the "Source Level" and "Target Platform" do Not match either/both the:
- Current "Platform preference" setting
- Project's build.gradle: targetCompatibility and sourceCompatibility settings.
In fact, after several attempts to change the "Platform preference" from the "Project Properties" panel; I've concluded that panel is Not Working as I'd expect it to. If the "Platform preference" allows me to make changes and is not greyed-out, it ought to update the settings.