ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Meakin" <geo...@isocra.com>
Subject RE: Set up ant in Windows 98 environment
Date Tue, 17 Sep 2002 17:48:40 GMT
Sounds like an environment problem

I would *hazard* the following guesses:

Your five "Out of environment space"s correspond to 5 (or possibly 4) .jar
files in your ANT/lib installation- what its 
saying is that your classpath is too big, and it cant append onto the end of
it. Therefore the ANT lib files aren't 
getting included on your classpath, and it wont find the ant main class when
it tries to run it.

This is bound to be a problem on Windows 98, as Windows 98 has really bad
support for environment variables.

Possible solution: set CLASSPATH= before running and try again (i.e. delete
it!), or set CLASSPATH to contain 
the jar files in ANT/lib at the beginning before you run it. Basically
shorten your CLASSPATH- I think Win98 imposes a 
limit of 255 characters on it (but not sure, cos I dont use it)

Hopefully, if its what I think it is, then everything should clear up after
you do this.
Otherwise there are alternative methods of running ANT by defining the
classpath in the ANT_OPTS variable, 
or even using a special java flag "-ext.dirs" (I think, check this!!)  as an
ANT_OPTS variable- which specified a directory
where all jar files should be picked up from, but I guess that's a last
resort.

Hope this is of some help
Cheers
-Geoff


>  -----Original Message-----
> From: 	Balvinder S Sahota [mailto:balu@telus.net] 
> Sent:	17 September 2002 06:41 PM
> To:	ant-user@jakarta.apache.org
> Subject:	Set up ant in Windows 98 environment
> 
> Hi,
> 
> I am a first time user and trying to build a Java application. I am
> getting the following error message when try to compile and run a simple
> program:
> 
> Error Messages are:
>   Out of environment space
>   Out of environment space
>   Out of environment space
>   Out of environment space
>   Out of environment space
>   Exception in thread "main" java.lang.NoclassDefFoundError:
> org/apache/tools/ant/Main
> 
> The build File: build.xml
> Contents: 
> <project default="run" basedir=".">
> 
>   <property name="app.name"  value="MyFstApp"/>
> 
>   <target name="compile" description="* Compiles the source code">
>     <javac srcdir="."/>
>   </target>
> 
>   <target name="run" depends="compile" description="* Executes the
> application">
>     <java  classname="${app.name}"/>
>   </target>
> 
> </project>
> 
> 
> Program File: MyFstApp.java
> Contents:
> public class MyFstApp { 
> 	public static void main( String[] args ) { 
> 		// Display the string.
> 		System.out.println( "This is my first Java application!" ); 
>   	}
> }
> 
> 
> The environment is:
> OS: Windows 98
> Ant Version: Ant 1.5 extracted off jakarta-ant-1.5-bin
> Java Version: j2sdk1.4.0_02 extracted off j2sdk-1_4_0_02-windows-i586
> 
> Setting in autoexec.bat file are:
> SET ANT_HOME=c:\ant15
> SET JAVA_HOME=c:\j2s14002
> SET CLASSPATH=c:\LrngJava\lab
> SET PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin
> 
> I have no problem in compiling and running MyFstApp on command line by
> using: 
> 
>  javac MyFstApp.java
>  java MyFstApp
> 
> But when I try to use ant, I get the above mentioned error. Your help to
> get me going will be highly appreciated.
> 
> Best regards,
> Bal.
>  << File: ATT00007.txt >> 

Mime
View raw message