what is the eclipse compatible version for openjdk1.7 in windows 7 64 bit OS - eclipse

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

Related

NetBeans 8.2 does not open on Mac OS

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"

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 .

Spring STS 3.7.2 "No Java virtual Machine Found" on Mac OS X Yosemite

I have been using Spring STS 3.7.2 for a few months on my Mac laptop (Mac OS X Yosemite 10.10.5). But suddenly the STS IDE is not starting up. I suspect that one of the automatic OS update may have changed something, since I noticed that I don't see java any more on my path setting.
I manually added the following entries to my .bash_profile and updated using source command:
export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/bin
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
But STS stubbornly not working. It keeps giving me the error message in a dialog box:
A java runtime environment (JRE) or Java development kit (JDK) must
be available in order to run STS. No Java virtual machine was found
after searching ....
I am confused. I am able to invoke java from any terminal window, as well as JAVA_HOME environment variable is set.
Any ideas what may be going on?
After quite a bit of searching online, I figured out the problem, and resolved it for myself. It basically boils down to JDK upgrade to versions beyond 1.6.
The following link provided a solution:
https://apple.stackexchange.com/questions/178647/jdk-platform-not-recognized-running-eclipse-or-mvn
Here are the steps:
Revert back to JDK 1.6: Download and install JDK 1.6 from this Apple site: https://support.apple.com/kb/DL1572?locale=en_US
Change the PATH variable to point to the 'bin' directory of where JDK is installed. On my Mac, it was installed at: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
Go to the STS application installed directory and run the command "open -a STS.app". This will open the STS IDE successfully.
Exit STS.
Now, if you want to use Java 8, then change the PATH variable to the Java 8 directory. On my Mac, it was at: /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin
Launch the STS app again, and voila!, the problem solved.

NullPointerException when Starting Glassfish 4.0 in Eclipse on OSX Mavericks

I am using Mac 10.9 OSX Mavericks and Eclipse IDE for Java EE Developers(kepler).
I've installed Glassfish 4.0 using the 'new server' option in eclipse and the latest JDK - Java SE 7 [1.7.0_55].
but when trying to start the server, I get this error -
An internal error occurred during: "Starting GlassFish 4.0 at localhost".
java.lang.NullPointerException
Is there anything wrong with my setup? Any advice is much appreciated!
Open eclipse.ini file which is located in your eclipse installation directory (in the same folder with eclipse.exe).
Add -Duser.language=en in the bottom of your eclipse.ini.
Restart eclipse.
I installed Eclipse IDE for Java EE Developers(juno) instead of kepler and it works!
I am not sure what the problem with kepler is but this is a solution that worked for me.
I had the same problem while using Windows 8.1, jdk1.8.0_20, & Eclipse Luna.
I deleted the glassfish server, then re-installed, and it was all fine!
Note:
Remember to delete the server from the installation location.
Also in eclipse when you do a new installation, remember to go to "Configure Runtime Variable" (In the New Server Window), delete the existing config for Glassfish. then when you click next you will be prompted to select the JDK where you can select the correct version of the JDK. If you don't see the correct version of the jdk or no jdk version at all, then you will find above JDK a link called "Installed JRE Preferences" add the right version from there!
I had the same problem using Win7,jdk1.7.0_67, Eclipse Luna, glassfish 4.
As I suspected there is something wrong with the JDK settings, so I checked the Servers config in Preferences and in runtime environments my glassfish server got the problem: invalid JRE.
So I tried to set the JDK but the Finish button just isn't working.
I deleted that server and created a new with the same settings, and it's working.
I'm not sure though what caused this problem.

Eclipse upgrade killed PyDev

I just upgraded my version of Eclipse on Ubuntu, and now whenever I open a Python file it opens in an external window, and the existing Python files I have open in Eclipse say "Could not open the editor: No editor descriptor for id org.python.pydev.editor.PythonEditor".
I tried uninstalling and reinstalling both Eclipse and the PyDev plugin, and it didn't fix the problem.
From my experience (~8 years) with eclipse don't do in place updates. Always install a fresh version with a new workspace. And re-checkout projects from SCM.
Check first whether all required plugins still work before switching to the new environment.
Make sure your Java version is correct (what your version of PyDev is expecting).
After I updated PyDev (5 min ago) I had the exact same error message displayed in the tabs where I once had python source files opened (No editor descriptor for id).
I updated my Java version from 1.7 to 1.8 with:
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Then to check your version, run:
java -version
You should see something like:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) Server VM (build 25.91-b14, mixed mode)
Re-opened eclipse, and the PyDev plugin is working. Yay!
Actually, when you install Eclipse new version then new plugins are installed which lead to change in ubuntu libraries and installing again will not take effect until you install new plugin which is supported
I had same issue, when I updgradet PyDev with newest version 3.*. It needs java 1.7, but I have only java 1.6, so it does not work at all. I uninstalled it and set eclipse to old updating point, but nothing helped. Advise is to use PyDev versio 2.82. You can not find it from update repositories.
Only way is to download old version 2.8.2 from PyDev site, unzip that zip file to eclipse's drop in directory, in linux it is /usr/lib/eclipse/dropins. After unzipping you should see there features- and plugins-directories. And after some starting of eclipse, I could see PyDev again. At first restart of eclipse I could not see PyDev and tried "Check updates" and "Install new software" settind url to /usr/lib/eclipse/dropins but they did not see any software there. But trying to restart few times, old PyDevc 2.8.2 was in eclipse again. Huh.
I disabled PyDev from eclipses "check uopdates" so I don't make that error again, this machine will not get java 1.7 (Ubuntu 10.04 LTS).
I now ran into exactly the same problem when updating to PyDev 5.0 and its definitely an issue that the user is not warned that the program might break on update. However, the simplest solution is to install the new required Java and JRE version, for PyDev 5.0 that's Java 8 and OpenJDK 1.8 (on Linux), and tell Eclipse to actually use the new JRE in the eclipse.ini file, by pointing it to the right path. See https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM on how to achieve this.