FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-25-2008, 05:13 PM
andy
 
Default Debugging a java programme

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
 
Old 04-25-2008, 05:29 PM
"Rafael Fontenelle"
 
Default Debugging a java programme

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
 
Old 04-25-2008, 06:02 PM
andy
 
Default 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(lib gcj.so.90)

** at javax.swing.plaf.basic.BasicTextUI.paint(libgcj.so .90)

** at javax.swing.plaf.basic.BasicTextUI.update(libgcj.s o.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.paintCompon ent(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"
 
Old 04-26-2008, 05:58 PM
Andrew Sackville-West
 
Default Debugging a java programme

On Fri, Apr 25, 2008 at 06:13:29PM +0100, andy wrote:
> 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

you need to specify that you are trying to run a /jar file. try:

java -jar 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)

the jvm is trying to run a java class called jgraphpad-0.6....jar
which isn't a proper java class... the above -jar switch should fix it
up.

this assumes that you actually have a properly specified jar file that
is designed to be run this way. It may not be.

You could just unjar it and inspect it for more details.

jar -xvf jgraph<Tab>

cd into the directory and look around.

A
 
Old 04-28-2008, 03:47 PM
andy
 
Default Debugging a java programme

Andrew Sackville-West wrote:

On Fri, Apr 25, 2008 at 06:13:29PM +0100, andy wrote:


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



you need to specify that you are trying to run a /jar file. try:

java -jar 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)



the jvm is trying to run a java class called jgraphpad-0.6....jar
which isn't a proper java class... the above -jar switch should fix it
up.

this assumes that you actually have a properly specified jar file that
is designed to be run this way. It may not be.

You could just unjar it and inspect it for more details.


jar -xvf jgraph<Tab>

cd into the directory and look around.


A


Hi all

At work today I downloaded and ran the emsim.jar program and on an XP
machine it ran perfectly. What I don't understand is how, when Java was
created to be platform independent, does it crash and burn on Debian
where I have (AFAIK) all of the relevant program libraries, but on XP it
does what it is supposed to do.


How do I go about checking out what libraries this Java program needs
and which of those my Debian installation can satisfy?


TIA

Andy the frustrated

--

"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
 
Old 04-29-2008, 01:43 AM
lincolnr
 
Default Debugging a java programme

On Mon, Apr 28, 2008 at 04:47:21PM +0100, andy wrote:
> Andrew Sackville-West wrote:
>> On Fri, Apr 25, 2008 at 06:13:29PM +0100, andy wrote:
> Hi all
>
> At work today I downloaded and ran the emsim.jar program and on an XP
> machine it ran perfectly. What I don't understand is how, when Java was
> created to be platform independent, does it crash and burn on Debian where
> I have (AFAIK) all of the relevant program libraries, but on XP it does
> what it is supposed to do.
>
> How do I go about checking out what libraries this Java program needs and
> which of those my Debian installation can satisfy?
>
> TIA
>
> Andy the frustrated
>
Hi Andy,
It looks like the GNU gcj java support does not do SWING? You have a couple of options: investigate SWING support for gcj ( I do not know if it is supported or not ) , or install the sun java package via apt. Make sure if you install the sun java you remember update-alternatives to select the sun java javac jar etcetera

I have the sun java for my J2ME playtime project and it works fine.

Linc


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 06:31 AM
andy
 
Default Debugging a java programme

lincolnr wrote:

On Mon, Apr 28, 2008 at 04:47:21PM +0100, andy wrote:


Andrew Sackville-West wrote:


On Fri, Apr 25, 2008 at 06:13:29PM +0100, andy wrote:


Hi all

At work today I downloaded and ran the emsim.jar program and on an XP
machine it ran perfectly. What I don't understand is how, when Java was
created to be platform independent, does it crash and burn on Debian where
I have (AFAIK) all of the relevant program libraries, but on XP it does
what it is supposed to do.

How do I go about checking out what libraries this Java program needs and
which of those my Debian installation can satisfy?

TIA

Andy the frustrated



Hi Andy,
It looks like the GNU gcj java support does not do SWING? You have a couple of options: investigate SWING support for gcj ( I do not know if it is supported or not ) , or install the sun java package via apt. Make sure if you install the sun java you remember update-alternatives to select the sun java javac jar etcetera

I have the sun java for my J2ME playtime project and it works fine.

Linc




Hi Linc



Thanks for coming back to me on this. I ran apt-cache search sun and
this was the output:



sun-java5-bin - Sun Java(TM) Runtime Environment (JRE) 5.0
(architecture dependent files)

sun-java5-demo - Sun Java(TM) Development Kit (JDK) 5.0 demos and
examples

sun-java5-doc - Sun JDK(TM) Documention -- integration installer

sun-java5-fonts - Lucida TrueType fonts (from the Sun JRE)

sun-java5-jdk - Sun Java(TM) Development Kit (JDK) 5.0

sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0
(architecture independent files)

sun-java5-plugin - The Java(TM) Plug-in, Java SE 5.0

sun-java5-source - Sun Java(TM) Development Kit (JDK) 5.0 source files

sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture
dependent files)

sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples

sun-java6-doc - Sun JDK(TM) Documention -- integration installer

sun-java6-fonts - Lucida TrueType fonts (from the Sun JRE)

sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6

sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture
independent files)

sun-java6-plugin - The Java(TM) Plug-in, Java SE 6

sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files



I recognise that there are two groups java5 and java6. My inclination
is to go for java6, but are there specific packages required that you
have in mind wrt your recommendation?



Cheers



Andy



--

"If they can get you asking the wrong questions, they don't have to worry about the answers." - Thomas Pynchon, "Gravity's Rainbow"
 
Old 04-29-2008, 04:20 PM
andy
 
Default Debugging a java programme

lincolnr wrote:

On Tue, Apr 29, 2008 at 07:31:50AM +0100, andy wrote:


Hi Linc

Thanks for coming back to me on this. I ran apt-cache search sun and this
was the output:

sun-java5-bin - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture
dependent files)
sun-java5-demo - Sun Java(TM) Development Kit (JDK) 5.0 demos and examples
sun-java5-doc - Sun JDK(TM) Documention -- integration installer
sun-java5-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java5-jdk - Sun Java(TM) Development Kit (JDK) 5.0
sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture
independent files)
sun-java5-plugin - The Java(TM) Plug-in, Java SE 5.0
sun-java5-source - Sun Java(TM) Development Kit (JDK) 5.0 source files
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture
dependent files)
sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples
sun-java6-doc - Sun JDK(TM) Documention -- integration installer
sun-java6-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture
independent files)
sun-java6-plugin - The Java(TM) Plug-in, Java SE 6
sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files

I recognise that there are two groups java5 and java6. My inclination is to
go for java6, but are there specific packages required that you have in
mind wrt your recommendation?

Cheers

Andy



Hi Andy,
The safe way to go would be java5, as there are a lot of things that don't like java6. If you install the sun-java5-jdk package, I think it will install the rest as dependencies.

Then you will probably need to run update-alternatives --config java, update-alternatives --config javac, update alternatives --config jar, and select the sun versions as default. Then your system will automatically use the sun java components and not the GNU java implementation.

Good luck!

Linc




Linc



That worked like a charm!! Thank you so very much for your patience and
help. I owe you a debt of gratitude.



I know that sometimes old timers get frustrated with n00bs such as
myself, so I am really very appreciative of you working with me as you
have done in resolving this issue. I've taken the liberty of posting
this to the Deb list for the archive just in case someone in the future
needs this info and you aren't available to help them out then.



Many, many thanks



Best wishes



Andy



--

"If they can get you asking the wrong questions, they don't have to worry about the answers." - Thomas Pynchon, "Gravity's Rainbow"
 
Old 06-14-2008, 12:46 AM
"Anooshiravan Merat"
 
Default Debugging a java programme

you need to specify that you are trying to run a /jar file. try:

java -jar jgraphpad-6.0.4.1-gpl.jar

----
Anooshiravan Merat


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

Thread Tools




All times are GMT. The time now is 09:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org