On this image you will have two pictures of the same file. The first one is from netbeans and the second one is from notepad++. After using multiplay different text editors I realized that netbeans didn't update my file properly. Despite telling me it's saved.
This bug also effects git synchronization, it will push the old version to github and not the one that I just updated.
Anyone that knowns how to fix the bug? And how to prevent this in the future?
For the record this is my netbeans version and pc version:
Product Version: NetBeans IDE 8.2 (Build 201705191307)
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2
Java: 1.8.0_144; Java HotSpot(TM) 64-Bit Server VM 25.144-b01
Runtime: Java(TM) SE Runtime Environment 1.8.0_144-b01
System: Windows 10 version 10.0 running on amd64; Cp1252; nl_BE (nb)
I am trying to start NetBeans 8.2 on a Macbook Pro and it's not working.
It shows the splash screen, then after a while it shuts down without starting anything.
Running from the command-line I can see this error:
Oct 02, 2017 7:40:28 PM org.netbeans.ProxyURLStreamHandlerFactory register
SEVERE: No way to find original stream handler for jar protocol
java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.net.URLStreamHandler java.net.URL.handler accessible: module java.base does not "opens java.net" to unnamed module #7823a2f9
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:175)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:169)
at org.netbeans.ProxyURLStreamHandlerFactory.register(ProxyURLStreamHandlerFactory.java:82)
at org.netbeans.JarClassLoader.<clinit>(JarClassLoader.java:141)
at org.netbeans.MainImpl.execute(MainImpl.java:178)
at org.netbeans.MainImpl.main(MainImpl.java:85)
at org.netbeans.Main.main(Main.java:83)
Looks like Java 9 got bundled with it and it's causing an error. The documentation implies that NetBeans 8.2 uses JDK 8!?
How to use my own java to run NetBeans, or how to get NetBeans to start without this error?
Yes, NetBeans 8.2 does use JDK 1.8, and specifically does not support JDK 1.9.
It's unclear from the OP which version of Java is desired to run with NetBeans, but the version of NetBeans to use is governed by the version of Java to be used:
[1] For Java 8, use Netbeans 8.2. Note that Java 9 is not supported. You can download NetBeans 8.2 bundled with JDK 8u141 for Mac OS here:
http://www.oracle.com/technetwork/articles/javase/jdk-netbeans-jsp-142931.html
Once it has been installed it no specific configuration for Java should be necessary.
[2] For Java 9 you must use a Development Build of NetBeans. That can be downloaded from http://bits.netbeans.org/download/trunk/nightly/latest/ but be sure that Mac OS X is selected from the Platform drop list before clicking Download.
For any version of NetBeans you can specify your own version of Java as follows:
Start NetBeans and select Java Platforms from the Tools menu.
Click the Add Platform... button.
Complete the wizard to locate the version of Java you want to use.
One final point: there is no problem having multiple versions of NetBeans installed and running concurrently using different JDKs, typically NetBeans 8.2 with JDK 1.8 and NetBeans Dev Build with JDK 1.9.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update:
If NetBeans closes itself down on startup it may have an invalid JDK path. To change the JDK that NetBeans uses:
Locate the file netbeans.conf. It should be in the etc directory under the NetBeans installation directory.
Edit that file in a text editor. Locate the line containing the property netbeans_jdkhome. On my Windows 10 installation it looks like this:
netbeans_jdkhome="C:\Java\jdk1.8.0_121"
Change the value for that property to specify the path to the desired JDK, save the file and restart NetBeans.
As pointed in the comments:
I had tried to set netbeans_jdkhome in /Applications/NetBeans/NetBeans\ 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf to point to JDK 10, but still it did not work.
I had to install JDK 8, and set netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home"
Uninstalling JDK 10 and using JDK 8 worked for me and setting netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home" worked quite well.
macOS 10.13.5
JavaJDK 10 installed as "System" JVM
I was able to install NetBeans, but unable to get it to function. Window would open, clicking on "New Project" or "New File" did absolutely nothing.
Was able to get it working (all modules and servers) by going into the configuration file at
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
and editing the commented out path to JDK at the bottom of the file!
Cheers!
Check Java JDK is installed on Mac, NetBeans 8.2 does use JDK 1.8(Java SE 8)
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
12.0.1, x86_64: "Java SE 12.0.1" /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home
1.8.0_211, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
if not , just install (no need remove exist JDK)
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
modify /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home"
For NetBeans 8.2 JDK 1.8 should be used. If you installed JDK 1.9 or JDK 10.0 to your MacBook, you must uninstall that from your computer.
I had the same issue. I'm using Apache Netbeans 12.0 so I had to change my OpenJDK version from 19.0 to 14.0 and update the path in order to finally work.
No need to uninstall the 19.0, just install the version that works with the Apache that you have and update the path:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk14.0.jdk/Contents/Home"
I have a fresh installation of Eclipse IDE for Java EE Developers - for WIndows 64bit - Version: Neon.2 Release (4.6.2)
I have downloaded the newest editions of GlassFish server 4.1.1 - both Full & Web Profie
I've installed the latest GlassFish tolls using Eclipse Marketplace:
https://marketplace.eclipse.org/content/glassfish-tools
Now I am trying to add GlassFish Server to Eclipse using the latest JDK 8, but it complains that Java 6 or 7 is required:
OK, then I am trying to use the latest JDK 7 instead of 8, but this time it complains that this is an invalid GlassFish instalation.
How can I add GlassFish server to Eclipse, what am I doing wrong ?
After lots of trials and errors I finally managed this issue.
A glassfish subdirectory must be pointed instead of base installation directory, and everything works fine.
As for the "Java 6 or 7 is required"-problem; I managed to get past this by adding a trailing slash to the java location.
/usr/lib/jvm/java-8-oracle # "Java 6 or 7 is required"
/usr/lib/jvm/java-8-oracle/ # Works
This is on linux, so it might not apply to your windows environment.
I'd like to know if install4j is jdk 8 compatible or tested against or will be :)
Just found 1.7 Version to be tested on there site.
And if not what is the roadmap for next release supporting that?
Thx
Inge
Install4j installers work with Java 8. The install4j currently (as of 5.1.6) requires Java 6 or Java 7.
From their blog Migrating to install4j 6:
The minimum Java version for the install4j IDE and the compiler is now Java 7. If your build machine only has Java 6 installed, you have to install a Java 7 JRE. On Windows and Mac OS X, Java 7 JREs are bundled in the install4j downloads.
Therefore, I suppose install4j IDE version 6 supports also Java 8, because they did not specify maximal Java version.
I wish to find out does anyone have problem compiling JDK 7 code with Eclipse? Because currently I only able use JRE 7 in Eclipse to test run but as for trying to use JDK 7 features into my code, it will state it will not support.
Eclipse 3.8 M1 (Juno) is the earliest stable version to have support for Java 7. Java 7 support will also be available in the upcoming 3.7.1 release.
Unfortunately, since Java 7 released after Eclipse 3.7 (Indigo) release, the Java 7 support could not make it to 3.7.