ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: beginners problem: unable to find compile...
Date Wed, 22 Sep 2004 15:29:25 GMT
1. if possible update to Ant 1.6.2 :)
2. you dont have to copy anything into %anthome%\lib any more; external jars
should be
   copied into %userhome%\.ant\lib (since 1.6); never heard that tools.jar
should be
   copied into \lib ...
3. are you REALLY using a JDK? look for %JAVA_HOME%\lib\tools.jar ...
4. try a very small example

public class Test {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}

<project name="test" basedir="." default="run">
    <target name="compile">
        <javac srcdir="." destdir="." includes="Test.java"/>
    </target>
    <target name="run" depends="compile">
        <java classname="Test" classpath="."/>
    </target>
</project>


Jan

> -----Urspr√ľngliche Nachricht-----
> Von: james.burton@brighton-hove.gov.uk
> [mailto:james.burton@brighton-hove.gov.uk]
> Gesendet am: Mittwoch, 22. September 2004 17:10
> An: user@ant.apache.org
> Betreff: beginners problem: unable to find compile...
> 
> I am using ant 1.5 and for compile tasks I get the error:
> 
> ...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
> 
> when trying to compile anything. JAVA_HOME is set to my sdk 
> home, CLASSPATH
> is not set, ANT_HOME is correct. I've read a ton of posts 
> about this, all
> of which say to copy tools.jar into $ANT_HOME/lib - I've done that and
> still got the problem.
> 
> this is the output of ant -diagnostics:
> 
> ------- Ant diagnostics report -------
> Apache Ant version 1.5 compiled on July 9 2002
> 
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.5
> optional tasks : not available
> 
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.jar (732490 bytes)
> optional.jar (668804 bytes)
> xercesImpl.jar (885250 bytes)
> xml-apis.jar (108484 bytes)
> 
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> propertyfile : Not Available
> vsscheckin : Not Available
> p4reopen : Not Available
> csc : Not Available
> wlrun : Not Available
> p4label : Not Available
> p4revert : Not Available
> replaceregexp : Not Available
> get : Not Available
> jjtree : Not Available
> jarlib-display : Not Available
> jspc : Not Available
> test : Not Available
> vsshistory : Not Available
> icontract : Not Available
> p4submit : Not Available
> ccmcheckin : Not Available
> p4change : Not Available
> p4delete : Not Available
> vssadd : Not Available
> translate : Not Available
> vajload : Not Available
> jarlib-available : Not Available
> WsdlToDotnet : Not Available
> jpcovmerge : Not Available
> ejbjar : Not Available
> stlist : Not Available
> serverdeploy : Not Available
> cccheckin : Not Available
> wljspc : Not Available
> telnet : Not Available
> sosget : Not Available
> p4sync : Not Available
> p4edit : Not Available
> maudit : Not Available
> antlr : Not Available
> netrexxc : Not Available
> ftp : Not Available
> jpcovreport : Not Available
> ccmcheckout : Not Available
> xmlvalidate : Not Available
> iplanet-ejbc : Not Available
> ccmcheckintask : Not Available
> native2ascii : Not Available
> starteam : Not Available
> vsscheckout : Not Available
> soscheckin : Not Available
> stylebook : Not Available
> mimemail : Not Available
> stlabel : Not Available
> cab : Not Available
> splash : Not Available
> cccheckout : Not Available
> p4have : Not Available
> jdepend : Not Available
> script : Not Available
> ccmcreatetask : Not Available
> rpm : Not Available
> mmetrics : Not Available
> echoproperties : Not Available
> junit : Not Available
> stcheckin : Not Available
> vajexport : Not Available
> stcheckout : Not Available
> vsscreate : Not Available
> ejbc : Not Available
> wsdltodotnet : Not Available
> junitreport : Not Available
> ccupdate : Not Available
> renameext : Not Available
> vsslabel : Not Available
> vsscp : Not Available
> vajimport : Not Available
> setproxy : Not Available
> wlstop : Not Available
> p4counter : Not Available
> ilasm : Not Available
> soscheckout : Not Available
> jarlib-resolve : Not Available
> ccuncheckout : Not Available
> jlink : Not Available
> javacc : Not Available
> jarlib-manifest : Not Available
> pvcs : Not Available
> sound : Not Available
> mparse : Not Available
> blgenclient : Not Available
> javah : Not Available
> ccmreconfigure : Not Available
> p4add : Not Available
> soslabel : Not Available
> jpcoverage : Not Available
> depend : Not Available
> vssget : Not Available
> ddcreator : Not Available
> 
> -------------------------------------------
>  org.apache.env.Which diagnostics
> -------------------------------------------
> Not available.
> Download it at http://xml.apache.org/commons/
> 
> -------------------------------------------
>  System properties
> -------------------------------------------
> java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
> sun.boot.library.path : C:\j2sdk1.4.2_02\jre\bin
> java.vm.version : 1.4.2_02-b03
> java.vm.vendor : Sun Microsystems Inc.
> java.vendor.url : http://java.sun.com/
> path.separator : ;
> java.vm.name : Java HotSpot(TM) Client VM
> file.encoding.pkg : sun.io
> user.country : GB
> sun.os.patch.level : Service Pack 4
> java.vm.specification.name : Java Virtual Machine Specification
> user.dir : C:\Documents and Settings\jamesburton\My
> Documents\java\src\dbmonitor
> java.runtime.version : 1.4.2_02-b03
> java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
> java.endorsed.dirs : C:\j2sdk1.4.2_02\jre\lib\endorsed
> os.arch : x86
> java.io.tmpdir : C:\DOCUME~1\JAMESB~1\LOCALS~1\Temp\
> line.separator :
> 
> java.vm.specification.vendor : Sun Microsystems Inc.
> user.variant :
> os.name : Windows 2000
> ant.home : C:\apache\ant
> sun.java2d.fontpath :
> java.library.path :
> C:\j2sdk1.4.2_02\bin;.;C:\WINNT\system32;C:\WINNT;.;C:\Perl\bi
> n\;C:\Perl\5.00502\bin\MSWin32-x86-object;C:\Perl\5.00502\bin;
> C:\j2sdk1.4.2_02\bin;C:\oracle\ora92\bin;C:\Program
>  Files\Oracle\jre\1.3.1\bin;C:\Program
> Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT
> \System32\Wbem;C:\WINNT\system32\nls;C:\WINNT\system32\nls\ENG
> LISH;C:\ORACLE\ORA92\JDBC\LIB\CLASSES12.JAR;C:\apache\ant\bin;
> C:\PROGRA~1\XRAY;C:\Program
>  Files\Common Files\GTK\2.0\bin;C:\cygwin\bin;C:\Lynx;C:\Documents and
> Settings\jamesburton\bin;Z:.;Y:.;
> java.specification.name : Java Platform API Specification
> java.class.version : 48.0
> java.util.prefs.PreferencesFactory :
> java.util.prefs.WindowsPreferencesFactory
> os.version : 5.0
> user.home : C:\Documents and Settings\jamesburton
> user.timezone :
> java.awt.printerjob : sun.awt.windows.WPrinterJob
> file.encoding : Cp1252
> java.specification.version : 1.4
> java.class.path :
> C:\j2sdk1.4.2_02\lib\tools.jar;C:\apache\ant\lib\xml-apis.jar;
> C:\apache\ant\lib\xercesImpl.jar;C:\apache\ant\lib\optional.ja
> r;C:\apache\ant\lib\ant.jar;%CLASSPATH%;C:\ORACLE\ORA92\JDBC\L
> IB\CLASSES12.JAR
> user.name : jamesburton
> java.vm.specification.version : 1.0
> java.home : C:\j2sdk1.4.2_02\jre
> sun.arch.data.model : 32
> user.language : en
> java.specification.vendor : Sun Microsystems Inc.
> awt.toolkit : sun.awt.windows.WToolkit
> java.vm.info : mixed mode
> java.version : 1.4.2_02
> java.ext.dirs : C:\j2sdk1.4.2_02\jre\lib\ext
> sun.boot.class.path :
> C:\j2sdk1.4.2_02\jre\lib\rt.jar;C:\j2sdk1.4.2_02\jre\lib\i18n.
> jar;C:\j2sdk1.4.2_02\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_02\j
> re\lib\jsse.jar;C:\j2sdk1.4.2_02\jre\lib\jce.jar;C:\j2sdk1.4.2
> _02\jre\lib\charsets.jar;C:\j2sdk1.4.2_02\jre\classes
> java.vendor : Sun Microsystems Inc.
> file.separator : \
> java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
> sun.io.unicode.encoding : UnicodeLittle
> sun.cpu.endian : little
> sun.cpu.isalist : pentium i486 i386
> 
> 
> Thanks!
> 
> 
>                        
>  James Burton          
>                        
>  Web Developer         
>                        
>  Database and          
>  Development           
>                        
>  Cultural Services     
>                        
>  Brighton & Hove City  
>  Council               
>                        
>  tel: 01273 293594     
>                        
> 
> 
> 
> 
> ______________________________________________________________________
> Notice to recipient:
> The information contained in this electronic mail message is 
> intended only
> for the use of the individual to whom it is addressed and may contain
> information which is privileged and confidential, the 
> disclosure of which
> is prohibited by law.  If the reader of this message is not 
> the intended
> recipient, please note that any dissemination, distribution 
> or copying of
> this communication is strictly prohibited.  If you have received this
> communication in error please notify the sender immediately.  
> Thank you in
> anticipation of your co-operation.
> 
> You can visit our website at http://www.brighton-hove.gov.uk
> 
> Please consider the environment, only print out this email if 
> absolutely
> necessary.
> 
> 
> 
> ---------------------------------------------------------------------
> 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