@echo off
echo 正在加密,请稍后....
echo path:%~dp0
set base=%~dp0
set class=%base%\bin
set libs=%base%\lib
set
class_path=%class%%libs%\c3p0-0.9.1.2.jar%libs%\mysql-connector-java-5.0.8-bin.jar
java -classpath %class_path% com.test.Main
@pause
classes目录是java编译后的class目录
libs目录存放的所要使用到的jar
startNet.bat为我们启动的bat文件
public class MyTest {
public static void mm(){
Runtime run= Runtime.getRuntime()
try
{
run.exec("D:/abc.bat")//添加程序路径
}catch(Exception e)
{
e.printStackTrace()
}
}
public static void main(String[] args) throws IOException {
Desktop.getDesktop().open(new File("d:/abc.bat"))
}
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)