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!

Similar Messages

  • How do u out your own video files on the ipad?

    How do u put your own video files on the ipad and once u have done it where do u look to find it to play

    You load them into iTunes and then sync them to your iPad. You'll then find them in the Video app. For detailed information, consult the iPad User Guide; the sections on Synching and Videos will be most applicable. Then if you have specific questions, post back and we can help further.
    Regards.

  • Including jars file to the classpath using javac

    Hi
    I'd like to compile a file including a jar file to the classpath.
    In wich way is it possible?

    Click on the appropriate operating system for the item "Setting the Classpath"
    at http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

  • 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

  • How can i add update signed jar file

    I am developing an applet which requires signing to run in a browser.
    I am developing supporting classes. But these class files have to be added
    to the jar. Isnt it??
    But to test the applet i need to load it in the browser each time i modify the class files. So the jar file need to be updated every time. But an
    IOError
    is being displayed when i try to update the signed jar file.
    How can i update signed jar file?? Or is there any othe way to test the signed applet during development??

    How can i update signed jar file?You can't, the signature is there to make sure the content of the jare hasn't been messed
    with.
    Either recreate the jar and re sign it or set up a policy during testing.

  • How Do I Add an Existing htm file to the list of pages in Contribute ?

    We have a copy of Contribute. We were told that you could
    create pdf files on the fly - - when we tried to do this we got an
    error message saying we needed to have Adobe 8 pdf creator. This is
    more expense to an already expensive project. I can create a web
    page from Excel or WORD and I want to know how to link that page in
    Contribute. Can anyone please help ? Many thanks,
    Gypsygranny

    I think you think of:
    Project settings:
    Configurations-Development-Libraries...
    There you can create a new Library which contains your jar..
    And also it is in Tools/Manage libraries menu..
    There you must add user libraries
    Viktor

  • Which jar file for the classpath ?

    At my office on my machine i have weblogic 8.1 and tomcat installed.
    weblogic have 2.3 version of servlet and
    tomcat have 2.4 version of servlet
    weblogic is for production purpose (development of servlet, jsp and ejb)
    and tomcat is for my own practice. (just for servlet and jsp)
    i have weblogic.jar as well as servlet-api.jar in my class path.
    now when i compile my servlets which jar file the compiler will use to create the classes.
    if the compiler chooses servlet-api.jar will my servlet run in weblogic
    else
    if the compiler chooses weblogic.jar will my servlet run in tomcat

    i have weblogic.jar as well as servlet-api.jar in my class path.What does this mean? Do you have a system CLASSPATH environment variable?
    Bad idea.
    now when i compile my servlets which jar file the
    compiler will use to create the classes.You should set CLASSPATH using the -classpath option on javac.exe.
    The compiler won't "choose" anything, because it has no idea how you'll deploy. It'll use the one that you tell it to. If you have just a system CLASSPATH it'll always use the first JAR that it finds with the packages it needs.
    You need to specify exactly what you want the compiler to use.
    In the case of servlet.jar it might not matter, because that's pretty standard. JSPs and EJBs are another story, however. If you change deployment, it's best to recompile and repackage the Web app.
    Learn Ant. It'll help you automate this.
    %

  • Including jar files in the classpath while compiling

    While I compile, I want my class to be able to find the two jar files that are in the same directory as the class that I'm trying to compile.
    c:\brandNew\src\myClass.java
    c:\brandNew\src\lsw-services.jar
    c:\brandNew\src\jdom.jar

    If you are compiling in c:\brandnew\src
    you do
    javac -cp lsw-services.jar;jdom.jar myClass.java

  • How can I add a .mov video file to the beginning of an existing .mp4 video file?

    I normally use final cut for all of my editing but Im having a lot of trouble converting this mp4 with bad pixelation.
    The mp4 is my only master copy of my original 8mm student film.
    It has some bad opening titles I need to alter and I need to slap my production logo on the front before I can even think of releasing this again.
    Any ideas?

    I normally use final cut for all of my editing but Im having a lot of trouble converting this mp4 with bad pixelation.
    The mp4 is my only master copy of my original 8mm student film.
    It has some bad opening titles I need to alter and I need to slap my production logo on the front before I can even think of releasing this again.
    Any ideas?

  • Give me a convenient method to add an external jar file to JRE.

    At past, when i use some external frameworks like struts,servlet, i should set the classpath as:
    .;C:\jdk1.5.0\lib\tools.jar;C:\jdk1.5.0\lib\xercesImpl.jar;C:\ApacheGroup\Tomcat 5.5\common\lib\servlet-api.jar;C:\ApacheGroup\Tomcat 5.5\common\lib\struts.jar;C:\classes\;C:\ApacheGroup\Tomcat 5.5\webapps\struts-blank\WEB-INF\classes\
    when i want to use an exeternal framework, i must add the %INSTALL_PATH%\someframeworkname.jar to the classpath.
    But i feel that is inconvenient for me, for example,I want to use jaxp,jaxr,jaxm,jaxrpc,saaj, I must add each of the jar file to the classpath.
    I think that must be a convenient method to do that?
    Can u give me a method?

    hi
    As I think u have to follow this step to use external jar in jre.
    1. Find installed jre path in one variable
    2. At Installation time add jar file to lib
    U can get jre path using System property

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

  • How to add the mail.jar file to my CLASSPATH ?

    Hi;
    I wish to Instal JavaMail 1.2
    To use the JavaMail 1.2 API, i unbundle the javamail-1_3_1-upd.zip file.....and now, i would like to add the mail.jar file to your CLASSPATH.
    My question is: how do you do this ?
    - ok i did that for CATALINA_HOME & JAVA_HOME but how to add the mail.jar file to my CLASSPATH ??
    1000 thanks.

    I think you're looking for "developer support", not packaged application support. different server, different batch of groups. . .
    Since I have very little contact with devopers, I don't truly know.

  • How to add one poi jar file into webdynpro project

    Hi all:
        We would like to add one poi jar file into one webdynpro project, however, what should we do ?
        Its one external 3rd party jar file.

    Hi,
    To add a jar file you need to have an external library DC.
    Hope the below link will help you:
    [http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm]
    thanks & regards,
    Manoj

  • How to refer a .jar file in the code.

    How to refer a .jar file in the code.
    I want to use a library dnsjava.jar, which I download from the internet. I want to know how to refer it
         If I am compiling the code on Solaris
         If I compiling the code on windows using eclipse.
    I added the following line in my code to refer to this library. But it always complains of not found the class
    import org.xbill.DNS.*;
    I tried the following to add this library but did not work
    On eclipse/windows: Went to window-> preferences -> BuildPath _> class path Variable.
    On Solaris: Could not add this library /opt/java_reference/v1.6.0_04/jre/lib. Although I am logged in as root, but not able to add the library there. Complains of Permission denied.

    Set the classpath option when compiling.
    javac -classpath /path/to/lib/dnsjava.jar YourProgram.java
    I don't use Eclipse, but it probably has a library list on your project preferences. Add it there.
    Regards,
    Henrique Abreu

Maybe you are looking for

  • ECC 6.0 installtion on HP-UX cluster (HA)

    Hi Gurus, While installing ECC 6.0 on HP-UX High Availability Cluster, I am facing some issues... First I installed the Central Servcies Instance for ABAP. It worked fine without any errors.. Then while installing the Database instance it gave me fol

  • No pin for the Adjustment Brush

    New photo imported into LR4, applied adjustment brush and noticed there was no pin or anchor point for the brush. What happend to the pin? Closed the panel. Then opened the adjustment brush again and previous adjustment brush pin is not there - I can

  • [SOLVED] How to submit AUR package updates?

    Since yesterday I started maintaining a package. Unfortunately I don't see how I can update it. Please help. Last edited by bstaletic (2014-06-20 17:07:17)

  • Join Table from a set of records

    I will try to explain the best I can... In the first code; I have assigned my UNION result set to BCALC.   How do I modify the second query so I will get all records from BCALC and all filtered records from second query in one result set? First Query

  • Searching for make-up brush in photoshop elements editor

    Hallo,  does anybody know, how and where I can find in Photoshop Elements 11 editor a brush or tool for cleaning impurity in a picture? In Corel PaintShop Pro X5 it is called "Make-Up-Tool". I want to retouch in 100 of fotos little white marks (see a