ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nathan le <nathania...@yahoo.co.uk>
Subject [Ant 1.6.5] -classpath problems
Date Mon, 08 Aug 2005 21:47:49 GMT
Hi,

I couldnt find anything to help me when searching the
archives/bug DB

I am trying to add some classpaths but when I try to
run ant it complains that the jar file cannot be found

I have checked spelling and that the jar file exists

If anyone has had similar problems pls can you help

Cheers

Nate

NB As a test I wrote a java class to load a class and
print out a message if it fails and then tried to use
both the cp classpath and lib flags

none work

Figure 1. Test class
public class Test {
public static void main(String[] args) {
	Test test = new Test();
	ClassLoader loader =
test.getClass().getClassLoader();
	try {
loader.loadClass("org.eclipse.core.launcher.Main");
	}
	catch(ClassNotFoundException ecnf)
	{
	System.out.println("CLASS NOT FOUND");
	}
}

Figure 2. testBuild.xml
<project name="MyProject" default="main" basedir=".">

<target name="main">
<java classname="Test">
<classpath location="."/>
</java>
</target>

</project>

Figure 3. update.bat
SET ANT_OPTS=-cp "E:\IDE\eclipse\eclipse\startup.jar"

ant -buildfile "testBuild.xml" -lib
"E:\IDE\eclipse\eclipse\startup.jar" -verbose -debug

I need to point to some JARs that hold some java
logging handlers. Thats the point behind this.


	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message