Problems with JRE

A

Amit

So I have created and compiled a simple helloworld program using java.
It runs on my computer when i type java helloApp. I then take the
compiled class file: "helloApp.class" and send it to my server. The
server only has jre, so I try to run it using the command jre helloApp.
This results in an error Exception in thread "main"
java.lang.NoClassDefFoundError: helloApp. Does anyone know why this
will not work. I have the j2sdk 1.4.2 installed on my computer and it
is running windows xp. The server is running jre 1.4 on linux.
Thanks for the help.
 
M

maxmike

Amit said:
So I have created and compiled a simple helloworld program using java.
It runs on my computer when i type java helloApp. I then take the
compiled class file: "helloApp.class" and send it to my server. The
server only has jre, so I try to run it using the command jre helloApp.
This results in an error Exception in thread "main"
java.lang.NoClassDefFoundError: helloApp. Does anyone know why this
will not work. I have the j2sdk 1.4.2 installed on my computer and it
is running windows xp. The server is running jre 1.4 on linux.
Thanks for the help.

Do you have the "." directory in your classpth? I.E. the current
directory?
 
L

Lee Fesperman

try to give him a real path like jre /home/amit/hello...

Sorry, the jre doesn't work that way. It doesn't take a file path; it takes a fully
qualified class name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,059
Members
48,769
Latest member
Clifft

Latest Threads

Top