Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 积云度';s rasberrypi';s";c8y代理.sh“;文件不工作_Java_Linux_Bash_Shell_Cumulocity - Fatal编程技术网

Java 积云度';s rasberrypi';s";c8y代理.sh“;文件不工作

Java 积云度';s rasberrypi';s";c8y代理.sh“;文件不工作,java,linux,bash,shell,cumulocity,Java,Linux,Bash,Shell,Cumulocity,我正在尝试将我的cumulocity rpi代理连接到cumulocity,这样我可以有两个选项,接受或取消。但只有当我使用sh命令执行sh c8y agent debug.sh此文件时,此选项才可用。我遵循以下步骤 1) wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb 2) sudo dpkg -i cumulocity-rpi-agent-latest.deb 以及: 以及: #!

我正在尝试将我的cumulocity rpi代理连接到cumulocity,这样我可以有两个选项,接受或取消。但只有当我使用
sh
命令执行
sh c8y agent debug.sh
此文件时,此选项才可用。我遵循以下步骤

1) wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb
2) sudo dpkg -i cumulocity-rpi-agent-latest.deb
以及:

以及:

 #!/bin/sh
    (
    while true
    do
      echo "Running the Cumulocity Linux Agent..."
      java -cp 'cfg/*:lib/*' -Dlogback.configurationFile=cfg/logback.xml c8y.lx.age$
      sleep 1
    done
    ) 2>&1 | logger
这是
c8y-agent-debug.sh脚本
I使用
sh c8y-agent-debug.sh
bash c8y-agent-debug.sh执行此文件,但不执行文件事件回显语句


我是否需要设置与java相关的内容。Java已经安装。该
java-cp
命令是否需要任何其他设置。Java安装在此路径上的
/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
上。这是在linux上实现的
javac
java
命令运行良好

我不确定是否准确理解了这个问题,但这里有一些信息:代理是后台服务,安装后直接运行。如果它没有运行(请尝试“ps”),则可能是配置有问题。在这种情况下,您可以通过查看系统日志来了解它。它不会将任何内容打印到控制台,因为它在后台运行。我对调试感到困惑。我不知道如何调试它在系统日志所在的终端上没有显示任何错误
 #!/bin/sh
    (
    while true
    do
      echo "Running the Cumulocity Linux Agent..."
      java -cp 'cfg/*:lib/*' -Dlogback.configurationFile=cfg/logback.xml c8y.lx.age$
      sleep 1
    done
    ) 2>&1 | logger