Do I need to add to add a new jar file to the WLS ?

I am new to java development and would like to know if I were to use a new jar
file developed by another party in my EJB development, do I need to have this
jar file available in WLS when I deploy the EJB to it ?
I think this is not required but just need a confirmation.
Thanks

Hi,
I take this to mean you are using java classes from the 3rd party jar in your
EJB bean class. If that is the case, then you need the jar file in your classpath
when you compile the EJB classes.
Also, you will need the jar file to be in the classpath when the EJB is used.
You can do this in a variety of ways. If the 3rd party jar is going to change
infrequently, then you can put it in the system CLASSPATH in your startWebLogic
script. Or you can add all the classes of the jar file in the root level of the
EJB (Yuck!!).
Perhaps the best answer is to create an enterprise application (EAR). Then you
place the jar file in the root level of the EAR. In the META-INF\MANIFEST.MF
file of the EJB place
Class-Path: filename.jar
Then when you build the .ear file use:
jar -cvfm ..\commuterLog.jar META-INF\MANIFEST.MF *
hope this helps,
pat
"John" <[email protected]> wrote:
>
I am new to java development and would like to know if I were to use
a new jar
file developed by another party in my EJB development, do I need to have
this
jar file available in WLS when I deploy the EJB to it ?
I think this is not required but just need a confirmation.
Thanks

Similar Messages

  • How do I add a jar file into the build path of the compiler?

    Hey,
    I'm trying to import a jar file into the build path of the compilation process, but it does not find the packages or the classes that are in it.
    I think I don't add it right...
              ArrayList<String> options=new ArrayList<String>();
              options.add("-d");
              options.add(targetDirectory);
              options.add("-classpath");
              for(String str:includeDirectory)
                   options.add(str);
              if (!compiler.getTask(writer, fileManager, diagnostics, options, classes, compilationUnits).call());
                    ....and I've tried this way:
         public void setTargetDirectory(String targetDirectory) {
              this.targetDirectory = "-d " + targetDirectory;
         private void compile(Iterable<? extends JavaFileObject> compilationUnits) throws Exception {
              ArrayList<String> options = new ArrayList<String>();
              options.add(targetDirectory);
              String classPath="-cp ";// tried this also with "-classpath"
              for (String str : includeDirectory)
                   classPath+=str+":";
              options.add(classPath);
         if (!compiler.getTask(writer, fileManager, diagnostics, options, classes, compilationUnits).call())
              // throw new Exception("Compilation Error");
         }Thanks in advance,
    Adam.
    Edited by: Adam-Z. on Feb 24, 2010 5:41 AM
    Edited by: Adam-Z. on Feb 24, 2010 5:42 AM

    Thank you for your reply,
    Q: Are there .class files in that directory in that jar file? (the compiler doesn't ( can't )) look for directories, it can just look for specific files , and scan to get a list of all files matching certain criteria. So if there are no class files, it will say the package doesn't exist, even if there is a directory, possibly containing other files.yes there are class files in the jar, the tree structure:
    j2MeDataChunkGenerator_Plugin\(lots of class files)
    META-INF\manifest.mf
    and thats it.
    , your code will only work on windows because other platforms use a different path separator. You should use java.io.File.pathSeparator not explicit ';" when building your classpath. (this is unrelated to your problem, but you should correct it)will do, thanks.
    Q: Is that error in your post formatted by your own diagnostics? (we could possibly help you better if we didn't have to guess!!)I would not post my own error code, this text is generated by the compiler diagnostic.
    {code}
         System.err.println(" Error details: " + diagnostic.getMessage(null));
    {code}
    Q: Is line 3 of ImageCroper_Editor.java (sic) an import statement? (we could possibly help you better if we didn't have to guess!!)it is an import error... didn't the error message stated that it is an import problem? wired, I'm sure before it did. anyway it is an import error.
    Also you don't show us what the variable includeDirectory is in terms of type, and contents, that might be helpful. (we could possibly help you better if we didn't have to guess!!)It has only one String object: "D:\%Important Documents\WorkSpaces\PacMan\ApplicationManager\Plug-in\Data Chunk Designer.jar"
    the last file on the classpath list.
    Q: Have you proven this? that i did post, in this long line of text.
    Q: Is the compiler finding other classes (in other packages) in that same jar file?No. all the class files are in the jar, they all have entries that start with "j2MeDataChunkGenerator_Plugin\*.class", and since I get 47 errors I guess it does not load any other class.
    thank you for you comments, the problem with having these errors, is that I can't even get a piece of information where this error is coming from, only that it is an import loading error package not found, what does that mean? that the jar was not loaded in compilation(no error about this), that the jar is corrupted(no error about this), that the path is incorrect(it is correct I made sure), that there is no such package in the jar(There is), that the compiler does not load the package(does it even do that?), really I can't even guess why this happens, I've been at this on and of all day today, really annoying.
    Thanks,
    Adam.

  • How to add a directory into a jar file

    Hi, guys, I want to add a package into a jar file. For example, my dirctory structrue
    is org/test/, all files locate in the directory test, in org.test package. I want to
    add the package into a jar file, test.jar. I use "java -cvf test.jar -C org/test/ .
    But it says "jar: no match". How can I solve it.
    thanks

    Instead of 'java', use 'jar'.
    All in all, try this: jar cvf test.jar -C org/test/*.class.
    Have a nice day!

  • I need to sync my iPhone to new user id on the same mac.  How do I keep my iPhone contacts and music library?  I tried to sync and iTunes wanted to erase both.

    I need to sync my iPhone to new user id on the same mac.  How do I keep my iPhone contacts and music library?  I tried to sync and iTunes wanted to erase both.

    When you say a new user ID, are you referring to your Apple ID that you use to make purchases in the iTunes Store, etc? Or are you talking about a new user account on the same Mac?
    iTunes alternatives
    http://www.wideanglesoftware.com/touchcopy/index.php
    http://www.ecamm.com/mac/phoneview/
    http://www.copytrans.net/

  • How to add a jar file in the visual Age classpath

    I have to import a jar file in visual Age workspace, and don't know hox to do
    I tried several things, but didn't succeded at this point.
    I need to succed until tomorrow for completing my work.
    Please help, thanks.

    Pls do the foll actions:
    Step 1:
    File -> Import -> Selct radiobutton - "Jar file" -> Next
    -> Select the file name(ur jar file) - > click on the java button and ensure that u have selected all the file or what evre files u want " -> Finish
    If at all u r not getting any errors but the files are not apperaring in ur Project means go to
    Step 2:
    From the work bench click
    Window -> Reposiroy Explorer -> Select the Project,edition,package or type and right click and from the pop up menu click "Add to Workspace"
    This 'd work
    All the best for a successful completion of ur work
    Pramod

  • Add classpath in an executable jar file

    an executable jar file contains a manifest file with entry main-class: MyApplicationClass.
    if we double click the jar file on Windows OS, main class is loaded.
    my question is:
    if classes in he jar file use classpaths which are not default, how to add those classpaths into manifest file to tell classes to use those classpaths?
    it is similar to command line:
    java -classpath c;\mypackage; .......; MyApplicationClass

    Thanks, i will try soon.
    here is another Q.
    if i need to add tools.jar (JDK lib) as classpath in manifest file, it is as following in my PC
    d:\install\java\jdk14101\lib\tools.jar.
    but my customers install JDK in different path (should be considered as unknown), how to add it as entry Class-path for all customers?

  • How can I add jar files into the namespace in code?

    My friends:
    I need to add jar files into my namespace dynamicly in my code.But the jar files might be repeated, I am not sure.so, i wonder how can I add them into my namespace, ignoring the repeated files?
    This is my code:
    URL[] urlArrayA = new URL[5];
    urlArray[0] = sample1;
    urlArray[1] = sample2;
    URL[] urlArrayB = new URL[5];
    urlArrayB[0] = sample3;
    urlArrayB[1] = sample4;
    URLClassLoader urlClassLoaderA = URLClassLoader.newInstance(urlArrayA);
    URLClassLoader urlClassLoaderB = URLClassLoader.newInstance(urlArrayB);
    how can i visit classes in urlClassLoaderA from classes in urlClassLoaderB?

    could anyone please answer the question for me ? thank you...

  • Add 'soft link' of a shared file in the body of message.

    I want to know if there is a way to hyperlink a shared file which is on a server and add it in the body of message rather than sending that whole file as an attachment. So that when the recipeint receives the e-mail, he/she can just click on the link and that particular file will open.
    I hope my question is clear enough. I need your expert opinion in this matter. Is this do-able or am I crazy?

    I tried doing the same thing. I guess I am doing something wrong.
    I have a webserver and folder named projects under webserver. I want to access a file from the projects folder. Hence my absolute file path looks something like this:
    \\Web_Server\web_server\projects\bci.doc . How can I make this path as URL? I understand that if I have any internet website or any ip address, I can hyperlink it. But I am not sure, how can I hyperlink a file path such as this.
    I have tried the following code in the javamail:
    String tempFileName ="Web_server/WEB_SERVER/Projects/BCI.doc";
    </font>";
    This did not help me.
    Please help.
    Thanking you in advance,
    Riddhi.

  • How to add empty folder in a jar file ?

    Well
    I know how to add files in a jar file but I cannot add empty folder.
    I would like to do this so that when I get back the jar file I can have all the structure of the save main folder.
    I also test that it is possible to do that on line with the "jar" command.
    Does any of you know how to do this programacticaly ?
    Thanks in advance

         JarOutputStream jos = // ...
         jos.putNextEntry(new JarEntry("directory/"));
         jos.closeEntry();
         jos.finish();
         jos.close();on the command line:
    jar -tf <your_jar_file.jar>

  • Not able to add new log file to the 11g database.

    Hi DBA's
    I am not able to add the log file i am getting error while adding the database.
    SQL> alter database add logfile group 3 ('/oracle/DEV/db/apps_st/data/log03a.dbf','/oracle/DEV/db/apps_st/data/log03a.dbf') size 50m reuse;
    alter database add logfile group 3 ('/oracle/DEV/db/apps_st/data/log03a.dbf','/oracle/DEV/db/apps_st/data/log03a.dbf') size 50m reuse
    ERROR at line 1:
    ORA-01505: error in adding log files
    ORA-01577: cannot add log file '/oracle/DEV/db/apps_st/data/log03a.dbf' - file
    already part of database
    SQL> select a.group#, member, a.status from v$log a, v$logfile b where a.group# = b.group# order by 1;
    GROUP# MEMBER STATUS
    1 /oracle/DEV/db/apps_st/data/log01a.dbf ACTIVE
    1 /oracle/DEV/db/apps_st/data/log01b.dbf ACTIVE
    2 /oracle/DEV/db/apps_st/data/log02a.dbf CURRENT
    2 /oracle/DEV/db/apps_st/data/log02b.dbf CURRENT
    Kindly help me to add the new log file to my database.
    Thanks,
    SG

    Hi Sawwan,
    V$LOGMEMBER was written in the document,
    I query the log members as bellow
    1)select a.group#, member, a.status from v$log a, v$logfile b where a.group# = b.group# order by 1;
    GROUP# MEMBER STATUS
    1 /oracle/DEV/db/apps_st/data/log01a.dbf INACTIVE
    1 /oracle/DEV/db/apps_st/data/log01b.dbf INACTIVE
    2 /oracle/DEV/db/apps_st/data/log02a.dbf CURRENT
    2 /oracle/DEV/db/apps_st/data/log02b.dbf CURRENT
    2)SQL> select group#,member,status from v$logfile;
    GROUP# MEMBER STATUS
    2 /oracle/DEV/db/apps_st/data/log02a.dbf
    2 /oracle/DEV/db/apps_st/data/log02b.dbf
    1 /oracle/DEV/db/apps_st/data/log01a.dbf
    1 /oracle/DEV/db/apps_st/data/log01b.dbf
    But i am littile bit confused that there is no group or datafile called " Group 3 and log03a.dbf" as per the above query, how can i drop tease group and datafile.
    and i crossverified in the data top the files are exist or not but those are not existing. but still i am getting the same error that i can't create that already exist.
    can issue the bellow queris to drop those group which i dont think so it will exist?
    SQL>alter database drop logfile group 3;
    Thanks in advance.
    Regards,
    SG

  • [svn:fx-trunk] 12379: Add [ExcludeClass] metadata to new utils file.

    Revision: 12379
    Revision: 12379
    Author:   [email protected]
    Date:     2009-12-02 10:33:56 -0800 (Wed, 02 Dec 2009)
    Log Message:
    Add metadata to new utils file.
    QE notes:
    Doc notes:
    Bugs: SDK-23930
    Reviewer: Deepa
    Tests run: checkintests
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23930
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as

    Update: actually this has nothing to do with i915 (I can see the issue earlier in the journal), and after hours of downgrading/reupgrading madness the problem just disappeared... It was probably a bug of Firefox because of the number of tabs opened in the same time or something like that... Maybe related to a website in particular, since I saw some libmozalloc segfault in the log. Anyway, topic invalidated.

  • How do I add my own JAR file to the classpath?

    When I put a JAR file containing several compiled Java classes in the '/opt/SUNWips/lib' directory they are not found while compiling a JSP-Provider. When I extract them from the JAR it is not a problem (I think because the '/opt/SUNWips/lib' directory is already in the classpath).
    Where can I add my JAR to the classpath?

    I have been successfully editing the jvm12.conf file to add jars. This is
    the web server config file in
    /opt/netscape/server4/http-your.server.com/config directory. Add to the
    jvm.classpath line with all the other jars. Yes, lib is in the path, but
    Java doesn't see inside the jars unless they are explicitly in the path.
    "Ulf Licht" <[email protected]> wrote in message
    news:[email protected]..
    When I put a JAR file containing several compiled Java classes in the
    '/opt/SUNWips/lib' directory they are not found while compiling a
    JSP-Provider. When I extract them from the JAR it is not a problem (I
    think because the '/opt/SUNWips/lib' directory is already in the
    classpath).
    Where can I add my JAR to the classpath?
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • How to add a new Spread file to the existing one IDML?

    I'd to know how add new spread in IDML file exists.
    In the file designmap.xml, I put and changed somethings:
    1) I put some tags; the tags are:
      <idPkg:Story src="Stories/Story_u1fc.xml"/>
      <idPkg:Spread src="Spreads/Spread_d467.xml"/>
    2) I also added the attribute StoryList which values u1fc.
    In addition to this,The StoryList attribute belongs to element Document.
    3) And I changed the attribute Length of element Section, to 5, which was 3; because my new spread have 2 pages.
    In IDML file final, have files in each folder, but when I open the file in InDesign IDML, it does not open .... crashes the application.
    what should I do?
    Thanks

    Hello Diego
    The SAP GLOBAL 2.0 should be downloaded from the Service marketplace. Follow the URL : [http://service.sap.com/swdc|http://service.sap.com/swdc] and search for SAP GLOBAL.
    You will find the following SWCV - XI CONTENT SAPGLOBAL 2.0. If you have relevant access, you can download the same as a .tpz file and then import it into your ESR.
    Hope it clarifies things.
    regards
    Rathish

  • How to add my class into rt.jar file?

    Hi, everyone!
    I am using WinRAR to extract the package rt.jar and added
    my class file to javax folder. Then I use jar c0vf to create
    a package. After that, I restart my WSAD4.0.2. But it seems
    that WSAD4.0.2 can not be started. (It stops at the welcome
    screen for a long time.)
    Anything wrong I have made? How to resolved the reouble?
    Cheers,
    George Ma

    Thanks!
    Do you know how to add .class file to a project of WSAD4.0.2?
    I use CLASSPATH, but always failed in IDE. But it works in
    command line environment. I want to use some classes in a
    .class file.
    Can you help?
    Cheers,
    George

  • Help can't add new jar files into BDK beanbox(plz see details)

    I am unable to load new jar files into bdk beanbox inspite of
    packaging bean class file and manifest file in a jar file and
    placing it in bdk jars directory. On trying to load it says(THE JAR
    FILE DOES NOT HAVA ANY BEANS).
    SEE THE EXAMPLE BELOW:
    I made a manifest file BeanTest.mf as
    Name: BeanTest.class
    Java-Bean: True
    Then the BeanTest Class comprises of
    import java.awt.Point;
    public class BrokenProperties extends Point
         public void setSpot(Point point)
              this.x = point.x;
              this.y = point.y;
         public Point getSpot()
              return this;
    Please help....

    you have many little errors in program. try as below and let me know..
    public class BrokenProperties extends Point implements serializable
    private Point xy;
    public BrokenProperties()
    public void setSpot(Point point)
    xy=point;
    public Point getSpot()
    return xy;

Maybe you are looking for

  • I can no longer access tesco bank after Safari upgrade

    Since the recent safari upgrade when I attempt to login to my tesco bank credit card account I simply get a balnk white screen. Tesco say they have had other customers with this problem but cannot help which is nothing unusual!

  • Conversion settings from fcp to dvd studio pro?

    i have a seven minute short subject that i need to burn to dvd using dvd studio pro. before i export from fcp, wanted to double check my fcp export settings with anyone who's been there before. here's my choices: export with quicktime conversion, und

  • SCCM 2007 different between messagestate (-1) and (1)

    Dear Exprt, Can you please tell  different between below two option? Message ID MessageState MessageStateName MessageName 65535 -1 Accepted - No Further Status Program received - no further status 10002 1 Accepted Program received [email protected]

  • Should I get a Macbook Pro 15 inch? (details below)

    Main needs: playing sims 3 (4 when it comes out) imovie, garageband, photobooth safari (just social networking and tv shows) pages itunes maybe

  • A general error has occurred. libclntsh.so.10.1: wrong ELF class: ELFCLASS6

    Hi All, we have OBIEE installed on RedHat Linux (64-bit) and getting bellow errore while trying to update row count from RPD. we are using OCI to connect to oracle database(installed oracle 10g 10.2.0.1 64 bit) and our OBIEE is 32 bit. I have followe