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

Similar Messages

  • Executing .jar files from another .jar file.

    How would I run one .jar file from another .jar file. and is there anyway to call specific class arguments? Because I have one .jar file that reads a specified file and returns its contents.
    So how would I execute it and specify its arguments and how would I make it return something to the executing jar file?

    Because I have one .jar file that reads
    a specified file and returns its contents. Presumably you have a class that does that, and you have that class stored in a jar. And you want to know how to... um... do something with that class. I say "um..." because normally you don't execute a class, either, you either call its static methods or you create an instance of the class and call its instance methods.
    If you have been writing a whole lot of little classes each of which just has a static main method, then stop doing that. Write real Java classes instead. The tutorial is here:
    http://java.sun.com/docs/books/tutorial/java/index.html

  • How to prevent OC4J generating DD file orion-ejb-jar.xml?

    I am doing a migration from JBoss to OC4J. I already have the ejb-jar.xml file which is working under JBoss. The xDoclet generate all the parts except the CMR parts so I deployed the ear file without orion-ejb-jar.xml and I got generated version from OC4J. I merge the xDoclet version with the OC4J generated version by adding the CMR parts into my xDoclet version and modify the table name and persistance fields name generated by OC4J. I don't want to mapping all the relationships so I use:
    <ejb-relation >
    <ejb-relation-name>AppReport-User</ejb-relation-name>
    <ejb-relationship-role >
    <ejb-relationship-role-name>the-User-of</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source >
    <ejb-name>AppReports</ejb-name>
    </relationship-role-source>
    <cmr-field >
    <cmr-field-name>user</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role >
    <ejb-relationship-role-name>the-appreports-of</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source >
    <ejb-name>Users</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    Here I just want unidirectional EJB AppReports refewrence to Users but I don't want Users EJB reference back to AppReports. The OC4j will generate DD file orion-ejb-jar.xml again with all the missing parts combined with my merged version orion-ejb-jar.xml and put it under my deploment directory. It seems it voilate the ejb-jar.xml since I don't have <cmr-field-name> defined for AppReports. My question is how I can control this way and let OC4J not generate orion-ejb-jar.xml again.

    You need to have the orion-ejb-jar.xml in your app before you initially deploy it, otherwise OC4J will automatically create it for you. I would take to copy of the orion-ejb-jar.xml that is a result of the combination of OC4J and XDoclet generated and add this to my code base as the de-facto orion deployment descriptor to be included in all app deployments. On deploying the app, OC4J will see that a orion-ejb-jar file already exists and will not auto create one. Hope this makes sense!

  • Can I place jar files inside ejb-jar.jar?

    Hi,
    I'm reading about the packaging rules for creating an ejb-jar.jar file, and I'm wondering whether it's possible to include a jar file (containing helper classes) inside of the ejb-jar file. A "lib" dir (for containing such helper jars) doesn't seem to be part of the ejb-jar file format.
    The EJB 3 spec has this to say (Ch 20, "Enterprise JavaBeans 3.0, Final Release):
    "The ejb-jar file must also contain, either by inclusion or by reference, the class files for all the classes and interfaces that each enterprise bean class and the home interfaces, component interfaces, and/or web service endpoints depend on, except Java EE and J2SE classes. This includes their superclasses and superinterfaces, dependent classes, and the classes and interfaces used as method parameters, results, and exceptions"
    Now, it seems that the root of the the ejb-jar file contains all the classes (in the appropriate Java package layout). But what about including JAR files? The ejb-jar spec seems to have nothing to say about a "lib" dir that can contain jars (as a WAR file can).
    Summary of questions:
    1) Can an ejb-jar file contain a jar file? If so, how/where?
    2) Can the ejb-jar file's META-INF/MANIFEST.MF file contain a reference to a JAR file?
    I'm not considering correct design at the point... I'd just like to know if these 2 scenarios are possible.
    Thank you!
    kamuifx

    Yes, I have an ear file..................
    I have an EAR file; inside the EAR I have a WAR file (web module) and an EJB-jar file (EJB module).......... the EJB need some classes placed in a jar file (a helper .jar or an util .jar)...........
    my question is: How can I use the classes of the .jar files in te EJB??????
    thanks

  • How to read a text file from a Jar file

    Hi
    How can I read a text file from a Jar file?
    Thanx in advance..

    thanx
    helloWorld it works.damn, I didn't remove it fast enough. Even if it is urgent, it is best not to mention it, telling people just makes them take longer.

  • How to refer utitlity jar from EJB jar in ear?

    hi, all,
    I want to refer an existing jar file from EJB, but i do not know how to do it? please help!
    Thanks.

    I am using weblogic 6.1

  • How to protect my jar file from being downloaded

    How can i protect my jar file from being downloaded by users by accessing it through the web site.
    Now everybody can just type the url www.mysite.com/applets/myApplet.jar
    And download it to his computer.
    I realize that anybody who really wants to download it he will get it anyway, but I want to make it harder.
    thanks in advance

    Your browser has to download the jar file if it's going to run the applet. That's applets work. The browser downloads the classes and then runs them locally.
    I suppose if you wanted to make something to make it difficult for users to explicitly download the jar, you could set some kind of permission flag when the HTML is page is rendered, and then unset it some amount of time (10 seconds?) later, and then only let the user download the jar when the flag is set. But this would be fragile and irritating and unhelpful. It would probably break more than you'd like and not prevent download very much (it wouldn't take long to figure out what was happening), and besides nobody is ever going to try to steal your code.

  • How do I access my back up files from the time machine if my computer was stolen?

    Hi, how do I access my back up files from the time machine if my mac book pro was stolen? I have a mac book air and mac too. But not sure how I can get back all the files from the stolen computer from my time capsule

    On the Mac Book Air or other Mac that you have, use Migration Assistant to transfer files from the Time Machine backups of the Mac that was taken.
    Macintosh HD > Applications > Utilities > Migration Assistant

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

  • How to call a .jar file from a java bean?

    any body knows how to call a .jar file from a java bean?

    Crosspost!
    http://forum.java.sun.com/thread.jspa?messageID=4349619

  • 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.

  • How to load jar files from remote location

    Hi all,
    I am trying to load jar files from remote server, from a servlet which is running on OC4j.
    For doing this,First I am getting ClassLoader by using ClassLoader.getSystemClassLoader() and then type casting it to URLClassLoader.
    But by doing it I am getting ClassCastException,because oc4j returns oracle.classloader.PolicyClassLoader instead of java.net.ClassLoader.
    Appreciate if anyone can tell me how to load remote jar files using oracle.classloader.PolicyClassLoader .
    Thanks
    Harish

    Hi,
    I suppose you know about this, but just in case.
    I have used jnpl to load jar files from remote location.
    Rowan

  • How to make a jar file from a java file?

    how to make a jar file from a java file, is there any one tht can help me thank you;

    You can study this.
    http://java.sun.com/docs/books/tutorial/jar/basics/index.html

  • How to create jar files from my code?

    Hi, I�m a rookie programmer and i need to create jar files in my application code. Which classes do i need to use?
    Can anybody give me an example?
    Thanx in advance

    Thanx Uwe. You�re right, i�m only trying to create jar
    files (and extract files from a jar file) I will try
    what you told me. Anyway, I have some doubts about how
    to use those classes.Can you give me any example?
    Thanx again!To create jar files use the class JarOutputStream.
    Add a ZipEntry for each entry in the jar file.
    To read jar files use the class JarInputStream and get all JarEntry.
    It should be straight forward.
    Uwe

  • How many Ways jar files from ear file on a jboss can be downloaded on clien

    Aoa
    How many Ways jar files from ear file on a jboss can be downloaded on client side
    like jnlp etc..
    Regards
    M Fazal Ur Rehman

    First, you need to be able to boot from the Recovery HD:
    Boot Using Command+R keys:
      1. Restart the computer.
      2. Immediately after the chime press and hold down the
          "COMMAND" and the "R" keys together.
      3. Release the keys when the Utilities Menu appears.
    Once at the Utilities Menu select Terminal from the Utilities menu in the screen's menubar. Now, you need to know where these new files are located. You move to any location using the 'cd' command such as cd /Users/user_name/Documents, then press RETURN. Replace user_name with your actual username. Next you need to do a directory listing to see if your files are in that location, Documents. Use ls -al to do a directory listing of the files and folders in Documents. If you find your new files there, then connect an external drive or flash drive. You will need to know the name you have assigned to this drive. It needs to be already formatted. Copy your files using cp /Documents/filename /Volumes/volname/filename. Replace volname and filename with those that apply. Press RETURN.
    Or take it to your local Apple Store and see if they can do the chore for you.

Maybe you are looking for

  • How to add photos taken in iOS 8 to albums migrated from iPhoto

    Does anyone know how to add photos taken in iOS 8 to albums migrated from iPhoto, or do I have to set up another set of albums?

  • MGP Compose Timeout

    Hi people, When we try to sync about 80000 new rows to the server we receive the following in mgptrace_sys1.log log-1: ============== Server Exception - Begin ================== java.lang.Exception: MGP compose timed out for C2131_01      at oracle.l

  • Replacing GET by a SELECT query

    hi all. i have a get+check options syntax in a report. i want to replace the code with a select query.. i want to replace GET + CHECKby SELECT+WHERE... but when does this GET statement end? like if i replace it with select, then i would have to put E

  • Randomly play single item from array?

    Super rookie here to Flash. Is there some basic AS3 code to have, when the swf loads, a single video play from a collection of videos in an array? And can said code also apply to sound without video? I just found out the tutorial I was using to rando

  • Solaris 9 container

    anyone tell me how can i install solaris 9 container on solaris 10, also give me a details a bout solaris 9 container (information), and what is the rquirments needed to run solaris 9 containers in solaris 10. Thnks in advnc, Basem