Hello, I am new to ant. Thank in advance for any helps. My problem is I can not run my java file "hello.class" by using the jar file construct by ant build.xml. However I can successfully run it by using my .class file directly. The error message prompt by ant like this:
Here is my build.xml using my jar to run:
Hoever, it runs fine while I directly run the .class file under my "myclass" folder using the following code:
Any one? Thanks again. [ February 18, 2004: Message edited by: Aiping Zhou ]
Tony Yan
Ranch Hand
Joined: Apr 10, 2002
Posts: 170
posted
0
Make sure Hello is spelled right. Case Sensitivity problem?
Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
Aiping Zhou
Greenhorn
Joined: Sep 06, 2003
Posts: 24
posted
0
I tried both, the results are same.
Tony Yan
Ranch Hand
Joined: Apr 10, 2002
Posts: 170
posted
0
Not sure. First make sure that the jar file in ${build} does contain your hello.class file in the right path ( root if default-packaged). Then, may be trying some different format of java task, like this: <java classname="test.Main"> <arg value="-h"/> <classpath> <pathelement location="dist/test.jar"/> <pathelement path="${java.class.path}"/> </classpath> </java>