kelemen / netbeans-gradle-project

This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin.
172 stars 57 forks source link

Gradle / netbeans debug session Not using Correct JDK sources #366

Open aplatypus opened 6 years ago

aplatypus commented 6 years ago

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?

  1. Java sources to use ?
  2. The actual Java run-time to use during test, run and debug tasks?
  3. How to reset these settings?
    • Since apparently the Java 7 sources are being loaded from some kind of "remembered" setting or something (one speculates).
aplatypus commented 6 years ago

A related comment. On the Project Properties page -- the "Source Level" and "Target Platform" do Not match either/both the:

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.