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

[593 byte] By [preetimalika] at [2007-11-26 17:44:17]
# 1
hiin case you know of any free java product installer that detects a jdk and jre, and after detection allows copying of the 3 javax.comm files in certain folders, please let me know
preetimalika at 2007-7-9 0:12:28 > top of Java-index,Desktop,Deploying...
# 2
Netbeans are not popular, jajaja i磎 have the equal problem.
Hurivea at 2007-7-9 0:12:28 > top of Java-index,Desktop,Deploying...
# 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.

WesefBabya at 2007-7-9 0:12:28 > top of Java-index,Desktop,Deploying...
# 4
You should be able to store the 3 files on other places too. You just have to set the right parameters (e.g. -Djava.library.path) on the JVM.Find hints on how to configure javax.comm at http://forum.java.sun.com/thread.jspa?threadID=702317
GadAla at 2007-7-9 0:12:28 > top of Java-index,Desktop,Deploying...