我最近在运行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
run.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
答案 0 :(得分:0)
添加#!/bin/sh -vx
作为run.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
我强烈建议您花几个小时阅读advanced bash scripting guide。
答案 1 :(得分:0)
您必须将;
更改为:
我必须100%确定!
也许这会解决你的错误。
修订版718 RSPS亚军(可能对搜索此内容的其他人有用):
#!/bin/bash
nohup java -cp bin:lib/*: com.rs.Launcher true true false