Eclipse doesn't find the installed JREs anymore - eclipse

My eclipse doesn't find the installed JREs anymore. When trying to set them up I get an error message which I attached as a picture. I am running eclipse on ubuntu 12.04, neither my old Eclipse 3.7.2 nor the just downloaded version 4.2 is working. Same error messages is popping up. I tried to use a different Java version (update-alternatives java), changed from openjdk-6 to openjdk-7, same error. Changed the -vm parameter in the eclipse.ini to the java path (version) I would like to use, but getting still the error. I don't know what else I can try...
Your help is really appreciated.

I have fixed this bug following this answer on ask ubuntu: Just launch a sudo apt-get --reinstall install tzdata-java.

Related

Upgrade from Eclipse Mars to Photon on Ubuntu cause problems

Hi I am wondering if anyone found some similar issues upgrading from ubuntu machine.
I upgraded from eclipse mars to eclipse photon and when I try to run my Tomcat 8 server I get the following error.
Plug-in "org.eclipse.jst.server.tomcat.core" was unable to instantiate class "org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchConfigurationDelegate". org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchConfigurationDelegate.allowAdvancedSourcel
I have tried updating all repo's to no success, I read some threads about WTP ServerTools so I tried upgrading to version 3.10 and this will not update for me either, any ideas would be grateful.
Or should I just do a reinstall to the version I had working, would properly save time in the long run
I'm having the same issue. I upgraded from within eclipse (Oxygen) by entering the new repository location.
Java 8 / Ubuntu 18.04
I then couldn't start tomcat with the above noted error.
I just ran apt update & apt dist-upgrade but it didn't pull down any relevant packages.
I then ran the 'Help | Check for Updates' option in eclipse and it installed some wtp tool updates. I then deleted the Server instance in eclipse and re-created it.
Tomcat now starts correctly.
Summary:
Run 'Help | Check for Updates' in eclipse and it looks like that will fix your problem.

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 .

eclipse.exe stop working in windows 10

I recently update my Windows7 to Windows10 by free Microsoft reservation and upgradation.
Before upgradation eclipse started normally and didn't has any problem but since I upgrade my windows I can't run it , when I try to open it I get the "eclipse.exe stop working" error.
I too got the same error. I tried following steps.
Reinstalled JDK (JDK 1.8 update 60 - 64 bit)
Installed fresh copy of eclipse (latest version - Eclipse 4.5 Mars)
Installed 32 bit version of JDK
None of these worked for me.
Finally I opened the eclipse by right clicking and Run As Administrator option - found this option in another forum. This worked for me.
Try to open eclipse via the commandline. (Open cmd, go to the eclipse folder, run eclipse.exe). You might get more information about the crash there and we can try to resolve the error.
I'm also facing this issue between Windows 10 and Eclipse Luna 4.4.2.
It was working just fine for several weeks and one day it begins.
I try to upgrade my JDK to 1.8.66 without success; try older JDK 1.7.80 and same problem.
I was able to run eclipse after adding JAVA_HOME environment variable and launching eclipse ide as administrator, as #Shyamkumar suggested above.
Another really ANNOYING thing is how the moderators of StackOverflow evaluate some questions posted here. Please Do Not downgrade questions if the answers may help other people. It is not about you, but the others !
In eclipse.ini file at VM, if it looks like:
-vm C:/Users/Nitin/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin
try replacing it with the following:
-vm C:\Program Files\Java\jdk-15.0.1\bin\javaw.exe
Note: The folder depends on the JDK version you have installed.
Try this. It worked for me.

PyDev not showing up in Eclipse

I just installed Eclipse Kepler (after an issue with a faulty update in Juno) and tried to install PyDev using the Install New Software option in Eclipse. Basically just following memory/online tutorials. After installing I can't see it in my Preferences pane. Any ideas why that might be so?
Thanks.
Yes, I have Java 7 installed.
UPDATE: A lot of users have suggested numerous solutions to this problem. There may be more than one correct answer below. See what helps you...
Too much!
After wasting 4 hours trying to install PyDev 3, I moved back to 2.8.2 and used the drop in technique instead of Add new software and it now works!
Download 2.8.2 from sourceforge
http://sourceforge.net/projects/pydev/files/pydev/
Uninstall PyDev.
Simply unzip the contents into the dropins folder below eclipse.
Restart eclipse.
After struggling with this problem for some days I wanted to share my solution to the problem - inspired by the above posts (kudo's to them).
My Configuration:
MacBook Air (intel) with OS X 10.9
Eclipse: Kepler SR1 installed (zip file extracted in the Applications folder)
My situation:
Tried to install PyDev via Eclipse Help --> Install new software...
Installation was succesfull, but PyDev didn't show up anywhere in Eclipse.
My solution:
In Eclipse go to Help --> Install new software...
Uncheck "Show only the latest versions of available software"
Select PyDev the usual way, but install the latest 2.x version instead of the 3.x version
Apparently PyDev 3.0 does not work with the default OS X configuration of Eclipse, Java and Python (don't exactly know why, though...)
I just figured it out.
You will need JDK rather than a JRE.
Download it here first:JDK Download
Install it.
Explore /Applications/eclipse/Eclipse.app/Contents/MacOS (where you put your Eclipse)
Open eclipse.ini
add
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java
You will change the version according to your situation.
Enjoy!
It happened to me too, but using Debian stable (wheezy, in my case).
I solved installing doing:
# apt-get install openjdk-7-jdk
After this, I checked that I had two alternatives of Java JDK:
# update-java-alternatives -l
And the output was:
java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64
Finally, I did:
# update-java-alternatives -s java-1.7.0-openjdk-amd64
After that, I removed pydev plugin from Eclipse, reboot Eclipse, install pydev (using Marketplace), reboot Eclipse, and now it works.
Credits:
http://vas.davimas.name/2013/07/switching-between-openjdk-v6-and-v7-in.html and Richard's answer, above
Most likely you do not have java 7 or > eclipse 3.7 installed on your machine it is a requirement of pyDev 3 see here http://pydev.blogspot.co.uk/2013/11/pydev-30.html
The PyDev.org website states (http://pydev.org/manual_101_install.html) --
"""
Important requisite
PyDev now requires java 7 in order to run. If you don't have java 7, the update
process may appear to succeed, but PyDev will simply not show in the target
installation. Please double-check if you're using a java 7 vm in
about > installation details > configuration
before trying to install PyDev.
"""
This problem started to appear in my Eclipse after I removed the Java 7 runtime from my system (because the Java code I am building needs to run on an older version of Java, but that's unrelated). After I realized that I had lost PyDev, I reinstalled Java 7 and PyDev is working fine now.
Another option would be to rollback to the previous version of PyDev that does not require Java 7, but it would require a manual installation of PyDev and I would lose the convenience of automated updates. The best way forward, it seems, to run run Eclipse on Java 7 and switch those Java projects that need to depend explicitly on Java 6 to that JDK/JRE.
How I was able to get pydev to work in mac/eclipse is download the latest JDK as mention 100 times above install it and then do the following.
open eclipse choose preferences > java > installed JREs
click on "Search..." button it will auto populate the JDK 1.7 you just installed
Click ok
have a beer!
-Cheers!
Solved.
OSX Mavericks 10.9, Eclipse Keplar 4.3.2, PyDev 3.4
Problem: PyDev not showing up under Ecplise > preferences
Solution: Download, install and point Ecplise to JDK 1.7
Unistall PyDev
Under Eclipse > preferences > Installed JREs you probably only see Java SE 6
Download and install JDK 1.7 from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
open terminal and run "/usr/libexec/java_home -v 1.7"
this will return the directory in which JDK 1.7 reside, something like /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
Under Eclipse > preferences > Installed JREs click "add", select "MacOS X VM", click "next"
in JRE Home paste your version of /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home, give it a name and click "Finish"
Restart Eclipse and re-install PyDev.
Voila!
I had the same issue on Luna and found my mistake.
After checking the author in "Do you trust these certificates?" page, and I was able to successfully install pydev.
The page lets you proceed without checking it, and no error occurs and it was where I totally missed. Maybe it is useful for someone.
You can move back to 2.x.x:
Eclipse -> About Eclipse then click "Installation Details" button.
From "Installation History" tab choose last installation.
Click Revert button.
You will go back to chosen installation.
I managed to get the following to work with Eclipse IDE for Java Developers 4.4.1 Luna on OS X 10.9.5 Mavericks:
Download and install the latest version of the JDK (currently Java SE 8u25) from http://www.oracle.com/technetwork/java/javase/downloads/index.html. (Not the JRE!)
Navigate to /Applications/eclipse/Eclipse.app/Contents/MacOS (or wherever you have Eclipse installed) and open eclipse.ini.
Append the following to the bottom of the file (be sure to replace the version number with yours):
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java
Download the latest version of PyDev (currently 3.8.0) from SourceForge at http://sourceforge.net/projects/pydev/files/pydev/.
Unzip its contents to /Applications/eclipse/dropins (or wherever you have Eclipse installed) and restart Eclipse.
Hope this helps anyone who's still having the issue. Special thanks to Mohammed Lokhandwala and braineo.
Aha , It is solved just now.I show it in the following.
First , I use MyEclipse with jdk1.8,maybe some people dont know that Eclipse (or MyEclipse) has its own jvm , what is not "jdk" you downloaded and installed and the "built-in jvm" is default. You can check this out by clicking like this " Windows-->preferences-->Java-->Installed JREs" And I found my MyEclipse used the default jdk1.6 .Then I click "add" to build path of my installed jdk1.8 .
Second , I opened the configuration file named "myeclipse.ini" and check this in the following.
binary/com.sun.java.jdk.win32.x86_64_1.6.0.u43/bin/javaw.exe
Third , I replaced it with new path . Check the following out. It is new path.
D:/jdk/java/jdk1.8/bin/javaw.exe
Last , restart it .And you can find "PyDev" in "Preference".
Happy Coding with Python!
PS:Pycharm is good,and you can get it for free if you are a student or a teacher. click here
I was experiencing the same problem using java 1.7.0_101.
Updated to 1.8.0_91 and "voilá"! PyDev finally appeared.
After trying all of the listed ways to work with 1.7 I was still seeing error message when Eclipse tried to open the editors and navigators on startup. But when I created a new project it worked. Then I tried just closing all editors and reopening them and they too work. The navigator had also set itself to working set and showed nothing. When I switched that to projects it also started working.
The same thing happened to me. This is how i fixed it.
Click on "install new software" - it's under help.
Click on " what is already installed"
Uninstall PyDev
Reinstall PyDev BUT instead of the 3.3XX version, install the latest 2.XX version (i.e click on the drop down menu and select the latest 2.XX version)
It worked for me!
So I tired many of the suggestion above, and I think what finally got it to work is instal the JDK from: http://www.oracle.com/technetwork/java/javase/downloads/index.html. You might also need to uninstall the pydev plugin and reinstall it again. But after install the JDK 8, I got the Pydev to show up under preference.
menu Help > Install New Software...
don't fill "works with" but click on Add...
In the next screen, add the update site of PyDev and PyDev Extensions:
Name : PyDev and PyDev Extensions
Location: http://pydev.org/updates
and go on...
pydev 3 is buggy! Use 2.8 and you should be fine.
I also had this problem, wanted to use python3.4 as interpreter and it wasn't compatible with pydev 2.8 so after a few trials I found out that if you install pydev 2.5 everything works fine !! (At least on Eclipse Kepler).
I know this thread is old but I thought I might contribute my solution because none of the suggestions above worked for my Mac running Yosemite [10.10.2]. I hope this will be helpful to someone else. Despite updating to the latest JDK my mac kept reporting a wrong version. It turns out the symlink was point to the old version and fixing that issue got my pydev/eclipse working.
Find out the current default Java version
Java -version
Get installed versions
/usr/libexec/java_home -V
Navigate to the following folder and delete the current symlink
cd /System/Library/Frameworks/JavaVM.framework/Versions/
rm CurrentJDK
Create a new symlink pointing it to the newer installation substituting 'new-version' with appropriate version from 2 above. i.e jdk1.8.0_40.jdk
ln -s /Library/Java/JavaVirtualMachines/<new-version>/Contents/ CurrentJDK
Confirm your default version
Java -version
Restart.
Happy coding.. :)
I had to uninstall pyDev 3 and install 2.8 to get this working with Eclipse (V 4.4) and Yosemite (V 10.10)
The easiest way is just getting http://www.liclipse.com/ which has everything setup from the start... if you don't want to go that route (as LiClipse is commercial) you may want to try to specify the java 7 install manually:
Grabbed from http://pydev.org/download.html:
Well, the main issue at this time is that PyDev requires Java 7 in order to run. So, if you don't want to support PyDev by going the LiClipse route (which is mostly a PyDev standalone plus some goodies), you may have to go through some loops to make sure that you're actually using Java 7 to run Eclipse/PyDev (as explained below).
All OSes
Make sure you download/install the latest Java 7 JRE or JDK, try restarting to see if it got it automatically.
I.e.: in help > about > installation details > configuration check if it's actually using the java 7 version you pointed at.
If it didn't get it automatically, follow the instructions from:
http://wiki.eclipse.org/Eclipse.ini to add the -vm argument to eclipse.ini on "Specifying the JVM" to specify the java 7 vm.
Note on Mac OS: You can use the command "/usr/libexec/java_home -v 1.7" to get the base path for the JVM (though you also need to append "/bin/java" to the output of said command to the -vm arg in eclipse.ini).
Solution
Using standard Eclipse installation method:
In Install New Software, Add a new site to Work With. I called my entry PyDev Old and entered the Location:
https://dl.bintray.com/fabioz/pydev/old/site.xml
That has PyDev for Eclipse versions 2.8.2 to 4.5.3
Details
I am working with Indigo (3.7) and so need a version of PyDev that is older than 3.0.0. My JDK is 7 as noted elsewhere in this question. The option for Show only the latest versions of available software is turned off.
The standard advice for getting PyDev is to use http://pydev.org/updates and turn off the only latest option. That now only lists PyDev 5.
I had the same issue!
Just update all three SWs to the latest version and it will solve the problem.
Do like this:
update Eclipse to Luna Service Release 2 (4.4.2) 64-bit, then
PyDev - Python IDE for Eclipse 5.1.2 from Eclipse Marketplace and then
download and update the Java SE Development Kit 8u92 64-bit
It should work well now!
I had the same issue in Eclipse 4.4. Had to use a previous version of PyDev. It simply seems to be a matter of using the correct Java JRE/JDK and PyDev for the version of Eclipse you're running.
From http://www.pydev.org/
Release 5.2.0
Important PyDev now requires Java 8 and Eclipse 4.5 onwards.
PyDev 4.5.5 is the last release supporting Java 7 and Eclipse 3.8.
See: update sites page (http://www.pydev.org/update_sites/index.html) for the update site of older versions of PyDev.
Oct 2016:
Installed fresh new copy of Java JDK 1.8.0_102 took care of the incompatible OSX JRE 1.6
Installed fresh copy of Eclipse Neon 4.6.1
Followed pydev manual: http://www.pydev.org/manual_101_install.html
all working fine now...
First install and setup following applications as these are mentioned in above answers:
Jave (version 8 or greater)
Eclipse(version Neon/Oxygen or greater)
PyDev in Eclipse
Now go through following steps:
Eclipse -> Window -> Perspective -> Open Perspective -> Other..
Select PyDev in the list.
Click Open.
Now you are all set.
Cheers!!!
Make sure you install the 64-bit version of Eclipse if you can. If so you should be able to use the latest version of Pydev without any problem.

Failed to load JavaHL Library

After updating to Snow Lion I started receiving these errors in Flash Builder / Eclipse when trying to use SVN:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
/opt/subversion/lib/libsvnjavahl-1.0.dylib: Library not loaded: /usr/lib/libpq.5.dylib Referenced from: /opt/subversion/lib/libsvnjavahl-1.0.dylib Reason: no suitable image found. Did find: /usr/lib/libpq.5.dylib: mach-o, but wrong architecture /usr/lib/libpq.5.dylib: mach-o, but wrong architecture
no svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Try this:
Select Window >> Preferences
Expand Team >> SVN
Under SVN interface set Client to SVNKit (Pure Java) SVNKit....
If you do not need to use JavaHL, Subclipse also provides a pure-Java SVN API library -- SVNKit (http://svnkit.com). Just install the SVNKit client adapter and library plugins from the Subclipse update site and then choose it in the preferences under Team > SVN.
On Kubuntu, my path to the library changed because of installing another Java version. Here's the whole picture, but in short:
sudo apt-get install libsvn-java
sudo find / -name libsvnjavahl-1.so
The output from the last command could look like this, for example:
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
This gives you the path, so you can add the following to your eclipse.ini:
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/
Check out this blog. It has a ton of information.
Also if installing through brew don´t miss this note:
You may need to link the Java bindings into the Java Extensions folder:
$ sudo mkdir -p /Library/Java/Extensions
$ sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
I Just installed Mountain Lion and had the same problem
I use FLashBuilder (which is 32bit) and MountainLion is 64bit, which means by default MacPorts installs everything as 64bit. The version of subclipse I use is 1.8
As i had already installed Subversion and JavaHLBindings I just ran this command:
sudo port upgrade --enforce-variants active +universal
This made mac ports go through everything already installed and also install the 32bit version.
I then restarted FlashBuilder and it no longer showed any JavaHL errors.
You may or may not need JavaHL depending on your OS. In addition to other suggestions just posting this here.
For other OS see this source: http://subclipse.tigris.org/wiki/JavaHL
maybe you can try this: change jdk version.
And I resolved this problem by change jdk from 1.6.0_37 to 1.6.0.45 .
BR!
i tried every single solution available and finally for me the problem was:
uninstall Native JavaHL 1.6
install everything under Subclipse from this site:
http://subclipse.tigris.org/update_1.10.x>
For me i started getting this problem when I upgraded to java 8, and then reverted back to java 7. Upgraded again to java 8 and the problem got resolved.
For Eclipse/STS v3.9.X windows user, you may need to update your subclipse version.
Go to Help > Install New Software > Click on Subclipse and edit the version from 1.6.X to 1.8.X
This method also apply to those who encounter JavaHL not available. You can check whether JavaHL is available or not by Go to Windows > Preference > Team > SVN. You may check it in SVN Interface > Client section.
If this work on MAC OS, kindly response in comment section. :)
My Understanding - Basically, svn client comes by default on Mac os. While installing in eclipse we should match svn plugin to the mac plugin and javaHL wont be missing. There is a lengthy process to update by installing xcode and then by using homebrew or macports which you can find after googling but if you are in hurry use simply the steps below.
1) on your mac terminal shell
$ svn --version
Note down the version e.g. 1.7.
2) open the link below
http://subclipse.tigris.org/wiki/JavaHL
check which version of subclipse you need corresponding to it. e.g.
Subclipse Version SVN/JavaHL Version
1.8.x 1.7.x
3) ok, pick up url corresponding to 1.8.x from
http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA
and add to your eclipse => Install new Software under help
select whatever you need, svn client or subclipse or mylyn etc and it will ask for restart of STS/eclipse thats it you are done. worked for me.
NOTE: if you already have multiple versions installed inside your eclipse then its best to uninstall all subclipse or svn client versions from eclipse plugins and start fresh with steps listed above.