Add library to a classpath

i have an executable jar and 3 other library jar in same directory
i want to run the jar with 3 jar library on classpath;
i run using batch file
here's what i do:
cd path
java -cp .;a.jar;b.jar;c.jar -jar myexecutable.jar
but it keep say that the library jar not present..
what possibly cause my problem?
Thanks

when you use -jar the -cp option and the system classpath are ignored and only the classpath defined in the manifest file is used. Use the link provided above to figure out how to define that.
Edit
Or better yet this link
[Adding Classes to the JAR File's Classpath|http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html]
Edit
If you want to use the -cp option (and I would suggest using the manifest not the -cp option), then include your jar one the classpath and include the call to the main class on the command line
java -cp lib:lib:lib:yourJar main.class.to.call

Similar Messages

  • Add library missing on new itunes

    Not sure what the new iTunes version it is but the most recent version appears to have the "add library" feature no longer available - just the add songs feature. I make most of my song information changes in MediaMonkey before transferring my songs to my main music folder for iTunes to add to my iPod Touch (3Gen). How do I rescan my library now?

    Miniplayer is there - but with such reduced functionality it is a wast of time!!.
    Don't upgrade.  Some people have managed to downgrade but I've have no luck so am now having to search for an alternative player.
    Interestingly, most companies with decent software gradually try to make it better - but Apple seems to just make it worse and more restricted.  Apple used to take great care over their UI and UE but these days I dread every update every upgrade as you never know how much you will lose.  I very nearly switch to Windows for my new laptop but, had purchased quite a lot of expensive software (e.g. Photoshop) and it was only that that stopped made my new rMBP Apple rather than Windows.  And every update I realise I made a mistake.
    Come on Apple.  Think about your users.  Please.  You had a market leader and are throwing it away.

  • Add xml file to classpath

    Hi all,
    Can someone tell me how I can add a xml file to my class path.
    I have add some thirth party jar files to my application but I need also the license xml in my classpath.
    Kind regards,
    Richard

    Hi Richard,
    to access the mention xml file from an EJB module the procedure would be:
    - package the XML file in a JAR, say myxml.jar
    - add myxml.jar to an existing or newly created library
    - let your app reference this library
    Regards
    Gregor

  • [ImageIO] add plugin jar to classpath

    Hello Experts,
    I have built a WebDynpro application in which I need to resize images (JPG, PNG and GIF). I use standard library :
    boolean writeResult = ImageIO.write(bufferedImg, fileExtension, streamOut);
    This works fine, except for the GIF format for which there is no standard writer.
    I decided to use <a href="https://gif-plugin.dev.java.net/">gif-plugin</a> which should do the trick.
    According to the plugin documentation : "<i>Just copy the plugin jar to somewhere in the classpath.
    The jdk should automatically detect the plugin</i>".
    I added the jar in an external library, exactly the same I do for other external jars I use.
    I can see the jar in the classpath when opening 'Project > properties > Java Build Path > Libraries"
    But seems that it is not been added to the classpath at runtime because plugin is not detected.
    Do you have any hint on that ?
    Thanks a lot.
    Regards,
    Nicolas

    In your external library DC you should create public part with type assembly - and add neccessary libs to in. Build it.
    IN Webdynpro DC you should add reference on created pp with type 'build'. Build WD DC - now Wd ear file should contain required custom jar and will be able to use it on runtime.

  • Library References and CLASSPATH

    If I add a file to a Library Reference in my Project Navigator that is not a JAR file (e.g. a .properties file), is it automatically added to my application's CLASSPATH?
    I noted in another thread that adding files to <creator_root>/lib/ext should add the file to the CLASSPATH. Is this true? Is it a better approach towards adding a non-JAR file to the CLASSPATH?
    I'm using a library that is supposed to load a properties file automatically if it is anywhere in the CLASSPATH for the application, but I don't think its doing so...
    James

    No, you cannot add non-library resources to the classpath using the Library Manager, but I suspect this is not necessary.
    Please see the response to http://swforum.sun.com/jive/thread.jspa?threadID=56160

  • External hard drive, laptop, having to re-add library folder every startup

    Hi,
    I have my music library on an external hard drive that is attached to my laptop. Each time I disconnect and reconnect the drive, although iTunes shows all my music I am unable to play anything. I get the message that the original file could not be found.
    I believe the hard drive was set to (F) but it could have been (E) and iTunes doesn't seem to be able to show me which folder I had added before.
    Can anyone help me with this?
    Also, I am unable to add songs to my iPhone, even when iTunes was able to play the music.
    Thanks for the help,
    Dean

    You might also find my scripts Unconsolidated and ConsolidateByMoving useful. The first can make a playlist of all unconsolidated tracks, the second can consolidate a selection of tracks by moving them instead of copying which saves you manually cleaning up the source folders.
    See also: Make a split library portable.
    tt2

  • How to manually add library to my WL domain using admin console?

    Hello All,
    In need to manually add the JSF2:0 shared library into my
    domain using the admin console. How can I do that?
    Should I go to Admin Console -> Deployments -> Install -> Upload (from my desktop) -> now how do I tell where this should be installed in weblogic?
    Thanks,

    this link http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e13952/taskhelp/library/DeployLibrary.html shows the steps involved

  • Add library to server

    Hi. I am a newbie to the creator, so I first appologize.
    I am working with struts and I am getting the next error:
    javax.faces.el.MethodNotFoundException
    I guess it is because the libraries for JSF are not deployed to the server. How can I do this from the IDE.
    I have another problem: when I try to enter the admin console I am asked for an user and psw. But the point is that I was not asked for one during instalation.
    Thanks.

    The JSF libraries are part of Sun Java System App Server 8. No need to bundle them in the application you deploy or to set this up manually.
    What stack-trace are you seeing?
    I would rather think that this is an application (or Creator) issue. Can you send you .jsp page an associated .java source file?
    -Alexis
    PS: if you really need to add libraries to the app server CLASSPATH use the Web GUI : JVM Settings -> Path settings -> Classpath Suffix

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

  • ADD JAR LIB TO CLASSPATH FOR TOMCAT

    Hello,
    I'am running a web application which also operates an automatic sending of mails.
    When I run my files on Jbuilder all things are OK.
    But when I test my application with Tomcat I have this error:
    Error: 500
    Location: /ApplicationXTS/servlet/net.projet.ControlCreateObject
    Internal Servlet Error:
    java.lang.NoClassDefFoundError: javax/mail/MessagingException
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Unknown Source)
         at org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:298)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
         at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Unknown Source)
    Thank you for your help.
    F.S

    It seem the required class files are not set in the tomacat classpath.im not sure which version of tomcat u are using.add the corresponding javamail jar files (including activation framework)in ur machine and set classpath accordingly.
    HTH.

  • Got new pc want to add library

    i recently purchased a new laptop and started a new itunes account. problem is i cant do anything with this new account without erasing my old library. i have a pretty extensive amount of music, video, and data on phone. is there anyway to transfer my library to this new computer? oh by the way im not very computer savy so please give very detailed instructions

    Files on the iPhone are just synced copies of what is on your old computer.
    Do you not have your old computer still? If so, just copy all your files off there to your new computer.
    The iPhone (or iPods, etc) are not backup devices be design. The program the other user pointed you to is a 3rd party developers way of getting to files that technically you were not supposed to be able to get to.
    So if you still have your old computer, do you have a network at home? (Both computers on same network if so?)
    If you do have old and have a network, tell us your OS and I am sure we can walk you through making a share and copying all the files from old to new.

  • AttachMovie adds library item twice?

    Hi everyone!
    I've come across this problem for the second time now, and
    I'm still not sure what solved it the first time.
    I have a timeline that contains the clip "contentMC". On the
    same timeline the following AS appears:
    _root.contentMC.attachMovie("home", "contentHolder",
    _root.contentMC.getNextHighestDepth());
    The library item "home" contains several text objects. The
    strange thing is that, while the item is added as "contentHolder",
    the contents of "home" is also added to "contentMC". So when I use
    List Objects during preview, I get:
    Level #0: Frame=24 Label="Interface Build"
    Movie Clip: Frame=1 Target="_level0.contentMC"
    Shape:
    Text:
    Text:
    Text:
    Text:
    Text:
    Text:
    Text:
    Text:
    Movie Clip: Frame=1 Target="_level0.contentMC.contentHolder"
    Shape:
    Text:
    Text:
    Text:
    Text:
    Text:
    Text:
    Text:
    Text:
    The first row of "Text:" shouldn't be there.
    I came across this problem before at a different level. That
    one was solved (I think) by replacing .getNextHighestDepth() with
    1. This time, however, that doesn't help.
    Anyone any ideas?
    I've uploaded the .fla at:
    http://www.eurovoice.nl/flash/eurovoice01.fla
    Thanks in advance!
    Yours,
    Andra

    I guess I got lost in my own plans for navigation! I
    completely forgot that the "contentMC" on the timeline was an
    instance of "home". This caused the textfields to appear there.
    I've swapped the instance of "home" with an empty movieclip. That
    solved the problem.
    Thanks kglad, for putting me on the right track.
    Devendran: I haven't had trouble attaching the "homeDiensten"
    to "home" yet, but I'll run a few online tests and keep an eye out
    for that possible problem. I do use a preloader at the very
    beginning of the movie, so all MC's I want to attach should be
    available without delay.
    If I were to safeguard for this problem, should I do it like
    this?:
    _root.contentMC.contentHolder.onLoad = function(){
    _root.contentMC.contentHolder.attachMovie("homeDiensten",
    "contentSub", 1);
    Thanks for your help!
    Yours,
    Andra

  • How to add library to JAR deployment in jdev 10.1.3.0.3

    I would like to add libraries to the JAR file that I deploy. But, I can not find a way to do this. I can add libraries in the older version: 9.0.5.2.
    Any idea on how I can do this in 10.1.3.0.3?
    Thanks.

    Hello?
    Is there someone to help me? I did this here:
    1. Step: Created the .deploy File and got the "JAR Deployment Profile Properties"
    2. Step: I chose the Main Class "works fine"
    3. Step: I marked the "File Groups" option and clicked "new"
    4. Step: I got the "Create File Group" Window and wrote in the "File Group Name" --> "jbcl.jar" and chose "Packaging"
    5. Step: I left the "Target Directory in Archive" empty and clicked "OK"
    6. Step: Depoly to JAR File --> everything's fine
    7. Step: Start the Command File and get the Error Message: ClassDefNotFound: com/borland/jbcl/layout/XYLayout
    So please tell me, what am I doing wrong in this steps???
    Regards
    Mirsad

  • Is it possible to add Library permanently to the GO menu?

    I need to back up my website project  that is listed under GO/Library/Application support. I like to back up frequently so I'd like to access it easily.

    Sure it is but why not simply drag it to the Finder Sidebar, it's a lot easier to locate then. If for some reason you want it permanently it's always there, just hold down the Option Key when clicking the Go menu.

  • Some way to dynamically add jars to java classpath?

    I have a fixed directory that people might be adding jar files to. I do will not know what the jar files are named nor how many jar files there will be. I am wanting to be able to search this directory for all jar files & dynanically add these jar files to my class path in a peice of code I am writting so that I would be able to locate classes in them. Does anyone have any ideas on how to do this?
    Your help is much appreciated =)

    The URLClassloader probably has what you need. If not, you'll have to write you're own custom classloader... Not really that hard though.

Maybe you are looking for

  • Touchscree​n not working in win 8 and after upgrade to 8.1

    I am facing touchscreen problem with my hp-b150us laptop for the last few months. It worked fine for 6 months after purchasing the laptop. Later upgraded to 8.1. It worked for couple of times. but once I shutdown and restart my laptop again the touch

  • How do i translate a whole page on my macbook pro

    i am in france and i am trying to get on a bank account and i know on regular computers that you can translate a whole page by pressing one button at the top of the screen but the macbook is not like that. can i do it some other way.

  • Structure of the sender Data Type

    hi; i have two tables and want to fetch data from both in one go using sender JDBC adapter. Can any one tell me the structure of the sender Data Type if Table1 has A1,A2,A3 as fields and Table2 has B1,B2,B3 as fields. i want to fetch only A1,A2 field

  • Newbie to Mac

    if me and my wife both wants to use iCal on 1 iMac (different events on ical) is this mean I have to setup 2 user account?? one for me and one for my wife?? the reason I ask is - I have an iphone 3g and is already using iCal and now I am planning to

  • Color off for User Profile

    Somehow the colors are messed up on a particular user account on my MBP. They seem very saturated. I don't think it has to do with the colorsync utility since if I create a test user account the display looks normal. If I go into the Display properti