ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Reeder <travis.ree...@ecommstats.com>
Subject Re: Javac problem
Date Wed, 14 Jul 2004 00:29:37 GMT
i can run javac and everything from new shell, and the which finds it in 
the right location, but I did another echo for java.class.path and it 
shows as this:

[echo] Classpath: .

And yes that is a symlink, if I do the ant 
-Djava.home=/usr/java/j2sdk1.4.2_05 I still get the same thing.

BUILD FAILED
file:/home/v1/build.xml:36: 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

Travis Reeder
Ecommstats Web Analytics



Doug Lochart wrote:

>Travis,
>
>Simple Question.  Can you open a new shell and run javac -version without
>having to manually set anything in your environment?
>If you can run the exe ... then at least its in your path.  Next do a
>"which" or "whereis" command on javac and check it against the value of
>JAVA_HOME to verify that the JAVA_HOME is pointing to a valid installation.
>Next run ant-diagnostics in your shell and see what it says for java.home.
>If all that is fine then something else is awry that I cannot deduce without
>more info.  If all else fails you should be able to simply run ant like this
>to override the java.home:
>
>ant -Djava.home=/usr/java/jdk
>
>Is this value a symlink?  If so do you have access to it?
>
>Doug
>
>
>
>
>Now I've gained some understanding
>Of the only world that we see.
>Things that I once dreamed of
>Have become reality.
>
>These walls that still surround me
>Still contain the same old me,
>Just one more who's searching for
>A world that ought to be.
>----- Original Message ----- 
>From: "Travis Reeder" <travis.reeder@ecommstats.com>
>To: "Ant Users List" <user@ant.apache.org>
>Sent: Tuesday, July 13, 2004 3:53 PM
>Subject: Re: Javac problem
>
>
>  
>
>>Hi Doug, running on Redhat 9 Enterprise, used export to set the vars and
>>also have them in .bash_profile so new shells have correct path set.
>>Unless I'm doing something totally wrong, but I check it by running
>>export and set to view the variables and they both are set correctly.
>>Is there anywhere else I should be doing the export?
>>
>>Travis Reeder
>>Ecommstats Web Analytics
>>
>>
>>Doug Lochart wrote:
>>
>>    
>>
>>>Without more info the only thing I can suggest is that if you are running
>>>      
>>>
>on
>  
>
>>>a Unix system AND you are running ant from a shell that used SET
>>>JAVA_HOME=... to set the env variable then you will have to use export
>>>JAVA_HOME=... instead so that the new shell that is created for ANT will
>>>pick up the environment.   When/if you reply back please be more specific
>>>      
>>>
>on
>  
>
>>>your operating environment.
>>>
>>>HTH
>>>
>>>Doug
>>>
>>>
>>>Now I've gained some understanding
>>>Of the only world that we see.
>>>Things that I once dreamed of
>>>Have become reality.
>>>
>>>These walls that still surround me
>>>Still contain the same old me,
>>>Just one more who's searching for
>>>A world that ought to be.
>>>----- Original Message ----- 
>>>From: "Travis Reeder" <travis.reeder@ecommstats.com>
>>>To: <user@ant.apache.org>
>>>Sent: Tuesday, July 13, 2004 3:22 PM
>>>Subject: Javac problem
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>I have the following settings in set:
>>>>JAVA_HOME=/usr/java/jdk
>>>>
>>>>When I run a compile task that looks like this my build.xml:
>>>>
>>>><javac srcdir="${src.dir}" destdir="${build.dir}" debug="off"
>>>>deprecation="off" optimize="off" compiler="modern" >
>>>>           <classpath refid="core.class.path"/>
>>>>       </javac>
>>>>
>>>>I get this:
>>>>
>>>>compile:
>>>>    [echo] Java Home: /usr
>>>>   [javac] Compiling 133 source files to /home/v1/web/WEB-INF/classes
>>>>
>>>>BUILD FAILED
>>>>file:/home/v1/build.xml:33: 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
>>>>
>>>>The echo above is what ant sees as java.home property.  Why would it be
>>>>set to that when I have JAVA_HOME set to the correct location?
>>>>
>>>>Travis
>>>>
>>>>-- 
>>>>Travis Reeder
>>>>Ecommstats Web Analytics
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>>For additional commands, e-mail: user-help@ant.apache.org
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message