facebook

ant build fails, can’t find java compiler [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #203572 Reply

    Steve Bento
    Member

    – System Setup ——————————-
    Operating System and version: XP Pro, SP1
    Eclipse version: 2.1.2
    Eclipse build id: 200311030802
    Fresh Eclipse install (y/n): y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins: oXygen
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*:
    MyEclipse version: 2.6.200
    Eclipse JDK version: 1.4.1_06
    Application Server JDK version: 1.4.1_06
    Are there any exceptions in the Eclipse log file? No

    – Message Body ——————————-

    For about 6mo, I ran Lomboz/oXygen without issues. I liked the features/robustness of MyEclipse, so I’m changing to it. I blew away my old install and did a fresh 2.1.2 and then installed MyEclipse. Everyone else on my team is waiting to see how it goes. Debugging w/Tomcat, everything else I want to do works fine. However, my ant build scripts all fail now (EVERY project!). So it must be something systemic. the error I get is

    [javac] Compiling 3 source files to D:\PVCS\Gadgets\tngAdmin\build
    [javac] BUILD FAILED: file:D:/PVCS/Gadgets/tngAdmin/buildscript/build.xml:169: Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK

    XP environment variables (System and User (I’m trying :?) are:
    JAVA_HOME C:\Java\j2sdk1.4.1_06

    I’m not sure what else to try. We need the ant builds because we build for different environments and the builds are all controlled by properties files…
    Thanks in advance!
    bent-O

    #203614 Reply

    Scott Anderson
    Participant

    bent-O,

    This is interesting. First, none of our software does anything to the external tools environment at all, so it probably is a configuration change that needs to be made to your Ant environment. My guess is that you made a change long ago in your old installation and haven’t done the same thing in the new one. Could you open up Window > Preferences > Ant > Runtime and compare it to either your old install or the settings the rest of your team is using? My bet is that you don’t have tools.jar from your JDK/lib directory on the Ant classpath, since that’s where the Java compiler is located. Adding it explicitly should do the trick.

    #203618 Reply

    Steve Bento
    Member

    Great, the explicit tools.jar did the trick.

    AND, (even tho nobody asked;-), better support that an unnamed product I used to use costing $$$$

    Thanks!

    #203632 Reply

    Scott Anderson
    Participant

    Glad to hear you’re up and running. Now prove to your company how much money you can save them by switching everyone to MyEclipse. 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: ant build fails, can’t find java compiler [Closed]

You must be logged in to post in the forum log in