problem with opening java based apps

Joined
Feb 7, 2012
Messages
3
Reaction score
0
I have a java JVM problem:
When I open a java based app from the UI i get an error or the program just does not star because it can't find a JVM.
When I run the same program from the terminal interface it opens normally.
For example eclipse:
No Java virtual machine
was found after searching the following locations:
/opt/eclipse/Eclipse.app/Contents/MacOS/jre/bin/java
java in your current PATH


my java version:
mac:~ leov$ which java
/usr/bin/java

mac:~ leov$ java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12-409-11M3614)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03-409, mixed mode)


What could be the problem, any hints?
 
Joined
Feb 7, 2012
Messages
3
Reaction score
0
yes embedded in the app is nothing from the JRE. But by then it must look along the PATH to find the JRE. Started from the terminal it does, but by a click from the UI it can't find it. I would say, this could be something related to process owner? Is there a difference between the system's PATH and the user's PATH?
 
Joined
Nov 26, 2010
Messages
3,540
Reaction score
51
I think when you build an Java "App" it has the App Folder structure and required files that it uses to launch the VM, this doesn't use any PATH, but MAYBE an entry in the internal PLIST.

Do a Get Info on the App, look around for the PLIST and edit it with TextEdit.

Sorry it was many years ago that I stopped doing any Java on the Mac, not a big fan of the very poor Java Apps and support. Many, many of the Windows Java libraries were never ported across and very few programs are written in straight Java. So you get the App over, try and build it then find theres all these missing Libraries that just won't build on the Mac. Not write once run anywhere!
 
Joined
Feb 7, 2012
Messages
3
Reaction score
0
I found it, thx for your help.
Setting vm in the Plist to the default java vm worked
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top