如何在Android中使用jess

时间:2017-07-05 11:03:35

标签: android jess

我正在尝试使用JESS in和Android项目。我尝试使用Jess 6,它在netbeans上的Web应用程序上运行良好,但是它给出了错误。似乎jar文件的版本不兼容。 我需要有关如何将jess与Android项目集成的帮助。

错误是从一行代码生成的:

Rete engine = new Rete();

请参阅下面的错误信息:

 2593-2593/com.example.modupe.tryjessapp E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.example.modupe.tryjessapp, PID: 2593
 java.lang.NoClassDefFoundError: Failed resolution of: Ljava/applet/Applet;
     at jess.Rete.getApplet(Unknown Source)
     at jess.Batch.batch(Unknown Source)
     at jess.Rete.if(Unknown Source)
     at jess.Rete.<init>(Unknown Source)
     at jess.Rete.<init>(Unknown Source)
     at jess.Rete.<init>(Unknown Source)
     at com.example.modupe.tryjessapp.MainActivity.<init>(MainActivity.java:17)
     at java.lang.Class.newInstance(Native Method)
     at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2557)
     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
     at android.app.ActivityThread.-wrap12(ActivityThread.java)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
     at android.os.Handler.dispatchMessage(Handler.java:102)
     at android.os.Looper.loop(Looper.java:154)
     at android.app.ActivityThread.main(ActivityThread.java:6119)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
  Caused by: java.lang.ClassNotFoundException: Didn't find class "java.applet.Applet" on path: DexPathList[[zip file "/data/app/com.example.modupe.tryjessapp-1/base.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.modupe.tryjessapp-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.modupe.tryjessapp-1/lib/x86, /system/lib, /vendor/lib]]
....

1 个答案:

答案 0 :(得分:1)

Jess使用了Dalvik不支持的许多Java API,Applet是一个,但更重要的是,java.beans.Introspector。一个支持Android的Jess版本可用作alpha版本,仅用于获取许可证持有者;它还没有被释放。