I have a java class which has almost 12 jar file dependencies and i am using ubuntu 12.10 . I need to know how to run this java application because every time i run it , it gives me errors as "symbols not found". I have all jar files in a folder called libs. and i have tried these commands but none of these gives me some succesful result.I have flights.java class in test directory and libs directory is inside test directory.Currently i am in test directory
javac -cp "/home/ubuntu/test/libs/*.jar" flights.java
javac -cp '/home/ubuntu/test/libs/*.jar' flights.java
To run a JAR file on Windows, Mac or Ubuntu machines, follow these steps: Verify that Java is installed on your computer. Confirm the computer's PATH variable includes Java's \bin directory. Double-click the JAR file if auto-run has been configured.
if you have single class in your app called flights.java
and all of your required jar are located at /home/ubuntu/test/libs/
then use this
javac -cp '.:/home/ubuntu/test/libs/*.jar' flights.java
and to run
java -cp '.:/home/ubuntu/test/libs/*.jar' flights
better to just pack dependency and app in to a single jar and make it launchable and runnable jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With