Don't know how to make my main class import a jar file

OK, the title doesn't make much sense but here are my create-jar.bat and manifest files:
create-jar.bat:
jar cvmf manifest.txt dassimul-admin.jar player/ admin/ com/ connector/ common/ *.class
manifest.txt:
Main-Class: admin.DASAdmin
the problem is that in connector/ folder there is the jdbc mysql connector driver (.jar file).
in Eclipse I can add this jar to the Java Build Path, so the program runs.
When I double-click the dassimul-admin.jar file, I get a Class Not Found Exception
C:\MYWORK\dassimul>java -jar dassimul-admin.jar
FATAL ERROR WHILE LOADING SQL DRIVER: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
I think that the problem lies in the fact that admin.DASAdmin can't see and import the jar file in connector/ folder... am I right?

It looks like you are putting the mysql jar file inside the dassimul jar. That won't work unless you write custom code. You should use the Class-Path attribute of the manifest to define a relative path(s) to the other jar(s) that you need to use.
[http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]

Similar Messages

  • How to Invoke a main class in a jar file from my project

    Hi
    I am a new user of the Sun Java Studio enterprise. I would like to know how i can invoke a main method in a jar file associated to the project.
    regards
    Nisanth

    Could you please clarify: do you want to run your project or a project from an independent jar?
    In the first case just select Run Project from the project context menu or select a class with main method and click Run File in the class context menu.
    Regarding the second case:
    - I don't think there is such a feature in the IDE (running third party jars is not an IDE function). Could you explain why you need this?

  • I subscribed for itunes imatch - it works perfectly on my i-pad and iPhone - however on my macbook - my iTunes can no longer find my songs - i don't know how to make it look to the cloud to play my music

    i subscribed for itunes imatch - it works perfectly on my i-pad and iPhone - however on my macbook - my iTunes can no longer find my songs - i don't know how to make it look to the cloud to play my music - i think it keeps trying to find on the external harddrive where i used to keep my music

    Of course iTunes is looking for the music on the external HDD. Enabling iTunes Match does not magically change the location of the iTunes library to the cloud.
    To play the music either plug the external HDD back into your computer or create a new, empty library to use for streaming the iTM content. The latter can be accomplished by holding down the Option key when launching iTunes, choosing "create library" then enabling iTunes Match on the new library. DO NOT have iTunes scan your HDD for music.

  • I don´t know how to make a phone call whit my ipad...and how to sent a message? is it possible?

    i don´t know how to make a phone call whit my ipad...and how to senSeleneGMt a message? What do i need? or is it impossible?

    You can't; not natively, anyway, since the iPad is not a phone. If you want to make a call, you'll need to use some third-party Voice-Over-IP service such as Skype.
    I'm not sure what you're asking when you ask about sending a message. If you mean a text message, you can either use iMessage, which can send messages to other users also running iMessage, or you can look in the iTunes Store for SMS apps, a few of which are available. They use separate services to actually send the message and so require an Internet connection, either WiFi or 3G.
    Regards.

  • HT4528 i am new to iphone. i downloaded a song but don't know how to make it my ringtone for incoming calls. can someone help?

    I just got an iphone4. I downloaded a song but i don't know how to make it my ringtone for incoming call. Can someone help?

    YOu can't use the whole song for a ringtone, you would have to create one 30 second or less.
    YOu can download an app to create the ringtone.

  • Hi I have got a problem where when I'm on safari i get these virus pop ups asking me to down load this and that and i don't know how to make them stop.

    Hi I have got a problem where when I'm on safari i get these virus pop ups asking me to down load this and that and i don't know how to make them stop.

    Click here and run Adware Medic.
    (113236)

  • How do I list all classes in a Jar file?

    How do I list all classes in a Jar file?

    Its no problem if the jar file contains classes, but I have an EAR file, which contains a jar-file, and I want to list all classes in that jar-file.
    I would like to do something like this:
    java.util.jar.JarFile jarfile = new java.util.jar.JarFile( new File("/meYear.ear"), true );
    java.util.jar.JarEntry jar = jarfile.getJarEntry( "myJar.jar" );
    // Cast it to a new JarFile:
    java.util.jar.JarFile newJar = (java.util.jar.JarFile)jar;
    But the method getEntry returns something like jarFile$JarEntry, if I try to class cast it I get an classCastException.

  • I maximized this program but I don't know how to make it smaller again.

    I maximized this program but I don't know how to turn it into a smaller box again. I've tried everything and I'm sure there must be some magic button I can't seem to find. Help?

    How about the green button in the upper left corner  or
    if you grab he slash marks in the lower right corner to shrink the window.
    If you zoomed in then try holding the control key and move two fingers on the trackpad.

  • How  to include the inner classes in a jar file in netbeans ide

    Dear java friends
    how to say to netbeans ide that it has to include the
    inner classes in the jar file.
    (i have one single applet class
    with two inner classes that show up
    in the build/classes file but not in the jar).
    The applet works in the viewer but not
    in the browser (I believe because the
    xxx$yyy etc should be in the jar)
    willemjav

    First, please stop posting the same question multiple times:
    Duplicate of http://forum.java.sun.com/thread.jspa?threadID=5269782&messageID=10127496#10127496
    with an answer.
    Second, If your problem is that you can't do this in NetBeans, you need to post to somewhere that provides NetBeans support - like the NetBeans website's mailing list. These forums do not support NetBeans (or any other IDE) - they are Java language forums.

  • I don't know how to make a playlist in Zen Micro!! lol Help P

    Lol, ok so this may sound very bad but, i just dont know what to do to make a playlist with ALL the song in it.
    There was a song playing, i am in the "Now Playing" screen, i save it as a playlist, now how do i add more songs to the same playlist? That is where im stuck!
    Sorry if this is very stupid, but i've tried everything and somehow i got another song added to it, but i dont know how i did it....

    make a playlist of ALL the songs you have? just why would anyone want that?
    anyways... go tothe all tracks section onthe main menu and play a song. then tap the lower right icon on the player then select "Save as Playlist". rename the playlist and there you have it. if you wantto add a song to a playlist of ALL your song (again, why would anyone do something like this?), go to your playlist, play a song, then go back to the all tracks section on the main menu, choose the song you want to add on the playlist, then tap either the verical touchpad or the lower right icon then choose "add to selected". Choose as many sons you like. then go back to the "Now Playing" section (tap the vertical touch pad to see that the added song/s will be on the bottom list). then just rename your playlist and there you have it-- a playlist of all your songs PLUS the added songs that had been added before
    to each his own i guess... enjoy

  • I have an idea for a phone, but I don't know how to make it or anything like that and I'd like you to help.

    I have an idea for a phone that in my opinion beats the big brands, they don't think about the smaller communties and focus on the girls taking photoes of themselves, my phone is different and I'd like Firefox OS to be it's operating system
    I still need to finish designs etc. but I have no idea how to make a phone or anything like that so I'd like guidance on the matter.
    I also have OS idea's myself but they're only thoughts, nothing in motion.
    To summarise, I'd like assistance. If you could help I'd be most grateful, thanks.
    -Trey

    Thanks, I know I'm not really a big brand (not even a brand at that) but I think you could always release as Firefox's first own brand mobile WITH the OS :)

  • HT204053 i have a new email address but I don't know how to make it my primary email

    I have a new email address that I want to make my primary email but I don't know how

    Login at http://appleid.apple.com/ and make the changes there.

  • I clicked "full screen" under "view" and don't know how to make it small again.

    I clicked "full page" under "view. Now I want to make it the regular size again and can't find out how to do it.
    == This happened ==
    Every time Firefox opened

    Hey so here is a tip to avoid it '''in future''': look in front of the Full screen option (or anything that you click upon). In this case it says F11 is the keyboard shortcut. So you'd know how to bring it back or restore it.
    And solution '''for now''': Press F11!
    Hope it helps.

  • Help! my Itunes is in japanese and I don't know how to make it English!

    I really need help on this one. I have windows Xp, and a dell computer.
    My ipod and my itunes are up to date, but MY itunes is in japanese, and I dont know how to turn it back! I have a feeling that the setup is the same, but I need someone to tell me where to change it !

    Press "Ctrl + ," then, "L", and then "E", and finally hit Enter. Hope this helps and works.

  • How to make the browser reload an updated jar-file?

    Hi there,
    Previosly when running applets using MSIE, all needed to reload an updated jar-file was pressing CTRL+F5
    Currently I've been assigned to re-develop some of my old applets and now I realize that the old CTRL+F5 won't do the trick any more since the old jar file is still in the cache and the new jar file is not loaded.
    I learned the hard way that all I can do is to manually clear the cache of the browser (Tools | Options | Delete files) and restart the browser and after that the new jar file is correctly loaded.
    Cache settings of the browser is set to "Reload on every visit to the page"
    Currently running Win2k, MSIE 6.0 SP1 and MSJVM 3809 but the problem also exists on Win2k, MSIE 6.0 and MSJVM 3186.
    Isn't there any easier way to do this?
    Currently I don't even mind not caching the jar-files at all as long as I don't get my development work trashed by having to restart the browser after every new build...
    Why has the old CTRL+F5 behaviour been changed?
    BR
    /Jonas

    I have been closing IE and reopening it for 7 months now. I don't of any other way to reload an applet.
    Jason

Maybe you are looking for

  • SolMan 4.0: Support Team determination via Access Sequence not working

    Hi, from all the documentation I've read I got the following understanding for automatically determination of Support Team via Access Sequence (well, for one possibillity at least): - Maintain Sold-to-Party in IBase IB52, especially country attribute

  • Control Framework: Fatal error - GUI cannot be reached

    Hello All,    Iam using BDC for creating a ZCR order throught VA01 - Credit Memo request. When executed in the foreground, it works fine.But when ran in background gives an error message - Control Framework: Fatal error - GUI cannot be reached  and g

  • Using the Same Profile for Outlook Connector and Exchange

    Is anyone using the same profile in Outlook for both the Oracle Connector for Outlook and Exchange server? Only Exchange would have an IMAP mail service defined. Oracle tech support kindly provided me with the following information but I would really

  • Fillable forms blank after emailing

    I am using an old version of Acrobat- Acrobat9 Pro.  I have created a number of fillable forms to streamline the admin part of a project I am doing. The forms work fine to complete and save.  But when I email them to someone, more than half the time

  • How to get a field description on custom screen used in enhancement

    Hi all,          I am working with transaction cj20n. It is having an enhancement and a custom screen is used in it. I have modified the screen by adding a text label ahead of field FUND. I want to get the description of that field on that text label