I have gradle 6.0.1 and JDK 13.0.1 installed and tried gradlew setupDecompWorkspace, but it tells me "Could not determine java version from '13.0.1' ". I've tried to find an answer for a week now and I can't find a solution.
edit: the result of gradlew setupDecompWorkspace --stacktrace: https://pastebin.com/NFqZpBkG
edit 2: i manually changed the wrapper.properties file and updated my gradle wrapper. Now gradlew setupDecompWorkspace --stacktrace gives me this:
https://pastebin.com/ubYj4Zq0
I installed jdk 13 and call react-native run-android, then get error above.
Solution:
Check if you have jdk 13 here: /Library/Java/JavaVirtualMachines/
ls /Library/Java/JavaVirtualMachines/
Then
cd /Library/Java/JavaVirtualMachines/
sudo rm -rf jdk-13.0.0 // your version
After that reinstall jdk-8 again.
Gradle didn't support Java 13 (without forking the compiler) until Gradle 6.0. You say that is the one you have installed, but you are not supposed to install anything when using the Gradle wrapper. Rather, the wrapper will download the version of Gradle that is defined in the gradle-wrapper.properties file.
If you run gradlew --version (and remember to use the 'w' version), there is a good chance you will see an older version. If so, either upgrade the wrapper with gradle wrapper --gradle-version 6.0.1 --distribution-type all (or newer), or downgrade Java.
I was having the same issue. 1.7.10 forge does not support gradle 6. In the \gradle\wrapper\gradle-wrapper.properties revert the gradle version to what it was before it is something like 4.x. (This is for 1.8.9 not 1.7.10 if it is 3.x maybe try JDK 7 instead of 8 if the same error occurs)
Gradle 4 does not support JDK 13. I am not sure what versions work for gradle 4 as I cannot find the documentation for the supported versions. After some trial and error, I found JDK 8 works. Download and install here.
After the installer is complete, it won't just work. You will need to set "JAVA_HOME". Go to your environment variabes (Control Panel\System and Security\System\Advanced system settings\Advanced\Environment Variables...) If "JAVA_HOME" doesn't exist in the system variables, create it. Call it "JAVA_HOME" and set the value to "C:\Program Files\Java\jdk1.8.0_241" if you used the installer I linked. After you have done this, click ok, ok, ok and close the control panel.
You are almost done! Now all you have to do is restart your computer and it should work. If it doesn't comment on this answer and # me. Hope it works.
Note: I recommend to use IntelliJ for modding and once you have decompiled, open the build.gradle with IntelliJ. Wait for it to load and then go back to your command prompt and type "gradlew genIntellijRuns" (as seen in github guide for modding)and now you are ready to start coding!
Related
I've a fresh install of netbean 11.1.
Now I'm trying to build a project but I get the following error output:
Cannot run program "cmd" (in directory "C:\projects\open"): Malformed
argument has embedded quote: "C:\Program
Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd"
cd C:\projects\open; "JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.5" cmd /c "\"\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven\\bin\\mvn.cmd\" -DskipTests=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install\"" Cannot run program "cmd" (in directory "C:\projects\open"): Malformed argument has embedded quote: "C:\Program Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd" -DskipTests=true -Dmaven.ext.class.path="C:\Program Files\NetBeans-11.1\netbeans\java\maven-nblib\netbeans-eventspy.jar" -Dfile.encoding=UTF-8 clean install
I've build this project with netbeans 11.1 before but have a new pc.
and a fresh install, tho I'm sure there was no problem last time I tried to install everything.
Although this problem can be fixed by installing jdk1.8.0_221, but actually you don't need to downgrade your JDK. Just try these:
First exit netbeans IDE if it's open, then open netbeans configuration file from here: netbeans-Install-Dir/etc/netbeans.conf
(Note: for me netbeans-Install-Dir is C:\Program Files\NetBeans 8.2\etc)
Add the below arguments
-J-Djdk.lang.Process.allowAmbiguousCommands=true
to the beginning of the string that you find at this line:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m ......."
Sample screenshot as shown below:
4. Save the change and start your netbeans IDE.
I have checked the release notes for JDK 13.0.1 at https://www.oracle.com/technetwork/java/javase/13-0-1-relnotes-5592797.html#JDK-8221858
This behavior is a regression from a security fix for JDK-8221858 (not public). Follow the link for a full description. The fix is part of JDK 8u231, JDk 11.0.5, 13.0.1 etc.
To resolve this problem, append -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in <netbeans-dir>\etc\netbeans.conf.
I had this error with adopt8-hotspot (AdoptOpenJDK-1.8.0_232-b09) and sbt-0.13.X for an old project.
Problem solved after setting the environment variable in windows via
set JAVA_TOOL_OPTIONS=-Djdk.lang.Process.allowAmbiguousCommands=true
Did you by any chance install the latest critical update for java? jdk 1.7_241? I installed that today and was having the exact same problem. I downgraded my jdk version and it solved it completely.
EDIT: Apologies, I noticed you're using netbeans 11.1 so you probably have a later java version, in any case, you could try downgrading your java version to a previous release if you happened to update it today as the other version might have the same problem.
At the time that I'm writing, I had only JDK13 installed only on my machine. After unzipped my netbeans I've got the same problem with the internal maven of my netbeans 11.1.
Apparently netbeans 11.1 does not work properly with the JDK13. I just installed the JDK 8 and the problem now is solved, without any additional configuration or parameter change.
Nontheless, since I need the JDK13, I have both installed but my netbeans.conf file is pointing to JDK8. Later, you can define the new Java platform in netbeans project configuration.
I hope this might help.
Cheers!
just add -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in netbeans.conf
It seems to happen with all recently released jdk version (11.0.5 and 13.0.1 at least), even with the latest Netbeans 11.2vc1 (and witnessed on NB 11.1 too).
Downgrade your jdk to 11.0.4 or 13.0.0. It fixed the issue for me
The problem also occurs in version jdk-8u231. Fixing installing jdk-8u221 version
Apache NetBeans 11.1 does indeed not support JDK 13, that's what the upcoming Apache NetBeans 11.2 is for -- latest beta: bit.ly/apache-netbeans-11-2-beta-3
I had the same problem with oracle jdk 13.0.1 and netbeans 11.1, but it worked for me with openjdk 13.0.1 (https://jdk.java.net/13/).
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.
I am new in Android Studio. After setup,
When I am trying to import an application I am getting that error So that gradle not able to build.
Error:Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
I checked that my classpath setting for Java is fine. I am running Windows OS. Does anyone know the source of the error?
Please make changes as per below to resolve this error.
Install Java SDK version: 14 or above.
JDK Download link: https://www.oracle.com/java/technologies/javase-jdk14-downloads.html
In gradle-wrapper.properties please use grade version 6.3 or above.
For e.g:distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
This is because of the gradle version.
Go to: gradle/wrapper/gradle-wrapper.properties.
Change a version of the course by this:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
The console outputs:
Welcome to Gradle 6.3!
Here are the highlights of this release:
- Java 14 support
- Improved error messages for unexpected failures
For more details see https://docs.gradle.org/6.3/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
First watch this and try reinstall - https://youtu.be/trHinrIm6DM
After if you get "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper"
1.install Java SDK 14 and update env path.
2."[Your RN or Flutter Project Folder]\android\gradle\wrapper\gradle-wrapper.properties" this file edit as ...(upgrade gradle version)
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
3.run gradlew in cmd path "[Your RN or Flutter Project Folder]\android\"
4.it takes time.after if shows "BUILD SUCCESSFUL" you can "flutter run" in ur project folder
Yeah It's work 👍
What was helpful for me (MacBook):
first go to File -> Invalidate Caches / Restart -> Invalidate and Restart
then check the value of JAVA_HOME enviroment variable, by calling echo $JAVA_HOME (it should be equal to "/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home")
if it is not, change its value by calling export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
I faced this issue because of lower version of Jdk.
Previously I installed Jdk 1.7 and Android Studio 1.5.1, I got this issue.
If you install Android Studio 1.5.1 or above JDK 1.8 required
So Installing JDK 1.8 solved this issue.
I'm using Pop OS 20.04 and I have Java versions 8, 11 and 14 installed on my notebook.
This error was happening to me when version 14 was standard.
When I switched to using version 11 as the default, the error no longer occurred.
sudo update-alternatives --config java
In gradle-wrapper.properties file, updating the Gradle to 6.3 solved the problem on Mac OS Catalina
distributionUrl=https://services.gradle.org/distributions/gradle-6.3-bin.zip
Go to \android\gradle\wrapper\gradle-wrapper.properties.
Update the installing distribution version (all.zip) of Gradle in distributionUrl. As an example for Gradle version 6.8:
distributionUrl=https://services.gradle.org/distributions/gradle-6.8-all.zip
In my case the problem was that my version of Gradle was incompatible with JDK 14, but despite in project structure dialog was selected JDK 8.
It was necessarily to set JDK home for Gradle separately in gradle.propperties:
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
I face this issue when I was Building my Flutter Application.
This error is due to the gradle version that you are using in your Android Project.
Follow the below steps:
Install jdk version 14.0.2 from https://www.oracle.com/java/technologies/javase-jdk14-downloads.html .
If using Windows open C:\Program Files\Java\jdk-14.0.2\bin , Copy the Path and now update the path ( Reffer to this article for updating the path : https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/ .
Open the Project that you are working on
[Your Project]\android\gradle\wrapper\gradle-wrapper.properties
and now Replace the distributionUrl with the below line:
distributionUrl = https://services.gradle.org/distributions/gradle-6.3-all.zip
Now Save the File (Ctrl + S), Go to the console and run the command
flutter run
It will take some time, but the issue that you were facing will be solved.
So, you are in 2022, and changing the distribution URL does not work?
Yeah, React Native is such a pain. Make sure you have followed the React Native official guide, then check the Java version with:
java -version
Check compatibility matrix of Gradle versions. Change distribution URL to the version accordingly, from:
distributionUrl=https\://services.gradle.org/distributions/gradle-X.X-all.zip
to
distributionUrl=https\://services.gradle.org/distributions/gradle-Y.Y-all.zip
where Y.Y is the suitable version for your Java version.
And now, check that $JAVA_HOME is set:
echo $JAVA_HOME
Damn, is empty!
Yes, this environment variable is required, and on Internet you will see examples of exporting this path, for example for MacOS:
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
Be careful, this is not always the correct path. Check it navigating using cd command. For me the path was:
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
Spot the difference. This could be anywhere, so check it carefully as this is the last step that will allow you to run your project with yarn example android
Tested on: macOS Bug Sur, version 11.4. Intel Core i5. Good luck with M1.
PS: I hate React Native required configurations.
The problem in my case was in the discrepancy between the Gradle version installed globally and the one required by React Native. To fix it, I had to update the folder android/gradle/wrapper from the current 6.5 RN version from GH.
I fixed it just by editing the gradle-wrapper.properties file.
You must go to the project folder, then /android/grandle/wrapper/gradle-wrapper.properties.
In DistributionUrl, change to https \: //services.gradle.org/distributions/gradle-6.4.1-all.zip.
If you are using jdk 16 downgrade to 14 and gradle-wrapper.properties use 6.3 don't forget to upgrade build gradle in build.gradle to 4+
So I also got the same error on my system when I Cloned a project from github.
The project that i created on my system worked without any errors.
So if you are also in similar situation this could help
1-Go to this path
project-name/android/gradle/wrapper/gradle-wrapper.properties
2-Replace everything inside with this
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
When you upgrade to the latest version of the gradle in the gradle-wrapper.properties file
i.e. distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
please do not forget to change the gradle version in the build.gradle file as well
wrapper {
gradleVersion = '6.6.1'
}
I get this error when I open a new project with VS Code & Flutter. I solved the problem by editing the gradle.build and gradle-wrapper.properties files.
Edit android>build.gradle like this:
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms: google-services: 4.3.3' //add this line
classpath "org.jetbrains.kotlin: kotlin-gradle-plugin: $ kotlin_version" }
Edit gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip
I also had the same problem and and it looks like this problem is due to the gradle version in the project directory
This is the version of my jdk:
openjdk version "15-ea" 2020-09-15
OpenJDK Runtime Environment (build 15-ea+32-Ubuntu-220.04)
OpenJDK 64-Bit Server VM (build 15-ea+32-Ubuntu-220.04, mixed mode, sharing)
Please check gradle whether it is installed. This is the version of my gradle:
------------------------------------------------------------
Gradle 6.8
------------------------------------------------------------
Build time: 2021-01-08 16:38:46 UTC
Revision: b7e82460c5373e194fb478a998c4fcfe7da53a7e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 15-ea (Private Build 15-ea+32-Ubuntu-220.04)
OS: Linux 5.4.0-65-generic amd64
Then open the gradle-wrapper.properties file in your project folder, in the folder: project name/android/gradle/wrapper/gradle-wrapper.properties
Change the gradle version. Here I changed the gradle version to 6.5
The video version can be seen here: https://www.youtube.com/watch?v=mcclcscUpV0
Resolve It:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
and I changed it into:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
I had the same issue when building the Flutter project, I edited this file gradle-wrapper.properties
location: android -> grade\wrapper -> gradle-wrapper.properties
from this to:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
to this:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
but was not solved, I did flutter doctor and found some error in the android toolchain. I open android studio and installed "Android SDK Command-line tools" in SDK manager.
https://stackoverflow.com/a/69604498/13577765
and was solved.
This solution is for M1 Mac User
Find your local Java version by typing /usr/libexec/java_home -V. If didn't exist, install the latest ARM Java version here
Set Java_Home path (in my case jdk-17.0.1.jdk) by typing
/usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
Type all of these in terminal
cd /Applications/Android\ Studio.app/Contents/jre ln -s ../jre jdk ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Finally run flutter doctor -v to see all the details changes
gradle-wrapper.properties please use grade version 6.3 or above
distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip
../android/gradle/wrapper/gradle-wrapper.properties
For me the solution was to upgrade the gradle version to 6.3 from the android project structure (java 14.0.1 is already installed on my pc).
(Solution)
I tried my first flutter app in android studio , i was getting same error " Could not initialize class org.codehaus.groovy.runtime.InvokerHelper"
open build.gradle and update dependencies
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
or just hover over com.android.tools.build:grandle:(your-version)
When I tried "react-native run-android" I was receiving errors "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper" + "Failed to install the app. Make sure you have the Android development environment set up"....
Solved it by updating the gradle in Android Studio. When I opened my project in Android Studio it showed a message asking to update Gradle, and I just clicked.
It is not enough to change distributionUrl in gradle-wrapper.properties, you also need to change gradle version in your project structure.
Go to gradle-wrapper.properties and change:
distributionUrl=https://services.gradle.org/distributions/gradle-6.8-all.zip
Go to Android studio -> file -> project structure
Change gradle verison to 6.8 or whatever verison you selected that is compatible with your jdk.
I'm trying to run the maven and returns me the error:
/opt/apache-maven-3.3.3/bin/mvn: 227: exec: /opt/jdk1.7.0_79/bin/java: not found
What can it be?
run the command echo $JAVA_HOME and see where the java home is set and verify if the path is correct. Then check if $JAVA_HOME\bin\ folder is there and check for java command in it.
I just was experiencing this same problem, and about 4 hours later I figured it out. I had installed the wrong version of the java JDK. I originally installed the Linux x-86 version, but my computer settings required the x-64 version. Make sure you have the version of the Java JDK that is compatible with your system. Here's the link to those JDK downloads: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I'm using latest version of Eclipse Luna on Mac OS X 10.9.4. Whenever I try to open the Eclipse it says "version 1.6.0_65 of the JVM is not suitable for this product, version 1.7 or greater is required". I installed java 7 (JRE, I don't need JDK) but still I'm getting the same error. I tried java -version and the output was "java version 1.6.0_65". I can see the java icon on my system preferences. I also restarted my Mac to see if that works but that doesn't help either. I searched on google and some people suggesting other users to change Eclipse.ini file, the instructions wasn't clear and I'm a java beginner so I've no idea where and what to edit. Any step by step instructions will be appreciated.
I had this same problem with a fresh install of Eclipse Mars on OSX. I had installed the JRE from https://java.com/en/download/ (which is the top google search result for "java download" for me.
This failed for me with the same message "version 1.6.0_65 of the JVM is not suitable for this product, version 1.7 or greater is required"
Then I saw a comment that I should get the JRE/JDK from oracle instead:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
After downloading the most recent JDK from Oracle Eclipse starts fine.
A potential solution to your problem might be to uninstall Java6 (provided by Apple itself) and only have Java7 installed in your system. This only applies in case you have no applications that desperately need the old Java6 version to be installed.
To remove the Apple-like Java6 installation open a Terminal and:
sudo rm -rf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
After this step you should only have Java7 by Oracle installed in your system. To verify, open another terminal and do a:
java -version
It should display something like "java version "1.7.0_XX" where XX is the current update version of the Java7 installation. If not: proceed with the next step.
Redefine the JAVA_HOME variable (to support IDEs like Eclipse and other developer tools...), which helps detecting where the "active" Java installation is situated in your system. Open a terminal and (Note: replace XX first!):
sudo rm /Library/Java/Home
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_XX.jdk/Contents/Home /Library/Java/Home
Afterwards, a fresh installation of Eclipse should detect Java7 in your system and should work with this version out of the box. You can modify an installed Eclipse to use this installation by navigating in Eclipse to:
Preferences -> Java -> Installed JREs. Then remove the old Java6 system entry AND add new path (see above) with the name Java7.
You can modify Info.plist inside Eclipse.app (right clic on Eclipse.app --> show package contents) and specify -vm after <key>Eclipse</key>.
For example :
<key>Eclipse</key>
<array>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/bin/java</string>
<string>-keyring</string><string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>
Ensure you installed the jdk 7 or above. If you have a Mac you most likely have 1.6.0.jdk. To check your java development kit (jdk) version go to the terminal and browse to:
/Library/Java/JavaVirtualMachines
Next, if you see 1.6.0.jdk then you did not install the latest version of the jdk. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to install the latest jdk. Next use the browse out to the same file path aforementioned and ensure the latest jdk is in there (i.e. jdk1.8.0_141.jdk).
To specify Java 6 for OS X:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
For versions of Mac OS X 10.7+ the location has changed to
/Library/Java/JavaVirtualMachines/<''jdk_name_ver''>/Contents/Home/...
eclipse.ini > Specifying the JVM
Try any of these solutions
How do I run Eclipse using Oracle's new 1.7 JDK for the Mac?
Mountain Lion with Java 7 only
Eclipse still using java 6 as jre on Mac OSX
As I found out, we don't need to un-install an existing Java 1.6. Just installing or deploying a newer version 1.7 or 1.8, and setting the JAVA_HOME, along with the below given activities will solve the issue.
Check your c:/Windows/System32 (as I had this issue in windows). You will find junk java processes (java.exe, javaws.exe etc). Delete them all.
Deleting just java.exe will reflect in your PATH but eclipse still picks the javaws from c:/windows/system32. This is because, usually in PATH, you will have C:/Windows/System32 as the first entry. So, this will override any JAVA_HOME entry in the path.
Try starting the eclipse. It should work like charm! Atleast it did for me.
Try this
https://gist.github.com/johan/10590467
You might have to disable SIP and reenable it.
Okay so I have been struggling with this issue for a few days with Eclipse Neon and Oxygen. I was doing the below steps -
Check java -version from Terminal. It showed version as 1.7
Go to System Preferences -> Java -> Update Java version. Version 1.8 was downloaded and updated.
Went to Terminal again to confirm and this time it showed the version as 1.8.
But it still didn't work!! What was I missing now??
Here is what you need to keep in mind -- By default when you type the below command it shows the JRE version.
java -version
You need JDK to start your Eclipse installation. Please go to Java download page
and download the latest JDK version and you should be good to go.
Don't try to remove the Java in /System/Library/ - firstly this will not be allowed (you need to login as root user) and secondly you don't know the dependencies this Java version has on your other applications. Hope this helps!
Check your system variables ($JAVA_HOME specifically). This may be helpful:
http://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/
Install the updated JDK
Update the environment variables: here's how
If still not working uninstall the older JDK
I see that you have installed the Java plugin and not the jdk. You can download the JDK from Oracle Downloads section.
You can remove the Java Plugin and install JDK from oracle downloads to resolve your issue.
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. 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.