• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiles, but showing up "NoClassDefFoundError". Successfully compile and run for other programs.  RSS feed

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I "dir" 'd the dir and the class is showing up...I tried compiling and running another program, which worked fine. I restarted MS-DOS and it did the same thing. What is going on?
Thanks,
cc11rocks

EDIT: I tried to run it from a JAR file. No go.

EDIT2: Getting different output now:


Could it be I have to put it in a package?
EDIT3: The package was the problem.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The command java MyJoglCanvasStep1.java will look for a class named java in the subfolder MyJoglCanvasStep1 declared to be in package MyJoglCanvasStep1. Take it from there.

edit: per your EDIT2, the class has been declared to be in package net.sf.breed.mini.jogl.article; Either place it in an appropriate directory structure or remove the package declaration.

Note that the class may have dependencies which also depend on being in the correct place in the filesystem.

edit2: ok then
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:The command java MyJoglCanvasStep1.java will look for a class named java in the subfolder MyJoglCanvasStep1 declared to be in package MyJoglCanvasStep1. Take it from there.

edit: per your EDIT2, the class has been declared to be in package net.sf.breed.mini.jogl.article; Either place it in an appropriate directory structure or remove the package declaration.

Note that the class may have dependencies which also depend on being in the correct place in the filesystem.

The first line of the code (I'm trying to figure out JOGL) said "package ******** blah blah blah". My bad that I didn't see that.
Thanks for the help,
cc11rocks aka John Price
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!