Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to access SerialPort in Applets using jSSC library

Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a requirement to access serial ports from Applets. For this using jssc.jar library and try to get the list of available ports. When I am doing this getting the below exception

Exception in thread "Thread-23" java.lang.ExceptionInInitializerError
at jssc.SerialPortList.<clinit>(
at SerialIO.fetchSerialPorts(
at Applet.startJavaScriptListener(
at Applet.mav$startJavaScriptListener(
at Applet$
at Method)
at Source)
Caused by: access denied ("java.util.PropertyPermission" "user.home" "read")
at Source)
at Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.awt.AWTSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at jssc.SerialNativeInterface.<clinit>(
... 8 more

How should I modify the java.policy to get out of this exception. Do I need to use anything else other than this jar.

I am using java 1.6.0_27 and Windows 7

Please help me in resolving this issue.

Posts: 3323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer to your question is in the stack trace:

access denied ("java.util.PropertyPermission" "user.home" "read")

In your policy file you need to set the property permission for user.home to allow read access.

Something like:

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To handle permission, scm uses tmp folder. The scm is an alternative library to rxtx/javaxcom.
Wiki :
Repository :
Video :

It supports RS-232 control signals handshaking, monitoring and has been ported to Linux, MAC, Solaris and Windows operating system. It is consistent, portable, efficient, reliable, testable, extensible, modifiable, scalable library.
This tiny ad is wafer thin:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic