Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 131207

Summary: java.lang.NoDefClassFoundError: <my java class> <my args> Exception in thread "main".
Product: [Eclipse Project] JDT Reporter: Ryan Nabozniak <funboy116>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED INVALID QA Contact:
Severity: critical    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
The application I'm trying to launch in eclipse
none
eclipse setup and screenshots none

Description Ryan Nabozniak CLA 2006-03-09 16:16:48 EST
Hello,

I hope you can help me with this.  I've checked postings on eclipse and sun but nothing seems to be working (at least with eclipse).  I started getting this error about a month ago.  I found the workaround to be - java -classpath . <my class - DataStore> <my args, in this case GHXML.xml>, but this doesn't allow me to step through the debugging process in eclipse.

Specifically, the error I get is -

java.lang.NoDefClassFoundError: DataStore GHXML/xml 
Exception in thread "main".

I'm trying to parse an xml file into a hashtable.

Some of the things I've done so far - rewrote my Path and classpath environment variables, uninstalled all versions of JDK and JRE and reinstalled version 1.5.0_06 of the JRE and JDK.

I've been testing this error on another IDE (textpad) and my program compiles and runs fine without the "-classpath . " commands included. 

The thing is, I'm running eclipse on two machines and I'm getting the same error on both and only with eclipse.

Any help would be much appreciated...right now I think I need a beer...

Ryan
Comment 1 Olivier Thomann CLA 2006-03-09 16:38:26 EST
Move to JDT/Debug
Comment 2 Philipe Mulet CLA 2006-03-09 18:39:07 EST
Please provide steps to reproduce in Eclipse.
Also what exactly is going wrong ? A Java run on the command line ? If so, where is Eclipse in the picture ?

Please reopen once clarified.
Comment 3 Philipe Mulet CLA 2006-03-09 18:39:55 EST
oops bug did move under me, reopening as no longer in jdt/core
Comment 4 Darin Wright CLA 2006-03-13 22:51:43 EST
Can you attach a sample project and launch config demonstrating the problem. We need more concrete steps to reproduce the problem.
Comment 5 Ryan Nabozniak CLA 2006-03-16 11:11:53 EST
Created attachment 36420 [details]
The application I'm trying to launch in eclipse

This is the application I'm trying to run with eclipse.  I'm still getting the error -

java.lang.NoDefClassFoundError: <my java class> <my args> Exception in thread "main"

I will attach screen shots too.

Included in zip file is the .classpath file that eclipse generates.

Ryan
Comment 6 Ryan Nabozniak CLA 2006-03-16 11:17:21 EST
Created attachment 36421 [details]
eclipse setup and screenshots

These are various screenshots I've taken of my eclipse setup.  I've also taken some shots, on the same computer, of another IDE I use occasionally (textpad) in order to show that my jvm is setup correctly.  I'm able to compile and run the application I sent you without errors, one shot shows the expected output.
Comment 7 Kevin Barnes CLA 2006-03-16 16:42:49 EST
You've just configured your launch incorrectly. You want to launch DataStore
and use the arguments tab to add your GHXML.xml program argument.
You cannot specify arguments in the Main Class field.
Comment 8 Ryan Nabozniak CLA 2006-03-16 17:37:46 EST
D'oh, thanks guys...I'm still learning how to use the IDE.  Sorry for the trouble.