Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant xml script & javac + JAVA_HOME classpath

 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse and a build.xml to build an EJB jar.

In my build.xml I have

On running the xml script. I get following error.



In my Environment Variables i do have the entry for JAVA_HOME and it is for JDK only and not JRE. Where is the problem?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that Eclipse is running with a JRE and that is what is being use to run Ant. To fix this, do one of the following:

a) Change the eclipse.ini file to use a JDK. See http://www.coderanch.com/t/488574/vc/Eclipse-running-JRE-but-JDK#2529046

b) Add the JDK to Eclipse preferences under Installed JREs. Then either make that JDK the default, or change the project to use that JDK.

P.S. Eclipse ignores JAVA_HOME.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter. I had close and re-open Eclipse and found the Environment Varaible JAVA_HOME came into effect.

By the way where can we change the same in eclipse. ini

here?

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akhilesh Trivedi wrote:By the way where can we change the same in eclipse. ini

Did you look at the link I provided? At the whole discussion?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic