I am switching my server's hosting provider from Windows Server to Linux Debian and I need help to convert my Run.bat to an executable shell script.
我正在将服务器的托管服务提供商从Windows Server切换到Linux Debian,我需要帮助才能将Run.bat转换为可执行的shell脚本。
The Windows batch file:
Windows批处理文件:
java -cp bin; deps/mail.jar; deps/xstream.jar; deps/xpp3-1.1.4c.jar;
deps/scheduling.jar -server server.Server
When I save this as a shell script it does not properly run when I "Run in terminal", the shell just opens and closes immediately.
当我将其保存为shell脚本时,当我“在终端中运行”时,它无法正常运行,shell只会立即打开和关闭。
1 个解决方案
#1
1
In linux, the separator is :
instead of ;
, so try this instead:
在linux中,分隔符是:而不是;,所以请尝试这样做:
$ java -cp bin:deps/mail.jar:deps/xstream.jar:deps/xpp3-1.1.4c.jar:deps/scheduling.jar -server server.Server
Copy the command without the $. The $ is used to indicate the command belongs in a linux shell.
复制没有$的命令。 $用于表示命令属于linux shell。
#1
1
In linux, the separator is :
instead of ;
, so try this instead:
在linux中,分隔符是:而不是;,所以请尝试这样做:
$ java -cp bin:deps/mail.jar:deps/xstream.jar:deps/xpp3-1.1.4c.jar:deps/scheduling.jar -server server.Server
Copy the command without the $. The $ is used to indicate the command belongs in a linux shell.
复制没有$的命令。 $用于表示命令属于linux shell。