Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading data from Serial Device using Applet on Web browser  RSS feed

Rawat Vijay
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have got device connected to Serial Port. We want to read data from this Serial device in web based application.
We have written applet which uses javax.comm API and when ran as standalone program, is able to make interface with serial device and able to retrieve data.
But when this Applet is run from Browser, it does not work.
I have signed this applet
I've configured the security policy for the plugin to allow all permissions.
------------------ .java.policy ------------------------------------------------------
grant codeBase "http://localhost:9080/eGRNMotionTouch/" {
Here is the attached output file from the Console window in the Browser
Java Console Output
Java(TM) Plug-in: Version 1.4.1_06
Using JRE version 1.4.1_06 Java HotSpot(TM) Client VM
User home directory = C:\WINNT\Profiles\rawatv.000
Proxy Configuration: Manual Configuration
Proxy: http=NTPROX:80,https=NTPROX:80,ftp=NTPROX:80,gopher=NTPROX:80
Proxy Overrides: <local>
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
Setting SerialParameters
----------Inside Serial Parameters----------
SerialParameters set
BaudRate :9600
FlowControlIn :0
FlowControlOut :0
Port Name :COM1
Preparing to get serial connection
Caught java.lang.NullPointerException: name can't be null while loading driver com.sun.comm.Win32Driver
at javax.comm.CommPortIdentifier.getPortIdentifier(
at SerialConnection.openConnection(
at SerialDemoApplet.<init>(
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
I have placed in C:\Program Files\Java\j2re1.4.1_06\lib directory and
and win32com.dll in C:\Program Files\Java\j2re1.4.1_06\bin directory. All these files are
also there in java_home\lib and java_home\bin of the server.
I'm looking to get this working can anyone throw some light on this..
A.Anil Kumar
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
copy dll's in ext forlder of jre
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!