6

I'm trying to work with JAVA in Eclpise (Helios) and I'm running on Mac OS X 10.6.7. When I try to open a new Java Project it tells me that I don't have any JRE installed.

Using terminal it says that the current javac -version is 1.6.0_22. Now, I read about specifying a path in Eclipse->Preferences->Java->installed JRE to Library/Framework/JavaVM/Versions/1.6/home the problem is that after "Versions" I'm finding only "aliases" and not folders. If I click on that, it tells me that the alias is not working.

So I'm stuck here: anybody has a solution?


I found a solution so I would like to share. Actually nothing worked, I ve also called Apple and they had no idea. So I ve downloaded Windows 7 and installed it on my Mac with bootcamp. Now everything works fine.

peterh
  • 11,875
  • 18
  • 85
  • 108
edoardo849
  • 143
  • 1
  • 2
  • 8

7 Answers7

2

I saw this post solution!

It helped me solve my problem I had on my mac after a fresh install of leopard. Seems like these variables have to be set manually or so.

Community
  • 1
  • 1
Craig Wayne
  • 4,499
  • 4
  • 35
  • 50
2

Click on project--> Build Path-->Configure Build Path...-->Libraries tab-->Click on Add Library button. Select JRE System library than select JRE if not found than you can specify your own JRE.I think this might help.

Ankit
  • 2,753
  • 1
  • 19
  • 26
0

What is the PATH to the JRE file? Not something else, but the ~JRE~ (Java Runtime Environment) As needed for http://www.boonex.com/trac/dolphin/wiki/RayMediaServerInstallation

Vivoco
  • 221
  • 1
  • 2
  • 3
0

On my macbook pro I had the same problem: in an imported Java project, some libraries cannot found (like java.time).

I've tried some tutorials but at the end I solved installing the last JRE version and removing all old versions from System/Library/Java/JavaVirtualMachines

Hoping to be useful

Leonardo Rignanese
  • 865
  • 11
  • 22
0

The answer is to get the Eclipse-Oxygen. After watching a bunch of youtube videos and trying above hints nothing worked, I kept getting

'Launching HTTP Preview at localhost' has encountered a problem. Could not find JRE executable.

Then I saw this post where Nitin Dahyabhai writes it is a Mac-specific bug that is fixed for Eclipse-Oxygen

I uploaded Eclipse-Oxygen (Eclipse IDE for Javascript and Web Developers) using eclipseinstaller by Oomph--- and LO and BEHOLD preview of my html page was immediate, no set up required!

Bentaye
  • 9,403
  • 5
  • 32
  • 45
0

Make your eclipse Pointing INSTALLED JRE to JDK

jmj
  • 237,923
  • 42
  • 401
  • 438
0

Sorry if it doesn't work on a mac (got no way to check), but since it's a Unix system:

in the terminal, execute which javac

Strip /bin/javac from the output and you have the path that eclipse needs

Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588
  • @Jordan ok, but /usr/bin/javac is probably just a symbolic link. So you need to do `realpath /usr/bean/javac` and do the above with the output. See [this page about `realpath`](http://www.cyberciti.biz/faq/unix-linux-bsd-find-real-physical-path/) – Sean Patrick Floyd Nov 11 '11 at 13:08
  • Huh. Looks like OS X doesn't even have the `realpath` command (although there's a man page for it, oddly). Using `ls -l` shows that it points to `/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac` so I suppose it'd be `/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/` But I think that's not the correct path for OS X anyway; tried it in Eclipse and it doesn't seem to work. – Jordan Reiter Nov 11 '11 at 13:44
  • @Jordan no, I'm pretty sure /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac is another symbolic link. try ls -l on that, too – Sean Patrick Floyd Nov 12 '11 at 14:10