Does Eclipse works on El Capitan? - java

Official Launch was today. I need to use Eclipse for my classes, and have seen that in Beta 3 update it "broke" Eclipse.
Can anyone confirm to me if Eclipse is running fine on El Capitan?

It's Xcode. If you try anything from the command line you will yield:
$ git status
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
so then you go looking around and you end up at needing to fix a link for command line tools:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
which yields
xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'
and then you go and reinstall Xcode. Ugh.

Eclipse Mars (4.5) runs fine on Mac OS X El Capitan for me.
I am using Java 1.8 update 60.
I also have XCode 7.0.1 installed, but I don't think that is relevant.
Eclipse RCP and SWT apps also work fine.

In case someone gets here through a search engine:
After upgrading to El Capitan, Eclipse gave me the error that it couldn't find a VM at /System/Library/Frameworks/JavaVM.framework/Home/bin/java
Reinstalling XCode didn't resolve the problem. This did:
Find java. I had Oracle's Java SE 7 installed at its default location.
Find Eclipse in Finder.
Right-click and choose Show Package Contents.
Open Contents/MacOS/eclipse.ini for editing.
Change:
-vm
/System/Library/Frameworks/JavaVM.framework/Home/bin/java
to:
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java
Save, then launch Eclipse as normal.

Related

Netbeans on MacOS X Big Sur no JDK Found

I am trying to install Netbeans 8.2 under Big Sur. All my attempts failed, each time I get "No JDK found". I have already JDK 1.8.
Thanks for any idea!
MacOS Big Sur - Apache Netbeans 12 Missing Java Home Solution
Open Terminal
vi as sudo to the netbeans.conf file
sudo vi /Applications/NetBeans/Apache\ NetBeans\ 12.1.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf
Locate the netbeans_jdkhome parameter
Uncomment the Line and make sure its equal to the $JAVA_HOME path e.g
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home"
Quit Netbeans and restart it, it works like Magic
Happy Coding πŸ‘ŒπŸΏenter image description here
As I can read around it is possible to run without any issues only with latest java version. You can make Netbeans work by installing Java 15 for example, checking $JAVA_HOME and I hope there are would be a fix shortly as I am also fun of java 8.

Eclipse not recognizing JVM 1.8

Still trying to get Eclipse IDE to work and running into Incompatible JVM error. I followed the steps here: I installed Java 7 but Eclipse keep saying that 1.6 is not suitable for this product
But unfortunately to no effect. Running OSX 10.9.5 and uninstalled the out-of-the-box version of Mac. The new version of Java seems to show up in the System Preferences. Please see attached screen capture. I've even done some of the basics like restart my computer, etc. Maybe there are other modifications I need to make to other files. I'm comfortable with Terminal but new to Eclipse and Java.
I have had the same problem as noted above. I could not get Eclipse to install because of Java incompatibilities. The sequence I followed goes like this:
Upgraded to MAC OS Sierra
Downloaded the Eclipse installer but was prompted that I needed to instal a legacy Java.
Installed Java 1.6
Was unable to install Eclipse and was prompted that I needed Java 1.7 or greater. Downloaded and installed Java 1.8
Ran the terminal code 'java -version' // this will check your jre version. This showed returned Java 1.6 despite the fact that I had upgraded to 1.8. The Java version listed in the Java control panel said 1.8
Tried multiple downloads of eclipse and Java and multiple restarts always with the same result.
Visited the Oracle web page noted above:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html I could not find the above reference to 8u73 and 8u74 but I did find and option to download 1.8.0_12. I did this. It installed without difficulty, and then I was able to install Eclipse without difficulty.
This took hours of my time. I hope this proves useful.
OK, so I don't really know what the problem was, but I simply fixed it by navigating to here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and installing 8u74 instead of 8u73 which is what I was prompted to do when I would go to "download latest version" in Java. So changing the versions is what did it in the end. Eclipse launched fine, now. Thanks for everyone's help!
edit: Apr 2018- Now is 8u161 and 8u162 (Just need one, I used 8u162 and it worked.)
JRE is a Run-Time Environment for running Java stuffs on your machine. What Eclipse needs is JDK as a Development Kit.
Install the latest JDK (and not JRE) from http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html and you should be good on Mac!
Open up terminal and check what java version is currently set in your path variable.
You can do that by typing in your terminal
java -version // this will check your jre version.
javac -version // this will check your compiler version
If this shows incorrect java version but you have installed java 1.8 then you have to set path variable to the newer version of java.
To do that do add the line:
export JAVA_HOME=/path/to/java/jdk1.x
to ~/.bash_profile (same as /Users/username/.bash_profile)
Then do this from the terminal to set the new variable
source ~/.bash_profile
Also what's your eclipse.ini set to ?
-Dosgi.requiredJavaVersion=1.7
EDIT:
Please open up terminal and type
find / -name "java" // This should find all folder named java on your file system.
Also how did you install java in the first place ?
Echoing the answer, above, a full install of the JDK (8u121 at this writing) from here - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - did the trick. Updating via the Mac OS Control Panel did not update the profile variable. Installing via the full installer, did. Then Eclipse was happy.
Here are steps:
download 1.8 JDK from this site
install it
copy the jre folder & paste it in "C:\Program Files (x86)\EclipseNeon\"
rename the folder to "jre"
start the eclipse again
It should work.
For some weird reason "Java SE Development Kit 8u151" gives this trouble. Just install, "Java SE Development Kit 8u152" from the following link-
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
It should work then.

Running Eclipse on Mac - JVM Version 1.7 or greater is required

I downloaded Eclipse (specifically that for C/C++ Programming) for Mac, running OSX Mavericks. When I try to start Eclipse, it gives me this message: "Version 1.6.0_65 of the JVM is not suitable for this product. Version 1.7 or greater is required", and it doesn't open. I installed Java version 7, but nothing changed. I don't know how else to update the JVM (I don't know much about Java in general).
I downloaded the 64-bit version for my MacBook Air, if that matters.
Simply Install the JDK 7 or JDK 8, and not just the latest JRE.
Run whereis java in a Terminal. It will normally display something like /usr/bin/java.
Now run java -version. It shows you 'java version 1.6.0_65' or something approaching. This is because Java 7 does not replace Java 6. Java 7 is installed as an Internet Plug-in and can be found in /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
What you need to do is to symlink /usr/bin/java to /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
Restart Eclipse, or reboot your computer (I don't know how Eclipse manages this), and it should do the trick. :)
I went to oracle downloads and the scrolled one of the several Mac osX links and downloaded jdk-8u73-nb-8_1-macosx-x64.dmg from oracle and that fixed the problem. I don't know why updating java doesn't do the trick.
add this script into 'eclipse.ini' at the top
'/Library/java/JavaVirtualMachines/jdk1.8.0_77.jdk/contents/Home/bin'
Trying to install eclipse, I installed java version 1.6.0_65 as it requested yet still was blocked from finishing the Eclipse install with the error that I needed 1.7 JVM or higher - not true, installing higher didn't work either. I tried installing jdk-8u101-macosx-x64.dmg and that didn't work. So, I tried JDK 7 as advised, sorry no good.
So, to get the Eclipse installer to run with out that java error I had to edit the Info.plist inside the Eclipse Installer. Right click the Eclipse installer and show package contents, then open info.plist in textEdit.app
(Note: So after several tries editing this plist and following methods mentioned elsewhere nothing worked, I found that you have to use the symlink or java alias because java is installed differently now a days as an internet plugin.)
Where you want to make an edit (You should probably Backup the original or you can download it again), under <key>Eclipse</key>, then <array>, delete out what's there and add <string>-vm</string> and this string underneath; <string>/usr/bin/java</string>
Here is what mine looks like.
<key>Eclipse</key>
<array>
<string>-vm</string>
<string>/usr/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>
Then save and try running your eclipse installer; this worked for me.
Just running the below command from there terminal worked for me.
brew cask install java
It updated my idk with 1.8, and after that eclipse opens successfully.

Eclipse not Launching in OS X Mavericks? (Not a single bounce or error message!)

When I try launching Eclipse in Mavericks it does nothing. Neither activity monitor nor console reflect my attempt to launch it in anyway. The icon doesn't bounce. No errors show up. No error sound. Just nothing.
I have a few other programs exhibiting these same symptoms, such as NetExtender.
This is on a 2012 MBP (non Retina) with the version of Mavericks that was released to everyone through the MAS on October 22nd, 2013 (build 13A603... OS X 10.9.0).
Eclipse is version 4.3
NetExtender is version 6.0.719
Googling around, some people are suggesting the issue is with Java in Mavericks. I downloaded and installed the latest JDK (7.45) but that doesn't seem to have helped in anyway.
There should be a popup asking you to install a Java SE 6 runtime.
It didn't appear for me either at first but that might have been because some other windows was covering it, so I saw it when I restarted the computer, and it appeared again when opening eclipse after the restart.
Hope this helps!
If you launch eclipse with the Terminal with:
open Eclipse.app
and you get an "LSOpenURLsWithRole() failed with error -10810 for the file..." then you have to make the eclipse executable file actually executable.
chmod +x Eclipse.app/Contents/MacOS/eclipse
That worked for me!
Upgrading from LUNA to MARS - http://download.eclipse.org/releases/mars - I ended up with the same error -10810.
The Eclipse.app file had been corrupted and and was actually missing some of the package parts.
Thankfully, I had Time Machine running and just restored the previous version of the Eclipse.app file. Eclipse opened up fine.
If you are not prompted for it, Java 6 (1.6.0_65) can be installed on your system using this link.
On a few of our systems an old and unusable but required (do not attempt to delete it!) version 1.6.0_45 remained after Mavericks upgrade.
This is specific to NIEM_UML version of Eclipse. When I double clicked on NIEM_UML.app on my Mac, it ended with a message that read "LSOpenURLsWithRole() failed for the application /Users//Desktop/NIEM/NIEM_UML.app with error -10810." I had to make set the executable property as below: chmod +x ./NIEM_UML.app/Contents/MacOS/niem_uml

Eclipse on Mac 10.8 - Installed 1.7.0 JRE / JDK, but Eclipse won't launch

Installed Java SE 1.7.0u10 from Oracle w/ their installer package
Downloaded and unpacked Eclipse Juno (4.2.1)
Double click Eclipse purple icon and get OS X alert prompt with error message:
To open "Eclipse," you need a Java SE 6 runtime. Would you like to
install one now?
(in terminal) which java - /usr/bin/java
ls -l /usr/bin/java - /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
(in Finder) Double click eclipse alias (included when unpacked download) - Terminal launches, /Applications/Eclipse/Eclipse.app/Contents/MacOS/eclipse ; exit ; and Exclipse launches without OS X alert prompt.
I've tried modifying the Eclipse app bundle plist to point the -vm key to /System/Library/Frameworks/JavaVM.frameworks/Versions/Current/Commands/java, but I feel like I probably shouldn't have to do this.`
I'd like to know how to get Eclipse to launch by just double clicking on the Application package. It's such a small thing to bug me... :o)
The best answer is to fix the Java 7 installation as shown here :
https://stackoverflow.com/a/19594116
Simple to do and I have confirmed it works on Mavericks. With this fix, you can launch your app from the launchpad as usual. If you upgrade your JDK, you will have to reapply the fix to the new installation.
I had JDK 7 installed and I solved this issue for eclipse Kepler by running eclipse from the terminal instead of the finder.
./eclipse
Just thought to share.
Update 1
For the sake of completeness, if you want to run it from Finder as well, you can wrap the ./eclipse command into a .command file and run it from Finder (so that you don't have to open a terminal)
The following lines should do the job (don't forget to replace "your-full-eclipse-path" with the eclipse path on your machine)
#!/bin/sh
/your-full-eclipse-path/eclipse
After that, give execute permission to the eclipse.command file you just created
chmod +x eclipse.command
I found the answer over on Ask Different
It's an ugly hack, but works perfectly.
posted on this page: Mountain Lion with Java 7 only
To trick OS X to accept Java 7 instead of proposing to install Java 6 a simple symlink is enough:
sudo mkdir /System/Library/Java/JavaVirtualMachines
sudo ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
Most Java Programs will run with this little hack without the need to install Java 6. OS X's Java Preferences (and maybe some others) will not as it seems to explicitly check the version of the JVM when it is started.
script above can fix my problem.
Hoping you are using 64-bit of Java SE 1.7.0 and so advising the following.
go to Eclipse->Preferences...->Java->Installed JREs
click Add...
Select Standard VM
paste /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home into JRE home
Change the JRE name to something useful like Java SE 7
Click Finish
Check the check-box next to your newly created JRE.
You would need a restart.
For what it's worth, the Eclipse team seems to have worked around it by replacing their dlopen()-based method with a CFBundleCreate()-based one: https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361
In case anybody has the same problem in their code that launches Java and does not want to resort to Apple-only APIs, I found an easier work-around: before dlopen()ing $JRE_HOME/lib/server/libjvm.dylib, make sure to open dlopen() $JRE_HOME/lib/jli/libjli.dylib. Then it won't ask to install Java 6.
Can you imagine that? You have to install a JDK 1.6 to get eclipse ran properly, even if you already have jdk 1.7 installed, and set the JAVA_HOME properly.
To resolve your issue, you just need to download the jdk1.6 from http://support.apple.com/kb/DL1572?viewlocale=en_US, and install it, later you will be able to run eclipse, and you can set the JAVA_HOME to JDK1.7, and you will be able to find the JDK1.7 from eclipse "Preferences".
All these hacks does not work on mac Mavericks,
But a simple and efficient solution is found here
it worked with me like a charm.
Note: a drawback of this solution is when you check your java version using "java -version" command, it will read Java 1.6
open /Library/Java/JavaVirtualMachines/jdkXXXXX.jdk/Contents/Info.plist
settting(<string>BundledApp</string> is usefull!):
<key>JVMCapabilities</key>
<array>
γ€€γ€€<string>JNI</string>
γ€€γ€€<string>BundledApp</string>
γ€€γ€€<string>WebStart</string>
γ€€γ€€<string>Applets</string>
γ€€γ€€<string>CommandLine</string>
</array>
I had the exact same message when setting up a new mac and trying to run eclipse 4.2.2 with only Java SE 7 installed (as part of JDK 7u17).
In order to be able to successfully launch Eclipse I had to let OSX download and install Apple's Java SE 6 runtime first before installing the latest JDK.
After installing the JDK, the command java -version correctly shows:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Trying to solve the problem the other way around didn't work -- i.e. installing JDK 7u17 first before installing Java SE 6 as suggested in the message.
I had the exactly same problem some days ago and I solved it today. Just installed this http://support.apple.com/kb/dl1572
And after that, when I opened the eclipse the OSX installed some java update and opening eclipse by Eclipse.app started working.
Hope it works with you too.
If you'd like to install Java 6 JDK only (no Java 7 JDK/JRE, no Java 6 JRE only), install the Apple OSX Java DMG (at time of writing, this was http://adcdownload.apple.com/Developer_Tools/java_for_os_x_2013003_developer_package/java_for_os_x_2013003_dp__11m4406.dmg).
You still won't be able to start Eclipse. Make a directory JavaVirtualMachines under /System/Library/Java. And then make an Alias of the java version folder at /Library/Java/JavaVirtualMachines and rename the alias 1.6.0.jdk and copy that alias to /System/Library/Java/JavaVirtualMachines/
After finished, you will have an Alias at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk that points to the Java install directory at */Library/Java/JavaVirtualMachines/1.6.0_XX-XXX-XXX.jdk*
Install latest JDK from Sun, it installs into /Library/Java/JavaVirtualMachines/, e.g. /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk
sudo mkdir /System/Library/Java/JavaVirtualMachines
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
========= this trick used to work on Mountain Lion, but not on Maverick 10.9 somehow ============
Tried this again on Maverick, it does not work anymore. I also tried to change eclipse app plist and eclipse.ini (by adding -vm or ), does not work either.
Some people suggested that this is caused by Eclipse binary prepared using Apple 1.6 appbundler instead of Oracle java7 appbundler: Application is using Java 6 from Apple instead of Java 7 from Oracle on Mac OS X?
For now, please just type the eclipse from command line, which works fine with JAVA_HOME set to Java 7 (/usr/libexec/java_home command will tell you)
How to Make Eclipse Run on OS X 10.9 Mavericks
Attempting to launch various Eclipse versions after the Mavericks upgrade pops up a dialog with this message:
To open "Eclipse.app" you need a Java SE 6 runtime. Would you like to install one now?
It turns out that Java 7 is disabled by default in OS X 10.9.
This is easily verified as follows:
$ java --version
No Java runtime present, requesting install.
The solution is to install the latest supported Java version from Apple support: Java for OS X 2013-005 (http://support.apple.com/kb/DL1572)
As of 10/15/13 this would be Java SE 6 1.6.0_65.
Post Date: Oct 15, 2013
File Size: 63.98 MB
After the install, Eclipse will run as expected from the Dock, the Finder, or the Terminal without any tricks, hacks, or work-arounds.
I wanted to run Eclipse itself with Java 7. As I have a couple of plugins that do not work without it. For me neither solution worked for 10.9, but I found a workaround. The main idea is that you start eclipse with java -jar launcher.jar and provide a couple of magic properties and then it starts. This guy provided the command line script in comments that works for me:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361#c25
I found the same problem (Mac OS X 10.9.2, Java 1.7.0_53b13, Eclipse Kepler). The workaround was quite easy:
Find the executable in Finder (CMD+Click on Eclipse's icon in the Dock)
Remove the icon from the Dock
CTRL+Click on the executable in Finder
ALT+Open (to allow the execution of a non-signed application)
Eclipse opens normally and without any problem
Re-dragged the program onto the Dock
I had this problem and found that I did not have JDK installed on my Mac. Once I did that, Eclipse starts normally.
I had same problem.
First of all ; JDK(java development Kit) and JRE(Java Runtime Environment) are different things. It was confused by people
In order to install eclipse yo should install latest JDK . So
Visit
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Download suitable version for your mac
You can check your version now ; it won't be 1.6 anymore
Try to install eclipse again , see it works.
Good luck!..

Categories