JamVm not running an application (that uses jpcap) on Gumstix

偶尔善良 提交于 2019-12-13 06:43:35

问题


A newbie here so apologies in advance for asking anything silly/obvious. I am trying to run a java application on a Gumstix overo board (linux kernel 2.6.34). So far, I have installed JamVm (jvm), jikes compiler and classpath libraries (as per instructions in this tutorial). I have run a HelloWorld program and it seemed fine.

Now when I try to run another application (say 'MyApp') that uses 'jpcap' libraries, the jvm gives me an error that looks like this: Exception during event dispatch: java.lang.UnsatisfiedLinkError: Native libarary 'jpcap' not found (as file 'libjpcap.so') in gnu.classpath.boot.library.path and java.library.path . . .

This application was compiled using Netbeans 7.1. It generated a dist folder whose structure is this:

dist: |-- MyApp.jar |-- Readme |-- lib (folder) |---|-- jpcap.jar |---|-- swing-layout-1.0.4.jar

The readme says that in order to deploy this application, one should go to the dist folder and type 'java -jar "MyApp.jar". When I do so ('jamvm -jar MyApp.jar'), I get the error mentioned above.

My gumstix board has got libpcap-1.1.1-r1.6 installed. (I found /usr/lib/libpcap.so.1 on my board.)

Does anyone know what's going wrong? Any advice would be highly appreciated.

Ps: I have posted this question on gumstix-users list just a few minutes ago . I am posting here as well just to have a better chance of a reply. Hope this is ok with everyone here.


回答1:


The libjpcap.so should be in gnu.classpath.boot.library.path or java.library.path as the error states. You can print these paths by getting them with System.getProperty("java.library.path") but /usr/lib is a good guess.



来源:https://stackoverflow.com/questions/9708162/jamvm-not-running-an-application-that-uses-jpcap-on-gumstix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!