how do I execute a JAR and also add another JAR to the classpath? [duplicate]
问题 This question already has answers here : executing java -jar via classpath vs in the jar file dir (2 answers) Closed 4 years ago . How do I execute HelloClient.jar with openejb-client on the classpath? thufir@doge:~$ thufir@doge:~$ java -cp -jar NetBeansProjects/HelloClient/dist/HelloClient.jar; apache-openejb-4.7.1/lib/openejb-client-4.7.1.jar org.acme.HelloClient Error: Could not find or load main class NetBeansProjects.HelloClient.dist.HelloClient.jar apache-openejb-4.7.1/lib/openejb