• Post Reply Bookmark Topic Watch Topic
  • New Topic

javax resouce error  RSS feed

 
Jason Mill
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to run some code written by someone else who has left our company - I've been given to task to 'sort it out' whilst learning java.
However I get the following error when I run it.
java.lang.NoClassDefFoundError: javax/resource/ResourceException
I have added jndi.jar to the classpath as I think this is the jar file needed.
So 2 questions;
1) How do you find out which jar file a class is in, e.g. javax.swing.*
2) if it's in the classpath should it work?
the gui window does appear so somethings working ok.
any help please
Thanks.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) How do you find out which jar file a class is in, e.g. javax.swing.*
Sometimes I use google and guess.
Note that most or all of the classes in the J2SE API are in the rt.jar file, that is part of the SDK and JRE.
2) if it's in the classpath should it work?
If it's in the classpath, you shouldn't be getting a ClassNotFoundException.
Note that a JAR file is just a zipped file with a special internal structure and a different extension. If you wanted, you could simply change the extension of the file to .zip and then use a simple unzipping utility to have a look inside.
So, is it in there?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!