I need some help understanding some java results. I am not a java expert.
I am trying to run antelope from a download. Antelope is a java ant buildfile editor. I have run into a problem and would like to learn from solving it.
My understanding of the traceback below is that java complains that it can not find org.apache.tools.ant.input.InputHandler
. Maybe I don't interpret the trace-back correctly – my how complex they have become since the introduction of thrown exceptions.
I find the class Input.InputHandler in a number of ant.jar files. I have tried in various ways to point to these jar files – no result. In this case I extracted the class file from one of the jar files, put it in the same directory as the antelope.jar file and gave option -cp InputHandler – and still I get the same error.
Can someone give me some suggestions?
Dick
Code:
## here is what is in the directory
[knox@knox AntelopeApp_3.5.1]$ ls
AntelopeApp.jar ChangeLog.txt InputHandler.class install.txt javad license.txt preftool.preferences run.xml
## here I invoke java
[knox@knox AntelopeApp_3.5.1]$ java -cp InputHandler -jar AntelopeApp.jar
## here is what it says to me
ANT_HOME: /usr/share/ant/lib
JAVA_HOME: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
Antelope debug log: /home/knox/antelope_debug.log
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at ise.antelope.launcher.SubJarClassLoader.invokeMainClass(Unknown Source)
at ise.antelope.launcher.Launcher.runApp(Unknown Source)
at ise.antelope.launcher.Launcher.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/input/InputHandler
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.lang.ClassLoader.defineClass(ClassLoader.java:480)
at ise.antelope.launcher.SubJarClassLoader.findClass(Unknown Source)
at ise.antelope.launcher.SubJarClassLoader.loadClass(Unknown Source)
at ise.antelope.launcher.SubJarClassLoader.loadClass(Unknown Source)
at ise.antelope.app.Antelope.init(Unknown Source)
at ise.antelope.app.Antelope.<init>(Unknown Source)
at ise.antelope.app.Antelope.main(Unknown Source)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.input.InputHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at ise.antelope.launcher.SubJarClassLoader.loadClass(Unknown Source)
at ise.antelope.launcher.SubJarClassLoader.loadClass(Unknown Source)
... 16 more
[knox@knox AntelopeApp_3.5.1]$