• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javax resouce error

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic