NetBeans 8.2 does not open on Mac OS - netbeans
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"
Related
NetBeans IDE 8.2 - no compatible JDK was found
I've been trying to install NetBeans,but i get an error every time because netbeans can't find the folder with jdk.Even when i explicitly tell the netbeans where the jdk is installed,i am still getting the same error.I've checked all my system variables and they are fine - at least i think so.What's the problem? Pic1(Netbeans installation) : Pic2(Netbeans installation) : Pic3(System variables) : Pic4(Path variable) : Pic5: Pic6:
NetBeans 8.2 only supports Java 8. But in order to run NetBeans you need a JDK, a JRE is not sufficient. You need to remove the JRE and install the Java 8 JDK instead.
MyEclipse doesnt accept JDK for creating Runtime
I am trying to create a JBoss Runtime in Eclipse. I have added 2 JRE entries in my Eclipse - one for JDK1.7 and another for 1.8. Still Eclipse wont identify my 1.7 entry. See screenshots attached. P.S: I got my JDK 1.7 by extracting the MSI/Exe setup file using 7 zip. I have done regular installation of Java 1.8 and My Java_Home is set to 1.8 in the PC. I don't want to modify it to point to lower version as it will impact other projects.
Your JRE definition won't be recognized as valid for the JBoss runtime if it is not a JDK. Your extraction of the JDK may have resulted in a JRE instead. Why not just run the JDK installer and change the installation folder to something other than your Program Files folder; it won't switch your system to Java 1.7 that way (I just tried this myself to check). Then define a new JRE to point to the newly installed JDK 1.7 and you'll be able to use that for the JBoss runtime.
Eclipse error 'UseStringDeduplication'
I installed a fresh Ubuntu 16.04 VM, Oracle JDK 7, and downloaded the latest Eclipse. But I am getting this error when I try to start Eclipse: Unrecognized VM option 'UseStringDeduplication' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. Why am I getting this error on a fresh install? And is it a bad idea to remove that VM option?
Latest version of Eclipse (Neon) requires Java 8 runtime, and the Eclipse website obnoxiously neglects to mention it anywhere from the homepage to the download link for Eclipse, not even a version warning at runtime for Eclipse.
Same error for me in Kubuntu 14.04, eclipse Neon, I Removed -XX:+UseStringDeduplication from .ini file, it works for me
I know, i'm little to late to the party. I got this issue lately on my Mac. I updated my eclipse (from Mars to Oxygen) all of the sudden i couldn't start my old project. First i thought, this must have something to do with the new eclipse, which wasn't all wrong. Because eclipse.ini file of Oxygen expected java-1.8. I updated my java to latest (jdk1.8.0_152.jdk), but the problem remained, than i removed these parameters from the eclipse.ini, still was the same, i checked the "Run Configurations" and basically removed the same parameters from the arguments list. Now my projects seem to work just fine. I also needed to restore the platform, since Oxygen use e.4-platform. Remove these parameters from eclipse.ini file Select the project and go to "Run As"->"Run Configurations..."-> "Arguments" check the old configurations under "VM arguments" (it can be a product in case of an RCP-project) removed the VM-option(s)(actually, they can be more) not recognized and "Apply"-> "Run".
I got the same error when I have installed Java 8 and Java 9 in my Ubuntu 16.04. My eclipse version was Neon. As https://wiki.eclipse.org/Eclipse/Installation#Eclipse_4.6_.28Neon.29 describes to start specific eclipse ide you need relevant JDK. For neon, it was Java 8. Since I installed Java 9 using apt-get it was the default JDK. so I have to change the default JDK to Java 8. You can check which java version used in system-wide with java -version `If you want to see which are the versions of JDK installed in Ubuntu then run below command in shell. sudo update-java-alternatives --list Then choose which version you want to set. After that run below command. sudo update-java-alternatives --set [JDK/JRE name e.g. java-8-oracle] Now run again Eclipse. if the version was the reason to conflict, it will run now. Referred by http://menukanows.com/how-to-set-a-default-jdk-version-in-ubuntu/
String Deduplication – A new feature in Java 8 Update 20 It means you should nt java 1.8 updated later or equal 20.
I faced the same issue on Eclipse Oxygen in Ubuntu. Tried: Checking java version (It was already at 1.8.0 so according to the accepted answer, it should work.) Removing -XX:+UseStringDeduplication from .ini file Still didn't solve the problem. Then I saw #simgineer's comment: In my case this was for eclipse oxygen. I had an older version of java 8 installed (jdk1.8.0_05) when I upgraded to the latest (jdk1.8.0_151) and updated my eclipse.ini to point to the latest as well (since it is recorded in there during installation) eclipse oxygen started working. Solution: Updated JDK from 1.8.0 to jdk1.8.0_231 and it got resolved. Voila! I didn't have to update anything in my eclipse.ini .
what is the eclipse compatible version for openjdk1.7 in windows 7 64 bit OS
I have windows 7 64 bit OS in which I used to work with eclipse Juno Service Release2 version and Oracle JDK 1.7. Now as per my new project requirements I had to change my JDK from Oracle JDK to OpenJDK 1.7. I have un-installed all the other jdk's from my machine and installed OpenJDK1.7(64 bit version). Now I am facing issues with eclipse, I am able to open eclipse IDE but if I perform any operations like opening an existing project or trying to run any programs/project it is getting crashed or getting hanged. I have to end the process from the taskbar and try again and again. Below is the popup screen that I am getting after eclipse crashes. Can some one tell me how to resolve this issue? I have seen some blogs saying there is a bug with eclise and OpenJDK with Ubuntu and mac OS but no issues reported for windows. So if there is way to fix this issue please let me know (or) please suggest any eclipse version the is compatible with OpenJDK1.7 and windows7.
Here is my version of solution to my issue which was mentioned above. Installed Oracle JDK1.7 on my system and did not set the path for this. I have updated the eclipse.ini file with (found in eclipse root directory) -vm C:/Program Files/Java/jdk1.7.0_79/bin/javaw.exe parameter. so that Eclipse starts with Oracle jdk and in Eclipse->Windows->Preferences window under Java->Installed JREs->Add(under Installed JREs) added a new entry to point out the OpenJDK1.7 version so that my project uses OpenJDK version. This solved unusual crashing of Eclipse
How Do I make the Install4j IDE to upgrade to Java7 instead of Java6
I have upgraded to Java7 recently. I had my install4j Project file in Java6. Now in the Install4j IDE, I go to Media wizard and download 1.7 JRE's and select them for Windows. (I have window 7 64 bit.) But When I go the Installer tab in IDE , where for some of the screens I have my custom code which is compiled in Java7. It gives an error for the IDE java version lower than the compiled version(for those class files). The Common Location where is the JRE for 1.6 was downloaded C:\Program Files\Common Files\i4j_jres But the JREs for 1.7 somehow are never downloaded in the common location. How Do I make the Install4j IDE to upgrade to Java7 instead of Java6. Thanks Sony
We had the same problem as you, so we just swapped out install4j's built-in JRE with the one we used to compile our custom code. i.e. - replace "C:\Program Files\install4j5\jre" with the jre you use to build your custom actions.
Under General Settings->Java version, change the minimum version to 1.7