我尝试运行 sh 脚本
来运行我的 jar
当我像这样在intelliJ中配置它时
当我将相同的值复制到 sh
文件并从终端运行它时
java -Dhostname=23.251.137.64 -DclientLocation=34.880272,32.195748 -DqueryString=Haifa -DurlParams=intent=REGULAR&auto=w1 -DisAlongRout=false -Dproviders=p1,p2 -cp RTMonitor.jar com.w.monitoring.headlessclient.HCRunner HeadlessClientE2ET#sendSearchRequest
我收到此错误:
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.
....
我试图消除一些java系统属性,当我删除DurlParams=intent=REGULAR&auto=w1
时,jar似乎正在运行
如何修复 DurlParams=intent=REGULAR&auto=w1
系统属性以使其仍位于正在运行的脚本中?
最佳答案
-DurlParams=intent\=REGULAR\&auto\=w1
关于java - 如何添加名为: `-DurlParams=intent=REGULAR&auto=w1` 的java系统属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27411421/