Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2008, 07:24 PM
hannehomuth's Avatar
Member
 
Join Date: Jul 2008
Location: Sommerfeld (Brandenburg, Germany)
Posts: 35
hannehomuth is on a distinguished road
[SOLVED] App runs only in IDE
Hello Everybody,

I've a question which might be very simple but I didn't find anything. I've written an Java App and it runs well when I start it out of my IDE (Netbeans 6.1, if you wanna know). But when I want to start it from the command line I get an error which I can't resolve by myself. Here it is.

Code:
java -jar /home/jhomuth/projekte/LDAP/dist/LDAP.jar Exception in thread "main" java.lang.NoClassDefFoundError: de.sourcepark.ldap.JNDI_GUI at java.lang.Class.initializeClass(libgcj.so.90) Caused by: java.lang.ClassNotFoundException: javax.swing.RowSorter not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/home/jhomuth/projekte/LDAP/dist/LDAP.jar], 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 java.lang.Class.initializeClass(libgcj.so.90)
I mean, I can think what is wrong, because I'am able to read, but what shall I do here? I've tried to Comment all Lines where the javax.swing.rowSorter is in, but then he throw the next Error, the same like that only with org.jdesktop.layout.GroupLayout. Does anyone has a Solution?

Sorry about my bad english :-)

Last edited by hannehomuth : 07-04-2008 at 07:49 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2008, 07:29 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Norm is on a distinguished road
Do you know where the missing class file is? It needs to be on the classpath so that the java program can find it. If the missing class file is in a jar file, add a Class-Path: statement to the manifest that you use create your jar file and put the jar file with the missing class file in the same directory as your jar file.

Are you using the same version of java in the IDE and outside it?

This may be a Linux install problem. You'll get better advice on a Linux forum.
Programming Talk - Ubuntu Forums

Last edited by Norm : 07-04-2008 at 07:31 PM.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 07:49 PM
hannehomuth's Avatar
Member
 
Join Date: Jul 2008
Location: Sommerfeld (Brandenburg, Germany)
Posts: 35
hannehomuth is on a distinguished road
Yes I use the same Java Version, and I also think that this might be linux problems. I will try in the Forum you posted , thank you!!
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-07-2008, 06:35 PM
hannehomuth's Avatar
Member
 
Join Date: Jul 2008
Location: Sommerfeld (Brandenburg, Germany)
Posts: 35
hannehomuth is on a distinguished road
I had to add all files to classpath, for anyone who wanna know
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 11:50 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org