First, I'm working in a linux environment. Second, I've got one jar file which contains all of my project's classes, including the main, in one directory. Third, I've got all of the project's external dependent jars in a sub-directory called lib.
The question is how do I run my program? I've tried:
java -classpath ".:/lib/*" com.pom.ticketprocessing.main.TicketProcessing
java -classpath ".:/lib/*" tp.com.pom.ticketprocessing.main.TicketProcessing
java -classpath ".:/lib/*" tp.jar.com.pom.ticketprocessing.main.TicketProcessing
java -classpath ".:/lib/*" TicketProcessing
java -classpath "tp.jar:/lib/*.jar" TicketProcessing
java -classpath "./tp.jar:./lib/*.jar" TicketProcessing
In each case I get the error: Error: Could not find or load main class TicketProcessing
So, how do I run this program? Thanks in advance.
Class-path:
entry into the Manifest.MF listing all the libraries, and usejava -jar
.Main-class:
attribute, of course.