The only discernable difference between these two programs is the Java version.
The question is: what on earth is going on?
This image is proof that both programs contain exactly the same code, while producing different results.

here is the code:
static int x = 10;
static {
x = x + 10;
}
public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
System.out.println(new Date(System.currentTimeMillis()));
System.out.println(x);
}
LEFT side is using the old netbeans distribution.
RIGHT side is using the apache netbeans IDE.
LEFT side is using jdk8 (see image)
RIGHT side is using jdk13 (see image)
Based on the comments: jdk13 is EOL ... but some people are unable to reproduce it while using jdk13.
The question is: what's causing this?
ANSWER: Underlying problem determined to exist in IDE's compilation/build/execution routine.
Reinstall and update IDE, adoption of non-EOL JDK.

Also, I did not import existing IDE settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With