• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error running javac.exe compiler

 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Muhammad,
Eclipse uses different Ant variable values. Check in your workspace to see if javac 1.6 is in the path.
 
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ahh.. I got your point.
Thanks for your help guys.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic