Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse not opening jvm out of date mac

I am on a mac and try to program java with newer versions of eclipse, but they are not working. Old versions of eclipse are working, but I recently installed Eclipse Luna and when I open it, it says: "Version 1.6.0_31 of the JVM is not suitable for this product. Version: 1.7 or greater is required." But I have the newest version of java installed. I installed the newest version of the JDK, and if I'm not mistaken, JVM is Java virtual machine but I don't know how to update that. I am expirienced with java, however I am beginner to how stuff like the JVM works, so please try to be as specific as possible when explaining the answer. Also explain why it works and why it wasn't working before. I searched on this site before posting and one answer to a similar problem was to type

 export JAVA_HOME=/usr/libexec/java_home -v 1.7

into terminal, but terminal gave me the error:

 -bash: export: `/usr/libexec/java_home': not a valid identifier
 -bash: export: `-v': not a valid identifier
 -bash: export: `1.7': not a valid identifier

So please help, I don't know what to do.

like image 662
RothX Avatar asked Jan 11 '23 03:01

RothX


1 Answers

I had the same issue for quite a while. This helped in my case. Run the following in your terminal..

export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

verify the change with java -version command..

like image 184
dpace Avatar answered Jan 21 '23 16:01

dpace