How to make javac find JAR files? (Eclipse can see them)

前端 未结 2 1223
刺人心
刺人心 2020-12-31 02:41

When I\'m in Eclipse my project compiles with no errors, however when I try to compile with javac it says I\'m missing some packages...

I copied my comp

2条回答
  •  北海茫月
    2020-12-31 03:26

    -classpath lib/ will cause javac to look for a tree of class files in lib. If you have JAR archives there, you have to use -classpath lib/*.jar - and probably use whatever escaping mechanism your CLI has on the * to make sure it reaches javac rather than being expanded by the CLI

    See the javac command reference (windows).

提交回复
热议问题