2013-05-07 104 views
0

我最近在運行我的run.sh時遇到了這個錯誤。我試圖在我的Linux VPS上運行Runescape Private Server;這是一個很大的錯誤。請幫助我,我不知道要添加哪些其他細節。運行我的run.sh時出錯(linux)

錯誤:

[email protected]:~/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

添加#!/bin/sh -vx爲您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 

我強烈建議採取了幾個小時閱讀advanced bash scripting guide

0

您必須將;更改爲:即我100%確定! 也許這會解決你的錯誤。

修訂718 RSPS亞軍(也許有用的人搜索這個):

#!/bin/bash 
nohup java -cp bin:lib/*: com.rs.Launcher true true false