Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Java - from command line

  • 01-03-2009 12:17pm
    #1
    Registered Users, Registered Users 2 Posts: 196 ✭✭


    I'm running a program, which i am on version two of. The first version used a mysql connector, and so the command line to run it looked like this,
    java -cp ".;mysql-connector-java-3.1.11-bin.jar" gui.Main
    

    and it worked perfectly, but now i am using a second jar along with it,
    poi-3.2-FINAL-20081019.jar
    
    and i can't seem to get the right syntax to run it from the command line with the two jars.

    Can anyone help please?

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 21,611 ✭✭✭✭Sam Vimes


    on mobile so not going to google but i think it should start with java -jar


  • Registered Users, Registered Users 2 Posts: 11,264 ✭✭✭✭jester77


    You could jar your program and then add the 2 referenced jars to the classpath in the manifest and as Sam said above you would only need to call the jar using java -jar jarname.jar

    Have you used ant before? Worth looking into if you haven't as it would make the building and packaging easy for you.


Advertisement