[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debugging a java programme



Rafael Fontenelle wrote:
2008/4/25, andy <geek_show@dsl.pipex.com>:
Hello

I tried to run a java-based programme on a Lenny machine. This is what happened:

$ java jgraphpad-6.0.4.1-gpl.jar
Exception in thread "main" java.lang.NoClassDefFoundError: jgraphpad-6.0.4.1-gpl.jar
 at gnu.java.lang.MainThread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: jgraphpad-6.0.4.1-gpl.jar not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
 at java.net.URLClassLoader.findClass(libgcj.so.90)
 at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
 at java.lang.ClassLoader.loadClass(libgcj.so.90)
 at java.lang.ClassLoader.loadClass(libgcj.so.90)
 at gnu.java.lang.MainThread.run(libgcj.so.90)
$

Is this because I invoked the programme incorrectly or am I missing some libraries?

I'd appreciate any assistance as I need this programme for my studies.

Many thanks

Andy



--

"If they can get you asking the wrong questions, they don't have to worry about the answers." - Thomas Pynchon, "Gravity's Rainbow"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Hi there.

I'm don't know much about running java in command-line, but I think the problem is that you didn't call the classpath. Firstly, is CLASSPATH environment variable set (Try echo $CLASSPATH)? Secondly, I think you should run java with the "-classpath" switch. Not sure, but the command might look like this:

java -classpath #CLASSPATH,<your_jar> <your_jar>

Try it out let us know.

Cheers,

Rafael
Hi Rafael & Linc

Thanks for your rapid responses to my distress call!

Rafael, I ran echo $CLASSPATH and there was no output; the cursor just jumped to the next line waiting for further input.

Linc, I used your suggestion about running it  java -jar and had *some* progress - a window popped up, albeit there was no text in it and nothing further happened.

So I downloaded a related application (an earlier version) and tried java -jar emsim.jar and this was the output:

$ java -jar emsim.jar
Exception during event dispatch:
java.lang.ArithmeticException: / by zero
   at javax.swing.text.PlainView.paint(libgcj.so.90)
   at javax.swing.text.FieldView.paint(libgcj.so.90)
   at javax.swing.plaf.basic.BasicTextUI$RootView.paint(libgcj.so.90)
   at javax.swing.plaf.basic.BasicTextUI.paintSafely(libgcj.so.90)
   at javax.swing.plaf.basic.BasicTextUI.paint(libgcj.so.90)
   at javax.swing.plaf.basic.BasicTextUI.update(libgcj.so.90)
   at javax.swing.JComponent.paintComponent(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at javax.swing.JLayeredPane.paint(libgcj.so.90)
   at javax.swing.JComponent.paintChildren(libgcj.so.90)
   at javax.swing.JComponent.paintDoubleBuffered(libgcj.so.90)
   at javax.swing.JComponent.paint(libgcj.so.90)
   at java.awt.Container$GfxPaintVisitor.visit(libgcj.so.90)
   at java.awt.Container.visitChild(libgcj.so.90)
   at java.awt.Container.visitChildren(libgcj.so.90)
   at java.awt.Container.paint(libgcj.so.90)
   at gnu.java.awt.peer.gtk.GtkComponentPeer.paintComponent(libgcj.so.90)
   at gnu.java.awt.peer.gtk.GtkComponentPeer.handleEvent(libgcj.so.90)
   at java.awt.Component.dispatchEventImpl(libgcj.so.90)
   at java.awt.Container.dispatchEventImpl(libgcj.so.90)
   at java.awt.Window.dispatchEventImpl(libgcj.so.90)
   at java.awt.Component.dispatchEvent(libgcj.so.90)
   at java.awt.EventQueue.dispatchEvent(libgcj.so.90)
   at java.awt.EventDispatchThread.run(libgcj.so.90)
Killed

I killed it with Ctrl+c because while there was some text in the dialogue box, nothing else was happening making it pretty unusable.

So, considering that echo $CLASSPATH produced no output, what should I have seen? The documents with the programme aren't very helpful - they assume that the programme is up and running first, and go into the nuts and bolts of how to use the programme. Because it is quite a specialised programme, there is next to nothing on the web that addresses my question either, so at this point in time, I'm pretty much willing to try what I can to get this up and going.

Could it be something to do with the Java environment I am using, perhaps?

Thanks

Andy




-- 

"If they can get you asking the wrong questions, they don't have to worry about the answers." - Thomas Pynchon, "Gravity's Rainbow"

Reply to: