Including jar files in class path

后端 未结 6 1277
难免孤独
难免孤独 2020-12-01 16:32

I m running a java program from a batch file which refences some external jar files .How do i include those jar files in my batch file.Please help

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 17:12

    You need to set classpath http://download.oracle.com/javase/1.3/docs/tooldocs/win32/classpath.html. E.g.,

    java -cp file1.jar;file2.jar yourApp
    

    or if your jar-files are located in directory lib/

    java -cp lib/* yourApp
    

提交回复
热议问题