Accessing ressources in jar file

Hi,
I need some help with jar files, please.
The concept of jar files is quite new to me and I din't fully unterstand it yet I guess...
I'm loading an image by
ImageIcon image = new ImageIcon("image.gif");
now I'd like to pack that image into a jar file, for simplifying reasons when using more files, which is not the problem, so far.
But how can I access that file then in my java programm?
Do I have to use the JarFile.getInputStream() method or what?
Is there no 'easier' way, avoiding Streams and Readers?
Can I hand over the JarEntry of my gif file to the ImageIcon constructor
somehow instead of the file?
Thanks for help..

I guess you've set me on the right course, but I am
afraid I don't really understand the concept of those
class loaders, either.
I read the part on jar files and extensions in the
java tutorial(and therefore on class loaders, too),
but I still don' get it.JAR Files and classloaders are two different concepts. The JAR file is merely a packaging method for Java code. Classloaders on the other hand, are the way the JVM finds the code classes. All a classloader does is load binary data from somewhere and pass it to the JVM for execution. See http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html for more info.
The relevant code part we're talking about here is
used in a class extending JPanel , so thats what you
get by performing getClass(), the running instance of
a JPanel subclass.
but obviousely there is no getResource() method in
that type of class.Really? http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html#getResource(java.lang.String)
Of course, Object.getClass().getResource() is just a convienence method for Object.getClass().getClassLoader().getResource(). Just as the ClassLoader can load the binary data that creates a Class object that lends itself to the execution of the Object you're loading, it can load other forms of binary data from the same location.
what I don't understand is: where does this method
come frome? do I have to add somehow a classlistener
instance to my class? or add an implementation in the
code of my class, providing a getResource method? A Class object (See http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html) is merely a "wrapper" object that represents the running code. It exposes the methods and fields for access. Normally Class is used behind the scenes, but it can be used to execute dynamically loaded code.
You don't need to "add" a classloader. A classloader loaded the code that you are running. When it loads the class, it stamps it with its signature so that you know who loaded it.
I guess you see now I really have no idea how the
classloader system works ;)
(and believe me I'm not asking dumb questions berfore
trying to solve the prob by myself....)
Thanks for any additional helpNo prob. :-)

Similar Messages

  • How to access additional supporting jar files from EJB JAR?

    Hi,
    How can we access additional supporting jar files as part of my EJB JAR .
    I don't want to keep them in the top level because other EJB JAR files also has
    the same jar files(code in the classes in the jar is slightly different)
    can I keep the additional jar files in my EJB JAR?
    Thanks
    NLB

    Include the supporting jar files in the Ejb jar file.
    Specifiy the jar files in the Ejb jar manifest file.
    Manifest-Version: 1.0 [CRLF]
    Class-Path: utility.jar [CRLF]
    thanks,
    Deepak
    "NLB" <[email protected]> wrote:
    >
    Hi,
    How can we access additional supporting jar files as part of my EJB JAR
    I don't want to keep them in the top level because other EJB JAR files
    also has
    the same jar files(code in the classes in the jar is slightly different)
    can I keep the additional jar files in my EJB JAR?
    Thanks
    NLB

  • How to access the database jar file using the derby 10.2.1.6 database ?

    Hi,
    How to access the database jar file using the derby 10.2.1.6 database ?
    I have used like below. And i am getting the following the error:
    "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.apache.derby.jdbc.EmbeddedDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)"
    My context.xml file looks like this:
    <Context crossContext="true">
    <Resource name="jdbc/derby" auth="Container"
    type="javax.sql.DataSource" driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
    url="jdbc:derby:jar(\CalypsoDemo\database.jar)samples"
    username="xxx" password="xxx" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </Context>
    What could be the reason.?
    Any suggestions will be appriciated.
    Thanks in Advance,
    Gana.

    ya, I have restarted. Can you please tell me whether the path which i am giving is right or not in the context file?
    Thanks,
    Gana.

  • How to access classes in jar files

    hi I have added a jar file to my project in eclipse.How to access the classes in that jar file?

    cu is right.
    classloader returns the URL of your resource. You can the jar using something like the following...
    ClassLoader classloader = this.getClassLoader();
    url = classloader.getResource("your_resouces...");
    if(url == null)
    System.out.println("cannot find resource ");
    return null;
    String jar = url.getFile();
    jar = jar.substring(jar.indexOf("/")+1, jar.lastIndexOf("!")).replace('/', '\\');
    obviously, this code snippet works on windows only. Now you have the jar file path. I use Jar file classes to access the jar file. (e.g. you can search for each class files)
    Ming

  • Problem accessing sounds in jar file

    Hi,
    I have made a program and packed it to a jar file.
    Everything works fine in the IDE, so this is purely a matter of jar access.
    The jar has 6 folders.
    framework (which is one of my packages)
    META-INF
    sound (also my package)
    sounds (my wav files for the program)
    sprite (another package)
    sprites (my graphics for the program).
    I access the graphics in sprites, from a class in sprite and have no problem with it.
    try {               
                   URL url = this.getClass().getClassLoader().getResource(ref);               
                   if (url == null) {
                        fail("Kan ikke finde ref: "+ref);
                   sourceImage = ImageIO.read(url);
              } catch (IOException e) {
                   fail("fejl ved load: "+ref);
              }The problem is accessing the wav file in the sounds folder from a class in the sound folder.
    try{
                   AudioInputStream stream = AudioSystem.getAudioInputStream(new File("Sounds/1999.wav"));
                   AudioFormat format = stream.getFormat();
                   DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat(),
                             ((int)stream.getFrameLength()*format.getFrameSize()));
                   clip = (Clip) AudioSystem.getLine(info);
                   clip.open(stream);
              }I have tried to use the class loader like this (instead of AudioSystem.getAudioInputStream) :
    AudioInputStream stream = (AudioInputStream) this.getClass().getClassLoader().getResourceAsStream("sounds/1999.wav");          
    but it didnt help.
    Does anyone have any suggestione?
    Please, if all you can do, is paste a link to the java API, save your energy. I have already looked and it was no help, as im still only a student of java.
    I would like an actual suggestion, so i can see it work, then i can make work my way through the API from there.
    Edited by: Mondariz on May 7, 2008 8:26 AM

    Don't try to use a File object to access resources from the jar. You have a working process for accessing the sprites, just use the same process to access the sounds. Only not quite the same method, there's one method which returns a URL and a very similar method which returns an InputStream. I would post the link to the documentation but you asked for us to not do that. Anyway you seem to know where it is.

  • How to access picture in jar file?

    i,ve made a jar file containing folder named frame\\data
    and the folder data containing picture and sound
    and i want to call\access the picture and the sound to make them appear to the user how?
    this is my code
    import java.io.*;
    import java.net.URL;
    import java.awt.*;
    import javax.swing.ImageIcon;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import javax.swing.JButton;
    import javax.swing.AbstractButton;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.sound.sampled.*;
    import java.awt.event.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
      public class MyFrame extends JFrame 
    ImageIcon img =new ImageIcon("src\\frame\\data\\heart7.png");
    JButton btn=new JButton("Press Me", img);
      MyInner inner;
        MyInner4 inner4;
          MyFrame ()
            setupGUI();
        private void setupGUI()
           JFrame f =new JFrame();
        //   f.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
           f.setTitle("Window Event");
            f.setSize(550,350);
            f.setResizable(false);
            f.setLayout(new BorderLayout());
            f.add("Center",btn);
              btn.setVerticalTextPosition(AbstractButton.BOTTOM);
              btn.setHorizontalTextPosition(AbstractButton.CENTER);
            f.setVisible(true);
             inner=new  MyInner();
             inner4=new  MyInner4();
             f.addWindowListener(inner);
             f.addWindowListener(inner4);
             class MyInner extends WindowAdapter
            public void windowClosing(WindowEvent ee)
                Toolkit tool = Toolkit.getDefaultToolkit();
                tool.beep();
                JOptionPane.showMessageDialog(null, "Better Work!","Bye Bye",JOptionPane.INFORMATION_MESSAGE,img);
               // JOptionPane.showMessageDialog(null, "Text", "Title", JOptionPane.Type, icon);
                System.exit(0);
            class MyInner4 extends WindowAdapter
          public void   windowOpened(WindowEvent ex)
             try {
            // From file
            AudioInputStream stream = AudioSystem.getAudioInputStream(new File("src\\frame\\data\\BraveHeart.wav"));
            // From URL
            //stream = AudioSystem.getAudioInputStream(new URL("http://hostname/audiofile"));
            // At present, ALAW and ULAW encodings must be converted
            // to PCM_SIGNED before it can be played
            AudioFormat format = stream.getFormat();
            if (format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED) {
                format = new AudioFormat(
                        AudioFormat.Encoding.PCM_SIGNED,
                        format.getSampleRate(),
                        format.getSampleSizeInBits()*2,
                        format.getChannels(),
                        format.getFrameSize()*2,
                        format.getFrameRate(),
                        true);        // big endian
                stream = AudioSystem.getAudioInputStream(format, stream);
            // Create the clip
            DataLine.Info info = new DataLine.Info(
                Clip.class, stream.getFormat(), ((int)stream.getFrameLength()*format.getFrameSize()));
            Clip clip = (Clip) AudioSystem.getLine(info);
            // This method does not return until the audio file is completely loaded
            clip.open(stream);
            // Start playing
            clip.start();
            // Play and loop forever
        clip.loop(Clip.LOOP_CONTINUOUSLY);
        /* Play and repeat for a certain number of times
        int numberOfPlays = 3;
        clip.loop(numberOfPlays-1);
         catch (IOException e) {
        } catch (LineUnavailableException e) {
        } catch (UnsupportedAudioFileException e) {
          public  static void main(String[]args)
             MyFrame frame=new MyFrame ();
    }

    Instead of doing like this,
    ImageIcon img =new ImageIcon("src\\frame\\data\\heart7.png");
    JButton btn=new JButton("Press Me", img); use this code,and then prepare the jar
    try{
    URL pathShell = null;
    Object dummy = new Object(){
         public String toString() { return super.toString(); }
    ClassLoader cl = dummy.getClass().getClassLoader();
    pathShell  = cl.getResource("src\\frame\\data\\heart7.png");
    image = new ImageIcon(pathShell);
    JButton btn=new JButton("Press Me", imgage);
    catch (Exception e) {}

  • Problems accessing class in JAR file [err = -4000]

    Hi, my setup is as follows ....
    I have a seq file that is accessing a Java class file, TestStandClient.java. something like
    public class TestStandClient
       public String test (String arg)
          String returnVal = "";
          try
             TestClass testClass = new TestClass ();
             returnVal = testClass .test (arg);
          catch (Exception e)
             returnVal = e .toString();
          return returnVal;
    TestClass.java is
    public class TestClass
       public String test (String arg)
          return arg + " : [Jar object has modified string]";
    Now. TestClass is in a seperate jar. When TestStandClient :: test  is called i get a -4000 error. From the readme in the Java example file it is described as ....
    Error
    reading returned string
    The
    string returned from Java was corrupt. Verify that the return type of the Java
    method is a string value.
    I have noticed if I take out the call to the object in the jar file then everything works ok.
    Could it be a classpath problem? the StartJVM has its classpath
    pointing at the folder where the jar is and also at where the
    TestStandClient class file is. I also set the classpath for the Java
    step to be the same (location of jar and class file)
    So, can someone inform me of what support TestStand has for java? Does it support communicating with a class file that itself depends on other JAR files? This is surely the case?
    thanks in advance

    Dear PCR Barry,
    I am afraid that I must agree with my colleague Kostas, who replied to your first teststand post. These are very tricky, indepth issues, and will require quite significant investigation. Furthermore, it will be very difficult for us to answer via the forums as we will likely need more input from yourself. As previously suggested, if you have a Standard Service Program (SSP), you can generate a Service Request by calling or e-mailing your local branch.
    Thank you for your time, and I am sorry that I have been unable to help you further,
    Best wishes,
    Rich R
    Applications Engineer
    National Instruments UK & Ireland

  • Problems accessing resources in JAR Files

    Hi all,
    i'm using a third party software which isb trying to access a configuration file (xml file) residing inside its jar files.
    Without Webstart there are now problems, when deploying the software with Webstart, the resources could not be found.
    The software installs an streamhandler which handles all access to its resources.
    When this handler is instantiated, a Classloader is provided via Thread.currentThread()..getContextClassLoader().
    As i can see this classloader (and only this-) instance is used when resources are acessed.
    The classloader instance seems to me to be the correct one of type ...JNLPClassLoader.
    As i figured out the classloader is able to acess the resource In the Moment when the Handler is instantiated.
    But later in the code (inside of the Handler) any call of getResource() with identical parameter for the resource name fails.
    The classloader instance is the same as in the previous calls (which i have added for debug).
    The Handler class resides in a different jar file as the resource, but i have also tried to put them in one jar file achieving the same result.
    Has anyone an idea what is going wrong ?
    The application has "all-permissions" granted, but suprisingly i'm receiving an security exception when trying to call Class.getProtectactionDomain() inside of the Handler class.
    Could it be a security problem ?
    Thank you.
    Andrej
    Message was edited by:
    a.rippich
    Message was edited by:
    a.rippich

    Dear PCR Barry,
    I am afraid that I must agree with my colleague Kostas, who replied to your first teststand post. These are very tricky, indepth issues, and will require quite significant investigation. Furthermore, it will be very difficult for us to answer via the forums as we will likely need more input from yourself. As previously suggested, if you have a Standard Service Program (SSP), you can generate a Service Request by calling or e-mailing your local branch.
    Thank you for your time, and I am sorry that I have been unable to help you further,
    Best wishes,
    Rich R
    Applications Engineer
    National Instruments UK & Ireland

  • Problem accessing class in jar file

    Hello. I am trying to create a jar file from my already compiled classes. I have around 5 packages, and my programs' entry point is in one of the packages, we'll call package A. Each package has its own purpose and package A calls any needed package to perform their task. This works well when I compile, run and all. However, when I create a jar file, it only works with the local package and any calls to another package do not work. How can I get around this? any help will be appreciated

    This is the output..
    05/05/2010  10:19 AM        10,946,787 MYJAR.jar
                   1 File(s)     10,946,787 bytes
                   0 Dir(s)   1,434,251,264 bytes freeMy manifest file contains
    Manifest-Version: 1.0
    Class-Path: .
    Main-Class: Login.loginMain
    AndrewThompson64 wrote:Is the code [swallowing exceptions|http://pscode.org/javafaq.html#stacktrace] at any point?
    Nope..
    AndrewThompson64 wrote:
    How do you know that if there is absolutely no error output?The when I ran the code from my compiler, it has no errors, and it works smoothly. I have used a JAR for a single package program before and it worked well but this multiple package program is giving me the problem and I don't want to put all the files in a single package

  • Accessing web application JAR files from applet

    I've got an applet which is part of a web application.
    All the web application JARs are in the webapps/myappl/WEB-INF/lib directory, and I
    can't seem to place anything in that directory on the archive attribute of <OBJECT> tag.
    I'm running into trouble because I'm sending objects from the servlet to the applet and keep getting classnot found during deserialization because I've missed some jar file on the archive attribute. I've had to copy lots of jar files up to where the codebase in the HTML file is to make this run. My question is this.
    Is it better to just change the tomcat security policy file (catalina.policy in tomcat conf directory) so that the JARs are directly accessible and I don't have to copy them from WEB-INF/lib???? Has anyone done this before? What would the line look like?
    I'm assuming that I have to follow the instructions (THAT I DON'T UNDERSTAND)
    at the bottom of the policy file. Can someone help me out here????
    should I have something like
    grant codeBase "file:${catalina.home}/webapps/myappl/WEB-INF/classes/-"
    { permission java.security.AllPermission; };
    grant codeBase "file:${catalina.home}/webapps/myappl/WEB-INF/lib/-"
    { permission java.security.AllPermission; };
    Will this allow me to place references to jar files (and the classes directory) in the archive attribute, such as
    <OBJECT .....  >
        <param name="archive" value="../WEB-INF/lib/applet.jar,../WEB-INF/lib/someapp.jar,../WEB-INF/classes" />trailer for catalina.policy is
    // You can assign additional permissions to particular web applications by
    // adding additional "grant" entries here, based on the code base for that
    // application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
    // Different permissions can be granted to JSP pages, classes loaded from
    // the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
    // directory, or even to individual jar files in the /WEB-INF/lib/ directory.
    // For instance, assume that the standard "examples" application
    // included a JDBC driver that needed to establish a network connection to the
    // corresponding database and used the scrape taglib to get the weather from
    // the NOAA web server.  You might create a "grant" entries like this:
    // The permissions granted to the context root directory apply to JSP pages.
    // grant codeBase "file:${catalina.home}/webapps/examples/-" {
    //   permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
    //   permission java.net.SocketPermission "*.noaa.gov:80", "connect";
    // The permissions granted to the context WEB-INF/classes directory
    // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
    // The permission granted to your JDBC driver
    // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar" {
    //   permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
    // The permission granted to the scrape taglib
    // grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar" {
    //   permission java.net.SocketPermission "*.noaa.gov:80", "connect";
    // };

    Thank you for your reply.
    As I mentioned in my first post I had seen a couple of posts mentioning ServletContext before, but dismissed them as I am not using any servlets of my own. However, since you showed me exactly how it was used I realised I could probably just use a dummy servlet to get this information.
    The following page suggests a couple of techniques for doing just this.
    http://www.jguru.com/forums/view.jsp?EID=1087411
    So I think that's me sorted, cheers.

  • Accessing an external jar file

    Hi there,
    Does anyone knows how to acces an external jar file?
    I need to use a jar on another webserver because the jar is using a library.
    Thx...

    I think you can add a classpath
    in the environment variables on windows
    and append the directory of where your jar files
    are located.
    or
    copy the jar files to the C:\j2sdk1.4.0_03\jre\lib\ext
    where j2sdk1.4.0_03 is your javahome directory
    any comments
    just POST here
    Gudluck
    kuks

  • Problem accessing Application Ejb Jar files from Apache Axis jars

    I have deployed an EAR application, with a structure as shown below,
    MyApp.ear
    |____ MyApp_Ejb.jar
    |____ axis.war
    |_____ WEB-INF
    |_____ lib (This contains all axis specific jars)
    The application deploys just fine. But when i goto happyaxis.jsp and try to view all the web services that have been deployed. I get an exception "No provider type matches QName '{http://xml.apache.org/axis/wsdd/providers/java}SDL".
    Here SDL is a custom provider that i have written and all the required files for the provider are available in MyApp_Ejb.jar.
    I do not get as to why the axis.jar is not able to find classes in MyApp_Ejb.ear, when both these are in the same ear.
    Now i know i can add a utility jar to a war files classpath by adding a classpath line in the War file MANIFEST.MF. But since MyApp_Ejb.jar is defined as a Web Module this solution too doesnt help.
    Separating the provider related files from MyApp_Ejb.jar is not possible since there is too much dependance of other files within that jar.
    So i am looking for a solution where in i can continue to have MyApp_Ejb.jar as my ejb module as well as the axis related jars can find the required classes within MyApp_Ejb.jar. some way of sharing the ejb jar across to axis jars.
    Thanks in advance.
    Vicky

    I have deployed an EAR application, with a structure as shown below,
    MyApp.ear
    |____ MyApp_Ejb.jar
    |____ axis.war
    |_____ WEB-INF
    |_____ lib (This contains all axis specific jars)
    The application deploys just fine. But when i goto happyaxis.jsp and try to view all the web services that have been deployed. I get an exception "No provider type matches QName '{http://xml.apache.org/axis/wsdd/providers/java}SDL".
    Here SDL is a custom provider that i have written and all the required files for the provider are available in MyApp_Ejb.jar.
    I do not get as to why the axis.jar is not able to find classes in MyApp_Ejb.ear, when both these are in the same ear.
    Now i know i can add a utility jar to a war files classpath by adding a classpath line in the War file MANIFEST.MF. But since MyApp_Ejb.jar is defined as a Web Module this solution too doesnt help.
    Separating the provider related files from MyApp_Ejb.jar is not possible since there is too much dependance of other files within that jar.
    So i am looking for a solution where in i can continue to have MyApp_Ejb.jar as my ejb module as well as the axis related jars can find the required classes within MyApp_Ejb.jar. some way of sharing the ejb jar across to axis jars.
    Thanks in advance.
    Vicky

  • Access jar file from in-memory classes...

    I have some classes that I compile to memory and everything works fine until one class that must access some external jar files. I have been unable to access those jar files from disk after trying every suggestion using URLClassLoader. I even tried someone's example to hack the SystemClassLoader which properly adds the jar file paths, but still they can't be seen. The only way it works is if I put the files in the jdk/jre/lib/ext directory. Then everything works fine. There must be a way to load the jar files in memory as well as the class files so they can be accessible. Has anyone done anything like this? Is it possible? Even though the class files are in memory, why would the jar files not be seen even when they are added to the same URLClassLoader's URL's. Thanks.

    Sorry that wasn't clear. What I mean is that the classes are compiled to byte code directly to memory and no physical .class file is created. Yes, I'm using my own ClassLoader that extends URLClassLoader and I'm setting the parent to ClassLoader.getSystemClassLoader(). I also should mention that I'm doing this inside a Netbeans module that is part of a Netbeans Platform application. I don't know why that should matter though, since I'm trying to do everything in memory without creating the physical files. Thanks.

  • Protecting the jar files from being web access

    I have a jnlp file which is put under tomcat webapps folder, say (\webapps\TEST\launch.jnlp), with the jar and lib files put in the subfolder (\webapps\TEST\folder1\*.jar AND \webapps\TEST\folder1\lib\*.jar).
    My question is how can i prevent user from direct access to the jar files via typing http://www.someip.com/TEST/folder1/main.jar ? I tried the following methods but it seemed not working:
    1. Change the folder permisson in \webapps\TEST\*.*, but when user type the above hyperlink they can still get the jar file
    2. put the jar and related files under \WEB-INF\, but now this time running the launch.jnlp, it returns an error saying that it can't access/find the WEB-INF.
    Is there any method? Or should I say, when you published jnlp to web, the related jar files are forced to be accessed by everyone.

    Sounds easy to me: encrypt your xml, then instead of just storing your key as plain bytes do some reversable operations on it (xor masks, reversions, whatever you like), just do them in many different points (and classes) of your code, have some parts done by methods that actually check application is running under JWS with proper codebase, scramble it all, and suddently the whole stealing operation won't be worth the effort. Obviously you should have many private (and package protected) methods, seal packages and so on. Maybe, somehow, you can even use reflection to identify calling classes (not sure, never looked for anything similar).
    What else? write down some c++ code into your own dll/JNI library and make it do something too, so they'll even need to decompile the dll. If you know first execution is always online you can send another xor key and store it with persistence service or write it down to windows registry. You can keep making it harder as much as you like, even just with silly code like
    Math.ceil((new GregorianCalendar.getField(Calendar.YEAR)%2000)/1000)*((int)('c'-'a'))just to retrieve the number 2. If you distribute such code through many lines and methods, once you scramble it, most people will give up.
    Bye.

  • Unable to access classes in third party jar files packaged with my ejb.jar

    I have packaged some third party jar files in my xxx_ejb.jar file.  The third party jar file contains classes that are accessed by some custom classes which are in turn accessed by my bean classes.  I get the following error when my custom classes attempt to use any of the classes in one of the third party jar files:
    java.lang.NoClassDefFoundError: com/Ostermiller/util/CSVParser
    Shouldn't I be able to access classes in jar files that are packaged with my xxx_ejb.jar file?  I see the xxx_ejb.jar file as a resource of the application classloader that contains it but I don't see the third party jar files.

    As per the Java EE specification, additional JAR files should be packaged on the EAR level. Only WAR files' WEB-INF/lib folder is scanned for JAR files to be added to the classloader.

Maybe you are looking for

  • SET does not exist in GS02 but there in GS03

    HI When I display a set using GS03 it shows the assigned accounts. But when i go to edit the same set using GS02 it says "Set xxxx does not exist". I used the same Set ID which I used to diplay the set Pls advice what could be the issue OR is there a

  • NAT issue in ASA 5510

    HI experts, i am using  Cisco Adaptive Security Appliance Software Version 8.0(4) Device Manager Version 6.4(9) i configure Nat but when i use packet tracer in firewall to see packet flow i found my inside packet is not able to reach to outside inter

  • Smart Playlist plays in what order?

    A couple of years ago I made a Smart Playlist that collects everything of the gendre "podcast." This lets me listed to the podcasts continuously, instead of stopping after each one. I realize that I have no idea what order it's playing the podcasts i

  • Urgent! Cannot Upgrade To Maverics!

    HELP! Mac App Store is not loading on OS X 10.8.5 Mountain Lion on my Mac mini 2012 and I need to open it to upgrade to maverics so I can finish a competition on GarageBand. It stopped working after I downgraded from Yosemitie!! Help! Thanks You...

  • Network Link Conditioner to control Wi-Fi

    I just finished installing and testing Network Link Conditioner that comes with Mac OS X Lion and Xcode4.1. It works great locally on the Mac, i.e. when I use the Internet connection that Network Link Condition is limiting directly. However, when I c