openshift中的类未找到异常

时间:2017-01-12 09:50:29

标签: java bash shell openshift

我在shell脚本中运行以下命令,它适用于Windows,但无法识别为什么它不能在openshift中的sheell脚本中工作。我在该文件夹中有.class个文件。

export JARPATH=$(JARS=("$LIB"/*.jar); IFS=:; echo "${JARS[*]}")

nohup javac -classpath $JARPATH $MATCHFACES/*.java > ${OPENSHIFT_DIY_LOG_DIR}/compile.log 2>&1 &
// the above works without errors

cd $OPENSHIFT_REPO_DIR"src/matchfaces"

nohup java -classpath $JARPATH matchfaces.Listener > ${OPENSHIFT_DIY_LOG_DIR}/Listener.log 2>&1 &
// the above spits the error below

我得到的错误是

  

错误:无法找到或加载主类.var.lib.openshift.586b985a89r3cfe9fa1111bc.app-root.runtime.repo.src.matchfaces.Listener

Listener.java源代码

package matchfaces;

import Luxand.FSDK;

/**
 *
 * @author daviestobialexz
 */
public class Listener {

 public static final String JAVABRIDGE_PORT = "1699";//8080
static final php.java.bridge.JavaBridgeRunner runner =
        php.java.bridge.JavaBridgeRunner.getInstance(JAVABRIDGE_PORT);
/**
 * @param args the command line arguments
 * @throws java.lang.InterruptedException
 */
public static void main(  String[] args ) {
    // TODO code application logic here
    try {
            System.loadLibrary("facesdk");
            int res = FSDK.ActivateLibrary("OYVHSxkUjwoYalZqg=");
            FSDK.Initialize();
            FSDK.SetFaceDetectionParameters(true, true, 384);
            FSDK.SetFaceDetectionThreshold(5);

            if (res == FSDK.FSDKE_OK) {
                    System.out.printf("FaceSDK activated", "FaceSDK activated\n");
            } else {
                     System.out.printf("Error activating FaceSDK: ", res + "\n");
            }
    } catch (java.lang.UnsatisfiedLinkError e) {
             System.out.printf("exception ", e.getMessage());
    }
    try{
    runner.waitFor();
    }catch(Exception ex){
        System.out.printf("Error: ", ex.getMessage() + "\n");
    }
    // System.exit(0);
}

}

0 个答案:

没有答案