How to install Eclipse on OSX 10.9.4 - java

I've seen similar questions, but nobody having the identical problem...
I installed eclipse.
Attempted to run, and it complained I had no Java engine (oops).
It offered to install Java 6. I accepted the offer and it did.
When I tried to run eclipse again it complained that it needed Java 7.
Downloaded and installed Java 7. It is the only version that shows in preferences.
Try to run eclipse again. It continues complaining that Java 6 is not sufficient and it requires Java 7.

There are many ways to achieve what you want. But just to add some options, you can achieve it without modifying the default java version.
You can use the
-vm
/path/to/jdk7/bin/java
Here you can see more examples http://wiki.eclipse.org/Eclipse.ini.
The file is in /opt/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini (note that my eclipse installation is in /opt/eclipse).

Related

Ubuntu: Unable to start eclipse

I removed java-11 and installed jdk-1.8. Now when I try to start eclipse then its throwing the following error:
Being a beginner I searched and found some solutions but not worked for me
Ok. I'm going to make some assumptions based on some implications of what you've said here.
I assume that you had Java 11 installed, and you had installed Eclipse, and it was working.
You then, for some reason that I can't understand, decided to uninstall Java 11 and replace it with Java 8.
The error message is because when you had Java 11 installed and you installed Eclipse, Eclipse stored the path to the Java 11 distribution in the "eclipse.ini" file. Now that Java 11 is gone, it cannot start up.
The easiest way to fix this is to reinstall Java 11, and hopefully it will install into the same location as that error message shows it is looking for it.
Now, to address why you might have thought to replace Java 11 with Java 8. I'm guessing you're working on an application that requires Java 8 to compile and run. In this context, it's somewhat understandable that you would have done what you did, but it was the wrong thing to do.
Eclipse can run with one Java version, but build and run applications with a different Java version. In fact, I think it's generally a good idea to run Eclipse with the newest version of Java it can run (generally about a version short of the latest), but build your applications with the version of Java required for those applications.
So, you should have both Java 11 (or newer) AND Java 8 installed. Run Eclipse with Java 11, and build and run your applications with Java 8. In Eclipse, you have to register the Java 8 distribution in "Installed JREs" in Eclipse preferences, and also record that Java distribution in the "JavaSE-1.8" Execution Environment, in the preferences tab right below "Installed JREs". Set your application to require "JavaSE-1.8".

java version in not match for eclipse

I had java version 8 previous and my eclipse worked just fine. But now I have java version 7 and I can't open eclipse on my computer. What should I do? please help.
I think there are two options:
Upgrade to Java version 8 (or newer).
If you can't do that, downgrade to a version of eclipse that supports Java 7. eclipse 4.5 (Mars) (or earlier as noted on the linked page), as of eclipse 4.6 (Neon) Java 8 is required.
I feel I should note that newer versions of Java (and eclipse) can still target Java 7 (and many earlier versions).
But now I have java version 7 and I can't open eclipse on my computer. What should I do?
Use versions that work together. When you for example look at your second screen shot, it says something like "requiredJavaVersion=1.8" or so.
In other words: you can't just come in and run eclipse with any version of java.
The other answer gives you the required details.
And a final note here: in case you tried to start eclipse with that older JVM in order to "allow" to ensure that eclipse won't allow "java 8" stuff in a project: that isn't the right way then. Instead: eclipse allows you to "define" JDKs to be used for your project. So you can easily tell eclipse: "I have a Java7 jdk sitting here, please use that for project X".
You do not need to run eclipse itself with a Java7 JVM in order to use a Java7 JDK for an eclipse project!
There will be a file under the Eclipse installation directory named as eclipse.ini.
It will launch the eclipse for that specific jdf and you can change the path to your jdk7.
Hope it helps.
It depends basically on which version of the eclipse you have.
If you have eclipse 4.6(Neon) or the latest version, then you must need a newer JDK version of Java (>=1.8 which you need to download). Or If you want to roll back to an older version of Eclipse then consider downloading eclipse 4.5(Mars).
Or If you have an eclipse version of 4.5(Mars) or older then see in eclipse.ini
-Dosgi.requiredJavaVersion = 1.8 and change it to -Dosgi.requiredJavaVersion = 1.7 which can be found in the folder containing eclipse.exe file.

NetBeans can't find JDK 10 I installed

I am reading the JavaEE first cup, and I needs JDK8+, my version is older, so I upgraded my java, Configure the System Path, Install so on, I successfully run java -version in command prompt and it recognizes me that I've installed successfully, but when I start my NetBeans, It can't find Java! Not only that, but also my Eclipse neon can't find java! I check the eclipse.ini, maybe it just need a JDK 8. So I just wonder, how can I make my NetBeans found my Java?
I am new to netbeans,so I resort to configuration in eclipse.ini,I try to add “--ALL"like script,I doesn't work anyway!Thank to my patience,I notice some jdk1.8required
property,I am completely rush to my deadline,so I avoid to this problem,and got 1.8,but thanks a lot if you recommend eclipse IDE lastest version which can work well with JDK 10 without any modification in ini file!

Java: Getting a "Requires JDK 5.0 or later" error in Eclipse

I have just installed the JDK1.8.0 32 bit version on my computer and that all seemed to work nicely. I then followed the instructions on this stackoverflow page to add tools.jar to the Eclipse (although, to be honest, I'm not quite sure what that means?). I'm still getting the error: "Requires JDK 5.0 or later. Please download it from http://java.sun.com/j2se/1.5/".
Could someone please help me understand what the problem is? Also, please let me know if I haven't given enough information, this is my first attempt at using Eclipse and I don't know if you need any other info.
Thanks
Mike
The Oracle JDK installation does not install Java in the location where Eclipse by default looks for it.
I would suggest that you go to http://java.com/en/download/installed.jsp and follow instructions to get a default Java installation on your system.
Eclipse will then use that to run itself. You can then tell Eclipse about your Java 8 JDK in Preferences -> Java -> Installed JRE's and that it is to be used by default by the projects you write.
Note that there is not full support for the new Java 8 facilities in Eclipse yet. That will most likely come in Eclipse 4.4 scheduled for June (http://wiki.eclipse.org/Simultaneous_Release)
When you make a new project, make sure it's using the JRE you want. You may have to change it from default to "use project specific JRE", and then select the 1.8.

Unable to run Java Applications in Eclipse [duplicate]

I'm trying to get started with Eclipse/Java/Scala on a MacBook. The installed JDK was 1.5. The SDT plugin for Scala requires 1.6 which was included in an OS update, but I also manually installed a package from Apple to update 1.6.
The problem is that I cannot run anything from Eclipse. I always get the following error:
An internal error occurred during: "Launching TestFooBasicTest".
Could not initialize class com.ibm.icu.impl.JavaTimeZone
I also tried to use the old 1.5 version, but to no avail.
What is going wrong here?
I had the same problem trying to run a scala program with Ubuntu 10.4 and stock eclipse (Galileo 3.5.2) and java (java-6-openJdk ) - and the scala pluging downloaded from scala site, of course. I fixed it by manually changing /usr/lib/eclipse/plugins/com.ibm.icu_4.0.1.v20100125.jar as suggested in this thread (btw I discovered that Emacs can change a jar file in place: nice):
http://www.eclipse.org/forums/index.php?t=msg&goto=488654
It's caused by ubuntu openjdk package with broken symbol links for TimeZone configuration. The best solution from forum thread is,
Reinstalling tzdata-java was the fix for me:
sudo apt-get --reinstall install tzdata-java
The problem is:
An internal error occurred during: "Launching TestFooBasicTest". Could not initialize class com.ibm.icu.impl.JavaTimeZone
A quick google search reveals that this class belongs to the IBM Globalization package ICU. http://www-01.ibm.com/software/globalization/icu/index.jsp
A guess would be that this is a package used internally by Scala that you have not installed properly, causing Scala startup to fail.
Make sure that you set java 1.6 in the run configuration (Run/Run configurations).
Did you upgrade to Snow Leopard? Are you using the Eclipse SWT/Carbon or the Eclipse SWT/Cocoa? I was seeing some strangeness with Eclipse after I upgraded to SL. Switching to the Eclipse SWT/Cocoa from Eclipse SWT/Carbon helped. Also restoring my 1.5 VM, which the SL install removes in a sneaky way(by deleting and leaving the symbolic link pointing to 1.6), helped me fix several issues with Java code that had natives(i.e. usb-serial port code).
Check what are the JVMs that Eclipse is aware of and where they are located (Preferences -> Java -> Installed JRE), and also check the run/debug configuration of your programs. By default, Eclipse knows about the JRE that was used to launch itself, and other JREs that you add manually. However, if you upgrade some components and the JREs changed, Eclipse can get "confused" about them.
I had this same issue with Eclipse on Windows. I tried a number of different things including a new hello world program in a new workspace. I finally got this to work by pointing Eclipse to a different JRE to execute with. I know that Apple provides the JRE for Mac, but it does seem like this issue is related to Eclipse having trouble with the JRE used to run Eclipse itself. See here for configuring which VM Eclipse executes with.

Categories