[英]How do I compile in Java with a batch file?
Alright, I am an extreme newb when it comes to coding and I am trying to compile a rsps (private server) just as a start.好吧,在编码方面我是一个极端的新手,我正在尝试编译一个 rsps(私有服务器)作为一个开始。 It comes with a batch file that would usually work, but I think I had to upgrade the java version and directory.
它带有一个通常可以工作的批处理文件,但我认为我必须升级java版本和目录。 So I did.
所以我做了。 Then when I tried to run it, cmd popped up and gave the error " -d is not a recognized option".
然后当我尝试运行它时,cmd 弹出并给出错误“-d 不是一个可识别的选项”。
Here is the batch code....这是批处理代码....
@echo off
title Compiler
echo Fixed Compiler By mb
"C:\Program Files\Java\jdk1.7.0_03\bin\java" -d <bin> -cp lib/mysql.jar;lib/netty-3.2.jar;lib/xstream.jar;lib/xpp.jar;xpp3-1.1.4c.jar -sourcepath src src/org/dementhium/RS2Server.java
pause
The original code didnt have the <> around bin.原始代码在 bin 周围没有 <>。 Now that I added those, the cmd prompt says
"acess is denied... press any key to continue"
.现在我添加了这些,cmd 提示说
"acess is denied... press any key to continue"
。 I know some of you guys might laugh, but I barely know what I am doing.我知道你们中的一些人可能会笑,但我几乎不知道我在做什么。
Java 编译器是javac ,而不是java 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.