Results 1 to 8 of 8
- 06-27-2007, 07:43 PM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 132
- Rep Power
- 0
javax.comm:Error instantiating class com.sun.comm.Win32Driver
I use winXP and JDeveloper as IDE
I have to communicate comm port from my computer with other port comm from the same computer.
The thing that I write with comm4, it has to be read by comm5.
I've downloaded javacomm20-win32 api and I've followed the instructions:
1.- C:\>copy c:\commapi\win32com.dll to c:\jdk1.1.6\bin
2.- C:\>copy c:\commapi\comm.jar c:\jdk1.1.6\lib
3.- C:\>copy c:\commapi\javax.comm.properties c:\jdk1.1.6\lib
4.- C:\>set CLASSPATH=c:\jdk1.1.6\lib\comm.jar
When I execute this program:
Java Code:package Olentzero; import java.util.Enumeration; import javax.comm.CommPortIdentifier; public class CoMBilaketa { public static void main(String args[]) { Enumeration ports = CommPortIdentifier.getPortIdentifiers(); while (ports.hasMoreElements()) { CommPortIdentifier port = (CommPortIdentifier)ports.nextElement(); String type; switch (port.getPortType()) { case CommPortIdentifier.PORT_PARALLEL: type = "Parallel"; break; case CommPortIdentifier.PORT_SERIAL: type = "Serial"; break; default: /// Shouldn't happen type = "Unknown"; break; } System.out.println(port.getName() + ": " + type); } } }
Java Code:java.io.IOException: Error instantiating class com.sun.comm.Win32Driver com.sun.comm.Win32Driver at javax.comm.CommPortIdentifier.loadDriver(CommPortI dentifier.java:239) at javax.comm.CommPortIdentifier.<clinit>(CommPortIde ntifier.java:109) at Olentzero.CoMBilaketa.main(CoMBilaketa.java:10) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmap ping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portm apping.java:100) at javax.comm.CommPortIdentifier.<clinit>(CommPortIde ntifier.java:138) at Olentzero.CoMBilaketa.main(CoMBilaketa.java:10) Process exited with exit code 1.
any suggest?
- 07-05-2007, 04:09 AM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 130
- Rep Power
- 0
java.lang.UnsatisfiedLinkError: isSessionActive
you don't have some library in the path
- 02-06-2008, 02:31 PM #3
Member
- Join Date
- Feb 2008
- Posts
- 1
- Rep Power
- 0
hai
hello help
- 02-07-2008, 09:41 PM #4
Member
- Join Date
- Jan 2008
- Posts
- 21
- Rep Power
- 0
I spent ages trying to get it working, ended up using the rxtx class and was much better, still ended up writing tons of code to get it working
- 05-23-2009, 06:19 AM #5
Member
- Join Date
- Aug 2007
- Posts
- 6
- Rep Power
- 0
You need to put all these files in JRE's directories...then only it will work...i tri
You need to put all these files in JRE's directories...then only it will work...i tried ur sample it worked.
- 05-23-2009, 06:22 AM #6
Member
- Join Date
- Aug 2007
- Posts
- 6
- Rep Power
- 0
Link for comm property file
jempeg.org/javax.comm.properties
- 07-12-2010, 03:09 PM #7
Member
- Join Date
- Jul 2010
- Posts
- 1
- Rep Power
- 0
http://www.cs.uml.edu/~fredm/courses...-javaxcomm.zip
Download files from above link and try.
- 07-12-2010, 04:24 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
Similar Threads
-
javax/comm/SerialPortEvent
By musiigedeo in forum Threads and SynchronizationReplies: 9Last Post: 11-24-2008, 11:07 AM -
Comm API Usage
By hobbyist in forum New To JavaReplies: 0Last Post: 11-16-2007, 04:59 PM -
javax.comm package for COM ports
By valery in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 03:03 PM -
Error: javax.servlet.ServletException: Column not found
By barney in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 08-07-2007, 07:20 AM -
Error: javax.swing.AbstractButton cannot be applied to...
By barney in forum AWT / SwingReplies: 1Last Post: 08-01-2007, 06:10 AM
Bookmarks