简体   繁体   中英

Running two .jar files at execution

I am trying to follow the README for a new module I am trying to use, and it is specificed to run this input:

java -cp jar_one.jar:jar_two.jar mo.du.le.file

Except when I try this I get an error that the class of mo.du.le.file cannot be found or loaded. I try running it also with just one jar file, it does find/load mo.du.le.file, except that it crashes when it reaches a point where the other jar is needed.

I've been trying some solutions for multiple classpaths here on SO, but I either get the same error message, or a similar error message saying the second jars class could not be found or loaded.

Can anybody help me out with this?

Just as a note, I never have problems running other jar or java files, and am using cygwin bash as my terminal.

Replace the : (colon) with ; (semicolon).

Since you mentioned Cygwin, it would appear that you are on Windows, and a "path" is separated by ; . The : separator is used on Linux (and similar OS's like Mac OS X).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM