Go to Post Don't criticize them for what they have, learn from what they do. - xSAWxBLADEx [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2015, 22:34
Jtbillick Jtbillick is offline
Registered User
FRC #4780
 
Join Date: Jan 2015
Location: Ohio
Posts: 18
Jtbillick is an unknown quantity at this point
Problem running Eclipse Code

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!Click image for larger version

Name:	image.jpg
Views:	45
Size:	1.49 MB
ID:	18311

Last edited by Jtbillick : 12-02-2015 at 22:35. Reason: Spelling error
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2015, 22:39
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: Problem running Eclipse Code

Quote:
Originally Posted by Jtbillick View Post
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
Reply With Quote
  #3   Spotlight this post!  
Unread 12-02-2015, 23:11
cad321 cad321 is offline
Jack of all trades, Master of none
AKA: Brian Wagg
FRC #2386 (Trojans)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Burlington, Ontario
Posts: 320
cad321 is just really nicecad321 is just really nicecad321 is just really nicecad321 is just really nice
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2015, 10:21
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 80
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2015, 11:12
Rakusan2 Rakusan2 is offline
Registered User
AKA: Tomas Rakusan
FRC #3571 (Milton Mustangs)
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2011
Location: Milton, ON, Canada
Posts: 22
Rakusan2 is an unknown quantity at this point
Re: Problem running Eclipse Code

Quote:
Originally Posted by Oromus View Post
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

Last edited by Rakusan2 : 13-02-2015 at 11:16. Reason: missed couple of steps
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2015, 11:48
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 80
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Problem running Eclipse Code

Quote:
Originally Posted by Rakusan2 View Post
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2015, 12:02
Rakusan2 Rakusan2 is offline
Registered User
AKA: Tomas Rakusan
FRC #3571 (Milton Mustangs)
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2011
Location: Milton, ON, Canada
Posts: 22
Rakusan2 is an unknown quantity at this point
Re: Problem running Eclipse Code

Quote:
Originally Posted by Oromus View Post
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
Reply With Quote
  #8   Spotlight this post!  
Unread 13-02-2015, 12:05
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 80
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Problem running Eclipse Code

Quote:
Originally Posted by Rakusan2 View Post
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.
Reply With Quote
  #9   Spotlight this post!  
Unread 13-02-2015, 12:12
Rakusan2 Rakusan2 is offline
Registered User
AKA: Tomas Rakusan
FRC #3571 (Milton Mustangs)
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2011
Location: Milton, ON, Canada
Posts: 22
Rakusan2 is an unknown quantity at this point
Re: Problem running Eclipse Code

Quote:
Originally Posted by Oromus View Post
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."
Reply With Quote
  #10   Spotlight this post!  
Unread 13-02-2015, 12:15
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 80
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Problem running Eclipse Code

Quote:
Originally Posted by Rakusan2 View Post
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*
Reply With Quote
  #11   Spotlight this post!  
Unread 13-02-2015, 12:21
Rakusan2 Rakusan2 is offline
Registered User
AKA: Tomas Rakusan
FRC #3571 (Milton Mustangs)
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2011
Location: Milton, ON, Canada
Posts: 22
Rakusan2 is an unknown quantity at this point
Re: Problem running Eclipse Code

Quote:
Originally Posted by Oromus View Post
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
Reply With Quote
  #12   Spotlight this post!  
Unread 13-02-2015, 12:27
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 80
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Problem running Eclipse Code

Quote:
Originally Posted by Rakusan2 View Post
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 I'm outta here.
Reply With Quote
  #13   Spotlight this post!  
Unread 13-02-2015, 14:05
Rakusan2 Rakusan2 is offline
Registered User
AKA: Tomas Rakusan
FRC #3571 (Milton Mustangs)
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2011
Location: Milton, ON, Canada
Posts: 22
Rakusan2 is an unknown quantity at this point
Re: Problem running Eclipse Code

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
Reply With Quote
  #14   Spotlight this post!  
Unread 13-02-2015, 21:56
Jtbillick Jtbillick is offline
Registered User
FRC #4780
 
Join Date: Jan 2015
Location: Ohio
Posts: 18
Jtbillick is an unknown quantity at this point
Re: Problem running Eclipse Code

Thanks for the help. Problem solved, I had Jre 8 instead of jdk in JAVA_HOME.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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