Author
Error running javac.exe compiler
Muhammad Saifuddin
Ranch Hand
Joined: Dec 06, 2005
Posts: 1291
Hi Ranchers,
I'm using Eclipse Version: 3.4.2 in my machine.
Jdk version "1.6.0_12".
Apache Ant version 1.7.1 compiled on June 27 2008
At the time of run Ant script inside eclipse I am getting this error..
E:\workspace\myproject\build.xml:230: Error running javac.exe compiler
however when I run this Ant from command prompt it run fine.
any Idea why this error is occur ?
Thanks in Advance.
Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 23616
Muhammad,
Eclipse uses different Ant variable values. Check in your workspace to see if javac 1.6 is in the path.
[Blog ] [JavaRanch FAQ ] [How To Ask Questions The Smart Way ] [Book Promos ]
Certs: SCEA Part 1 , Part 2 & 3 & Core Spring 3 , OCAJP
Geoffrey Falk
Ranch Hand
Joined: Aug 17, 2001
Posts: 167
posted Mar 27, 2009 21:36:25
0
I had the same problem. The solution is to add JAVA_HOME/bin to your PATH.
Here are the steps for Windows:
- Right click "My Computer" and go to "Properties"
- Select the "Advanced" tab
- Hit "Environment Variables" button
- Make sure you have an entry for JAVA_HOME . It points to the path where you installed the JDK.
- Append to the PATH: ;%JAVA_HOME%/bin
On Linux/Unix, edit .bash_profile :
export JAVA_HOME=/usr/local/jdk1.6.0_03
export PATH=${PATH}:${JAVA_HOME}/bin
Note: If you have multiple JRE/JDKs installed, you may need to move this entry earlier in the PATH.
This should also fix the <javadoc> task.
Good luck,
Geoffrey
Sun Certified Programmer for the Java 2 Platform
Muhammad Saifuddin
Ranch Hand
Joined: Dec 06, 2005
Posts: 1291
Ahh.. I got your point.
Thanks for your help guys.
subject: Error running javac.exe compiler