LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2008, 08:35 AM   #1
sykrot
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
Java error


Quote:
Exception in thread "main" java.lang.NoClassDefFoundError
Caused by: java.lang.ClassNotFoundException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
This is the error while i try to do anything with java... Whats the problem?
 
Old 05-27-2008, 10:05 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
That looks as if your classpath has not been set. Details please?
 
Old 05-27-2008, 10:59 AM   #3
sykrot
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
root@server [~]# java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
root@server [~]# which java
/usr/bin/java
root@server [~]# which javac
/usr/bin/javac
root@server [~]# echo $JAVA_HOME
/usr/local/jdk
root@server [~]# echo $PATH
/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin
root@server [~]# echo $CLASSPATH
.:/usr/local/jdk/lib/classes.zip
what can be wrong?
 
Old 05-27-2008, 01:51 PM   #4
sykrot
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Now it works, i ran wrong command...

But if i do..

Quote:
killall -9 java
javac *.java
java -Xmx2500m server
- thats in run.sh

Also... if i use command

sh ./run.sh

server will start... yay, server is online.. all is fine..
but if i close the SSH client, server will also disconnect... whys that?
 
  


Reply

Tags
jay


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime.getRuntime().exec("cd") returns java.io.IOException, error 2 in java tatarin Programming 4 03-28-2008 07:42 PM
Error in Java shankarbrnair Linux - Server 2 09-28-2007 01:14 AM
Java Error...I think mijohnst Solaris / OpenSolaris 4 01-12-2007 01:23 PM
Java-GTK glib-java-0.2.5 Error hikkerguy Linux - Software 2 07-19-2006 06:01 PM
Java error "Exception in thread "main" java.lang.StackOverflowError" nro Programming 1 09-04-2004 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration