包括类路径的jar文件 [英] Including jar files in class path
本文介绍了包括类路径的jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我米跑从refences一些外部的jar文件。如何做我包括我的批处理file.Please帮助那些jar文件的批处理文件的Java程序
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
推荐答案
看太阳的官方文档:的Setting类路径来理解你的选择。
Look at the Sun's official documentation: Setting the class path to understand your options.
有一个快速的方法是只包括后你的JAR(S)的 -cp
:
A quick way would be just to include your JAR(s) after the -cp
:
java -cp C:\java\MyClasses\myclasses.jar;C:\java\MyClasses\myclassesAnother.jar utility.myapp.Cool
在Linux / Unix
java -cp /opt/thirdparty/myclasses.jar:/opt/thirdparty/myclassesAnother.jar utility.myapp.Cool
这篇关于包括类路径的jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文