0

我最近在运行我的 run.sh 时遇到了这个错误。我正在尝试在我的 linux VPS 上运行 Runescape 私人服务器;这是一个很大的错误。请帮助我,我不知道要添加哪些其他细节。

错误:

jacob@ace:~/Server/source$ sh run.sh
Usage: java [-options] class [args...]
       (to execute a class)
or  java [-options] -jar jarfile [args...]
       (to execute a jar file)
where options include:
-d32          use a 32-bit data model if available
-d64          use a 64-bit data model if available
-server       to select the "server" VM
              The default VM is server,
              because you are running on a server-class machine.


-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
              A : separated list of directories, JAR archives,
              and ZIP archives to search for class files.
-D<name>=<value>
              set a system property
-verbose:[class|gc|jni]
              enable verbose output
-version      print product version and exit
-version:<value>
              require the specified version to run
-showversion  print product version and continue
-jre-restrict-search | -no-jre-restrict-search
              include/exclude user private JREs in the version search
-? -help      print this help message
-X            print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
              enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
              disable assertions with specified granularity
-esa | -enablesystemassertions
              enable system assertions
-dsa | -disablesystemassertions
              disable system assertions
-agentlib:<libname>[=<options>]
              load native agent library <libname>, e.g. -agentlib:hprof
              see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
              load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
              load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
              show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
run.sh: 1: run.sh: deps/poi.jar: Permission denied
run.sh: 1: run.sh: deps/mysql.jar: Permission denied
run.sh: 1: run.sh: deps/mina.jar: Permission denied

运行.sh:

java -Xmx800m -cp bin;deps/poi.jar;deps/mysql.jar;deps/mina.jar;deps/slf4j.jar;deps/slf4j-nop.jar;deps/jython.jar;log4j-1.2.15.jar; server.Server
read
4

2 回答 2

0

添加#!/bin/sh -vxrun.sh脚本的第一行(以获取 shell 的踪迹)。

您可能需要引用类路径,即

   java -Xmx800m -cp 'bin;deps/poi.jar;deps/mysql.jar;deps/mina.jar;deps/slf4j.jar;deps/slf4j-nop.jar;deps/jython.jar;log4j-1.2.15.jar;' server.Server
   read

我强烈建议您花几个小时阅读高级 bash 脚本指南

于 2013-05-07T01:34:34.373 回答
0

您必须更改;:我 100% 确定!也许这会解决你的错误。

修订版 718 RSPS 跑步者(可能对搜索此内容的其他人有用):

#!/bin/bash
nohup java -cp bin:lib/*: com.rs.Launcher true true false
于 2013-12-02T18:10:40.007 回答