Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Problem running Eclipse Code (http://www.chiefdelphi.com/forums/showthread.php?t=134472)

Jtbillick 12-02-2015 22:34

Problem running Eclipse Code
 
1 Attachment(s)
Hey, I'm a programmer from team 4780 and I'm getting an error when I try to run a code I have in eclipse. I'm sorry if someone already posted this, but I couldn't find anything. I'm not sure what exactly this error means and I need advice on how to fix it. Thanks in advance!Attachment 18311

Ozuru 12-02-2015 22:39

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Jtbillick (Post 1442972)
Hey, I'm a programmer from team 4780 and I'm getting an error when I try to run a code I have in eclipse. I'm sorry if someone already posted this, but I couldn't find anything. I'm not sure what exactly this error means and I need advice on how to fix it. Thanks in advance!Attachment 18311

http://www.puu.sh/
http://www.gyazo.com/

http://www.take-a-screenshot.org/

Are your environment variables setup correctly? It seems like you may have an incorrect/no JAVA_HOME specified.

https://stackoverflow.com/questions/...e-on-windows-7

cad321 12-02-2015 23:11

Re: Problem running Eclipse Code
 
It would appear that you are pointing your java home directory to a JRE (java runtime environment), not the JDK (java developer kit, I think). We had the same issue and once we downloaded and started using the JDK it was OK.

Oromus 13-02-2015 10:21

Re: Problem running Eclipse Code
 
You'll need to set your JAVA_HOME environment variable to point to a Java JDK instead of a JRE. If you don't have a JAVE_HOME environment variable, create one and have it point to the JDK.

Rakusan2 13-02-2015 11:12

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Oromus (Post 1443194)
You'll need to set your JAVA_HOME environment variable to point to a Java JDK instead of a JRE. If you don't have a JAVE_HOME environment variable, create one and have it point to the JDK.

I had this problem and all I did was in Eclipse I went to Window->Preferences->Java->Installed JREs->Add->Standart VM
Then I found the newest jdk in JRE home, clicked next and select it.
This worked with out me even touching JAVA_HOME which I still do not even have in my system variables

Oromus 13-02-2015 11:48

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Rakusan2 (Post 1443253)
I had this problem and all I did was in Eclipse I went to Window->Preferences->Java->Installed JREs->Add->Standart VM
Then I found the newest jdk in JRE home, clicked next and select it.
This worked with out me even touching JAVA_HOME which I still do not even have in my system variables

While that does fix this problem, it ONLY fixes it for Eclipse and not for any other programs that may be expecting the JAVA_HOME variable to be pointing a JDK. Correcting the JAVA_HOME variable ensures this issue won't arise on any other programs.

Rakusan2 13-02-2015 12:02

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Oromus (Post 1443285)
While that does fix this problem, it ONLY fixes it for Eclipse and not for any other programs that may be expecting the JAVA_HOME variable to be pointing a JDK. Correcting the JAVA_HOME variable ensures this issue won't arise on any other programs.

Thou due to Eclipse using JREs, it does not look at the system variable JAVA_HOME so you still need to set the location of the JDK in the preferences of Eclipse if you want to compile the code for the bot in Eclipse using Java

Oromus 13-02-2015 12:05

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Rakusan2 (Post 1443298)
Thou due to Eclipse using JREs, it does not look at the system variable JAVA_HOME so you still need to set the location of the JDK in the preferences of Eclipse if you want to compile the code for the bot in Eclipse using Java

Eclipse DOES look at JAVA_HOME; we had this same issue in the past, fixed our home variable, and everything has worked fine since.

Rakusan2 13-02-2015 12:12

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Oromus (Post 1443304)
Eclipse DOES look at JAVA_HOME; we had this same issue in the past, fixed our home variable, and everything has worked fine since.

Then that is strange since for our team that did not work and as a reason I have been shown this site https://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
which states "Eclipse DOES NOT consult the JAVA_HOME environment variable."

Oromus 13-02-2015 12:15

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Rakusan2 (Post 1443306)
Then that is strange since for our team that did not work and as a reason I have been shown this site https://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
which states "Eclipse DOES NOT consult the JAVA_HOME environment variable."

The error message itself shows that the build failed and suggested the JAVA_HOME variable may need to be corrected. *shrug*

Rakusan2 13-02-2015 12:21

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Oromus (Post 1443307)
The error message itself shows that the build failed and suggested the JAVA_HOME variable may need to be corrected. *shrug*

Yes since Eclipse has its own path for JAVA_HOME and that is located in the preferences

Oromus 13-02-2015 12:27

Re: Problem running Eclipse Code
 
Quote:

Originally Posted by Rakusan2 (Post 1443310)
Yes since Eclipse has its own path for JAVA_HOME and that is located in the preferences

Not entirely correct, since we fixed our problem by correcting our actual JAVA_HOME variable. Anyways, I think we've debated this enough :P I'm outta here.

Rakusan2 13-02-2015 14:05

Re: Problem running Eclipse Code
 
:yikes: Sorry I have just installed Eclipse on a new computer and found out that both methods work so go with with what ever you find the best

Jtbillick 13-02-2015 21:56

Re: Problem running Eclipse Code
 
Thanks for the help. Problem solved, I had Jre 8 instead of jdk in JAVA_HOME.


All times are GMT -5. The time now is 11:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi