packaging a netbeans project that uses javax.comm
hi
i have developed an application in java using netbeans that uses javax.comm package. In order to use this package I need to put 3 file: win32com.dll, comm.jar and javax.comm.properties in appropriate folders in jdk and jre. Now I want to deploy my application. How can I include these three folders in my netbeans package itself, so that the end user can run my application directly. I know how to create a jar of my netbeans application. I also know that comm.jar can be added to library. But is there a way of packaging win32com.dll and javax.comm.properties...please help me
# 3
I'm using netbeans, and I am trying to put the 3 files in the right folders. Where exactly to you put them if my Java directory is C:\Program Files\Java with folders:
jdk1.5.0_10
jdk1.5.0_02
jre1.5.0_02
jre1.6.0
jdk1.6.0
j2re1.4.2_13
jre1.5.0_10
I am getting an error when I compile 1 line of code:
package portreader;
import javax.comm.*;
//import gnu.io.*; //use this instead of javax.com if you are using RXTX
import java.io.*;
import java.awt.*;
import java.util.*;
/**
*
* @author Dark Man X
*/
public class Main {
static CommPort commPort;
static CommPortIdentifier portID;
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here^%
//Enumeration pList = CommPortIdentifier.getPortIdentifiers();
//System.out.println(pList);
try{
portID= CommPortIdentifier.getPortIdentifier("COM1"); //<-- This is why the error is being produced.
}catch (Exception e){
}
//commPort = thePortID.getPortIdentifier('COM1');
//serialPort = open(commPort, "serial", 1000);
}
}
This is the error:
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.comm.SunrayInfo.isSessionActive()Z
at com.sun.comm.SunrayInfo.isSessionActive(Native Method)
at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155)
at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
at portreader.Main.main(Main.java:38)
I know it has to do with the comm setup. I followed the steps, but is there something I'm missing? Like how do I find out my main (JDK) directory.
Help would be much appreciated.