Adapter jar file in classpath ?

Hi All,
          Is it still a requirement to put the adapter jar file in classpath for the
          adapter developed using ADK in WLI2.1 and WLS6.1SP1 ?
          coz if I dont put it in the classpath, then its not able to find the message
          bundle files (.properties and .xml) !!
          Thanks
          Amit
          

then i created a jar file named darshan.jar with following command :
jar -xvf d:\darshan.jar darshan/*.classThat command doesn't create a .jar file, it extracts files from an existing one. You need to use c instead of x to create a new .jar file:
jar -cvf d:\darshan.jar darshan/*.class

Similar Messages

  • Adding Classes to the JAR File's Classpath

    Ques 1- Can I use the wildcard * symbol in Manifest file to add classes/othes jar files to the JAR File's Classpath.I have folder named - Lib . where there are many jar files.Now,do I have to add each jar file by- Class-Path: Lib/jar1-name Lib/jar2-name . Instead, can I do this- Class-Path: Lib/*.jar OR Class-Path: Lib/*.class
    RIDICULOUS....105 views has been made but YET NO ANSWER. Isn't there anybody who knows the answer.
    Edited by: Tanvir007 on Apr 30, 2008 2:21 AM

    Ques 1- Can I use the wildcard * symbol in Manifest file to add ... other jar files ...?No. You could, however, place all your needed JARs in JavaHome/jre1.x.x/lib/ext - if this is a way for you.
    Ques 2 ??
    RIDICULOUS....105 views has been made but YET NO ANSWER.What hindered you to test it yourself?
    And the things we don't know far exceed the things we know. Why do you wonder?
    Have a nice day
    J�rg

  • Did u use jar files as classpath for appletviewer?

    as tested, jar files can not be used as classpath for appletviewer.
    java command is bellow
    appletviewer -J-classpath -Jc:\folder00\some.jar; -Jc:\folder01\any.jar; MyAppletClass
    the jar files (or classpaths) above do not work.
    I am not sure about my test, so i post my Q here for confirming it.
    thx

    appletviewer needs HTML code to run an Applet similar to how the Applet would be run from a browser. It does not have a Classpath option.
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/appletviewer.html

  • How to run jar file with classpath?

    Hi, all,
    I have some package in my project, with which I have a java help jar file as classpath, when I run my project, I need the jh.jar file in directory /jar/jh.jar.
    Now, I bundled all my class packages into a jar file, my.jar, together with the /jar directory. When i run my jar file with command:
    java -jar my.jar
    It tells me couldn't find javahelp class.
    What shall I do? How can I create my jar file with the jh.jar?
    Thanks in advance.

    Thanks, hjembaek,
    But it doesn't work for me. I am running in windows, it still generate the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpSet
    at own.gui.OwnMenuToolBar.getOwnHelpBroker(OwnMenuToolBar.java:560)
    at own.gui.OwnMenuToolBar.addHelpMenu(OwnMenuToolBar.java:327)
    at own.gui.OwnMenuToolBar.getOwnMenuBar(OwnMenuToolBar.java:188)
    at own.gui.OWNDPTool.initGui(OWNDPTool.java:55)
    at own.gui.OWNDPTool.<init>(OWNDPTool.java:39)
    at own.gui.OWNDPTool.main(OWNDPTool.java:100)
    Here is my command to generate the jar file:
    jar cfm Own.jar temp.txt help own log others
    temp.txt is the file including the main class and class path information
    I have help folder, log folder and own package, others is directory that has the jar file(others/jh.jar)

  • Jar file and classpath problem

    I0m writing a program that use the kunststoff.jar Look&Feel.
    Now I would like to put all I'm writing into a jar file but I always have a NoClassFoundException when I try to start my application.
    here is a MANIFEST:ME I'm using:
    Manifest-Version: 1.0
    Created-By: 1.4.2-beta (Sun Microsystems Inc.)
    Main-Class: JListaR.JListaR
    Class-Path: kunststoff.jar img\ .why this don't work?

    Unfortunately you can't embed jars within a jar and
    expect them to be referencable for the classpath from
    outside the main jar. The "Class-Path" attribute in
    the manifest is used to refer to other jar files
    outside of your jar file.
    The usual approach to solve this problem is to unpack
    the jar files you want to embed and then rejar
    everything together in one big jar file again. This
    isn't always a great approach though, I know I'm
    looking for an alternative. So far my only alternative
    is dynamic class loading using a classloader, however
    this isn't great if you need to refer to several
    hundreds or even thousands of classes.thank you very mach...now I understand because it dosen't work correctly!

  • Jar file and classPath

    Hi,
    I have created a jar file using jar cvmf manifest classes.jar *.* in a directory under wich I can have put all my class files.
    When I run the class containing the main program, everything works fine. However, when I run the executable jar file, I get access to the main method (which calls a swing JFrame which shows a menu), but the classes called by the JButtons on the menu do not react. I seem to be having a problem in my classpath. I am working in NT4, and have included in my classpath the full pathname (d:\classes\classes.jar). Can anyone help please?

    Are you getting any error messages? Have you put debugging code in those classes to see what is happening?

  • Jar files and classpath

    Hello
    i have built a console application in jbuilder which depend on some jar file as libraries (example log4j ....)
    when i run it from jbuilder i have no problem... but when i try from console i get the following error
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at fluxpromo.clsMain.main(clsMain.java:45)
    i know its a classpth issue but iam not able to fix it .. anyone can help me out with this
    thx

    i did using java -classpath D:\log4j.jar -jar
    app.jar
    but still have the same error, any idea why?When you use the -jar option, the only classpath that is used in the Class-Path in the jar. So you need to use either -classpath or -jar, but not both. For example,
    java -classpath d:\log4j.jar;app.jar;another.jar main.package.MainClass

  • Execution from JAR files and Classpaths -- Help

    I am confused about how classes are resolved when running from within a JAR file, and why this is different than running a class that is not inside a JAR file.
    I have an application that uses classes from a third party library stored in a JAR file (biojava.jar) . If I run the app from the class file it works as expected and is capable of finding the external classes when the path to the biojava.jar is on my classpath. It also works if biojava.jar is instead placed in the extensions folder jre/lib/ext folder without an explicit path entry in my classpath.
    However when I package all my application classes up in a JAR file and try to execute the application from the JAR file it will ONLY work if I add a manifest entry to myApp.jar ... Class-Path: biojava.jar AND I place the file biojava.jar in the SAME directory as the Packaged JAR application. I would like to find a way to make this JAR file work for anyone who has biojava.jar in their classpath or ext directory. In other words I don't want my user community to have to copy the biojava.jar file when I email them myApp.jar. This community will already have biojava.jar on their CLASSPATH.
    How can I make my app within a JAR recognize either the user's CLASSPATH or ext folder? I have tried reading the documentation and many experiments but the only way it works is as described above.
    I am running Running Windows 2000.
    java version "1.4.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
    Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
    Here are the results of my experimentations:
    The following Works:
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: biojava.jar
    Place biojava.jar in the same directory as SequenceSpiral.jar
    java -jar SequenceSpiral.jar
    This works perfectly
    NONE of the following work
    0) Placing biojava.jar in my jre/lib/ext directory instead of the same dir as SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    (this is the first class referenced from biojava.jar)
    1) Just see if it will find the proper jar on my classpath
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    I have biojava.jar on my classpath but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    2) Specify the name if the jar in the Manifest Classpath and see if it will find the proper jar on my classpath
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: biojava.jar
    I have biojava.jar on my classpath but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    3) Specify the path of the jar in the Manifest Classpath
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: d:/biojava/biojava.jar
    I have biojava.jar on my classpath (D;\biojava\biojava.jar) but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    (note that in this case it is not fnding my main even though the Main-Class is specified)
    4) Specify current directory and biojava.jar in the Manifest Class-Path
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: .;biojava.jar
    I have biojava.jar on my classpath (D;\biojava\biojava.jar) but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter
    5)Specify current directory and the URL of biojava.jar in the Manifest Class-Path
    Manifest: Main-Class: org/biojava/app/SequenceSpiral
    Manifest: Class-Path: . d:/biojava/biojava.jar
    I have biojava.jar on my classpath (D;\biojava\biojava.jar) but not in same directory as SequenceSprial.jar
    java -jar SequenceSpiral.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/seq/FeatureFilter.
    Thank you very much for any help or suggestions,
    David Maynard

    I did some more testing and I think I now understand what is going on.
    I don't like it, but at least I understand it.
    The problem: I have an app packaged into a JAR file, myApp.jar. It has a dependancy upon an external JAR file extern.jar.
    extern.jar is on my Classpath (and also in jre/lib/ext)
    1) For some reason (bug?) java -jar myApp.jar does NOT use the classpath or the jre/lib/ext mechanisms to find .jar files needed to resolve references to external classes. This seems to be true even if you add an explicit -classpath argument on the command line!
    thus
    java -jar -cp c:\\absolutePathToMy\extern.jar myApp.jar
    also fails as does
    java -cp c:\\absolutePathToMy\extern.jar -jar myApp.jar
    2) Inside the myApp Jar file you can specify a URL to an jar extension jar file but the URL IS RELATIVE TO THE PATH WHERE THE myApp.Jar is executed from! If I add the Manifest item Class-Path: ..\..\..\myexterndir\extern.jar then
    java -jar myApp.jar
    works correctly and resolves the external references.
    This is why several people have reported that this class-path mechanism works ONLY when the extern.jar file is in the SAME DIRECTORY as the myApp.jar file when they had added a Class-Path: extern.jar to the Manifest.
    However together these two items make it IMPOSSIBLE to distribute myApp.jar to others and have it work since the path names statically encoded inside the jar are relative to where the jar gets executed from. If I move myApp.jar to a different location on my hard drive it may also fail.
    In my case I know all my customers already have extern.jar (5MB) installed on their classpaths and I would like to just send them the myApp.jar ( .5MB ).
    However I don't see how to do this given the current specification of a JAR file, and the bug that makes all -jar file act like they have the Sealed=true property.
    I tried explicity setting Sealed=false in the manifest but this didn't seem to have any effect.
    I hope that this will save others the many hours of time it has taken be to determine that JARS are not well suited for deploying apps with dependenncies on external libs.
    I also hope that someone can show me how execute a JAR and specify a classpath that doesn't get IGNORED my the classloader used in loading the jar classes.
    This is using java version:
    java version "1.4.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
    Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
    Does any one know this bug is fixed in a later release?
    David Maynard

  • Executing JAR file ignores classpath

    I have recently been working with JAR files, and manifest.mf files. I have discovered that the only classpath that the jar file will ever use is the one defined in the manifest file.
    Apparently, specifying the classpath on the command line, or through the CLASSPATH environment variable is ignored by the JAR file.
    Can anyone explain why this is the behavior for jar files?

    Can anyone explain why this is the behavior for jar
    files?Because the Class-Path parameter in the jar's manifest file is the value that controls where Java looks for your classes.

  • Executing jar files - why classpath is so rigid ?

    If someone gives me a jar file with a Main in it and some supporting
    library jar files, the Manifest.mf will contain information on what
    the Main class is and also the location of supporting library jars
    RELATIVE to the application jar file. But once I get the jar, I want
    to move the supporting jar files to some other convenient directory.
    But If I do that, the application jar file will not be able to locate
    the supporting classes since the Manifest file has the supporting jar
    paths pretty much HARDCODED ! How do I override the hardcode and give
    it a different search path so that it can start looking at the new
    directory ? This rigidity makes it so painful during times of
    distribution. Please help.

    Well, actually I was not meaning this, though it could work as well...
    There is some classpath in the manifest pointing to some other (external) jar. (Whoever did that, forced this kind of problem to come up!)
    So you don't need to replace the -jar switch but to append the supporting jar-file to your CLASSPATH, so that it can be found together /w the programm itself.
    But then the questioner said, that wouldn't work.. hmmm.
    Maybe a merge of ulf's and my suggestion?
    Remove the -jar switch and append both jar files to the CLASSPATH:
    - the supporting one
    - your own
    Start the program like ulf suggested before.
    Regards, tom

  • How to add jar files to classpath?

    Never mind, I figured that out.
    Edited by: leoJones on Mar 25, 2008 8:29 PM

    If you want the jar file to be globally accessible, add it in the $J2EE_HOME/config/application.xml file like so:
    <library path="../test.jar" />
    Then drop the jar file in your $J2EE_HOME directory. This assumes you are manually configuring the OC4J server. I'm sure there is an equivalent way to do this from the Enterprise Manager web site.
    John H.

  • Classes+resources in JAR: have to add each single Jar file to CLASSPATH?

    Hello,
    For my application, I plan to easily embed plugins that can be added by the user by copying it into a subfolder "plugins".
    Now, I start my app from a shellscript and in order to load resources from within some of these Jars (e.g. using Class.getResourceAsStream() ), it only works if I explicitly add the specific Jar filename to the classpath from the shellscript.
    I read in a German Java book, that also just using folder names is enough, but it does not work for me:
    Works:
    $JAVA_HOME/bin/java -Djava.library.path="./lib" -classpath "./lib:./plugins/test.jar" test.AppFails:
    $JAVA_HOME/bin/java -Djava.library.path="./lib" -classpath "./lib:./plugins/" test.AppIs it really required to add Jars explicitly, so that e.g. my shellscript has to make a Jar listing of that folder in order to pass them as classpath files?
    Thanks and regards,
    Timo

    No, you don't have to do it that way. What you need
    to do is to have your progam create a URLClassLoader
    pointing to all the jars in the plugin directory.
    Then request your plugin classes from that, rather
    than Class.forName();
    You need to create an array of file URLs for the
    jars, use File.listFiles() and then File.toURL() on
    each ..jar you find.
    p.s. If you do it this way make sure your plugin
    classes are not on the classpath.
    Hmm. Cool. I had no idea. Thanks for correcting me.

  • Web application can not find apphome /WEB-INF/lib/*.jar files in classpath?

    I need to add the jsse jars to one of my servlets. I do not want the jsse in the server classpath(jvm12.conf) however, because this screws with some credit card jar I am using. Can't I have a per application classpath with the /WEB-INF/lib directory? This is iWS 6.0.

    In iWS 6.0, the context information such as a context path of the web application and other properties are defined in web-apps.xml file.
    'class-loader' element in web-apps.xml file can be be used to specify the class path to a web application and customize how the application is serviced.
    Refer to example web-apps.xml file in Prog. guide to Servlets for more details.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/war.htm#33557

  • What are the basic .jar files to be set in web dynpro project classpath

    Hi,
    I am having a problem while customizing the ESS. I used DTR, DC and imported configuration. After that, I created project from one of the DC(say ess/jp/addr). Later when I open an iView from any Web Dynpro component, I am getting lot of errors without even making any modifications.
    I closed the project and reopened it and reload & rebuilt, but it doesn't solved my problem. In my classpath settings I couldn't find any jar files except the jre_lib. Could you please let me know what are the basic jar files we have to set in classpath and where to get them from. We are using NWDS 7.0.06 version.
    Can you please let me know how to solve this or any other way to work around this.
    It's an urgent to be fixed as early as possible, plz help me out.
    Thanks & Regards,
    Raj

    Hi Julien,
    Thanks for your reply.
    We imported the the specified SCAs in our track.
    we are getting the following errors.
    Kind Status Priority Description Resource In Folder Location
    Error The import com.sap.xss.per cannot be resolved CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 18
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument fpm of the method loadConfiguration CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 113
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument currentPerspective of the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument perspective of the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    we manually set below .jar files in classpath settings.
    pcuixssfpm.jar
    pcuixssutils.jar
    logging.jar
    essper.jar
    Is there any alternative to work around.
    Thanks & Regards,
    Raj

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

Maybe you are looking for

  • Closing an anonymous stream in method call

    Will an anonymous stream in a method call be closed in the same manner an anonymous stream that is created in an object instantiation will be? I know this will close the anonymous FileInputStream: DataInputStream in = new DataInputStream(new FileInpu

  • Dreamweaver CS 6 crashes when inserting images

    Dreamweaver CS 6 crashes when I try to insert images into a webpage. This makes the app pretty much useless. It crashes when the alt attributes window pops up. How do I  stop this from happening? I'd like to actually be able to use this VERY EXPENSIV

  • Cloud Connector - Contact Creation in Eloqua

    I am building a new Cloud Connector. I have reviewed the following doc http://img.en25.com/Web/Eloqua/EloquaCloudConnectorSampleGuide.pdf In the above example, the doc assumes the email address already exists in Eloqua. The Cloud Connector is used to

  • I purchased a song and can't get it to play on my iPhone5. Any help? Thanks :)

    I purchased a song from iTunes and it will not play on my iPhone5. It works fine in iTunes. Any help? Thanks!

  • Optimal settings for encoding HDV 1080i footage to SD dvd

    I have footage recorded from an HDV camcorder and edited in FCP 1080i 60. It is fast moving sports footage shot with a high shutter speed the total running time is 40 min. I have encoded it to DVD by taking the HDV 16:9 FCP sequence dropping it to a