Search code examples
javajarappletserial-portrxtx

java.lang.ExceptionInInitializerError while trying to load applet using RXTXcomm jar


I created an applet using RXTXComm.jar to read values from a COM port. When I run the applet in the Eclipse IDE as an applet, it's working. But when I run it through my application it's giving this error in the applet console:

java.lang.ExceptionInInitializerError thrown while loading gnu.io.RXTXCommDriver
Exception in thread "Thread-17" java.lang.ExceptionInInitializerError
at comPortListen.run(comPortListen.java:65)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied                                                                             (java.lang.RuntimePermission loadLibrary.rxtxSerial)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkLink(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)

What could be the problem?


Solution

  • I'm pretty sure your getting boxed by the Sandbox

    Security and Permissions

    Possible Duplicate Thread: Java Applet with RXTX