how do we jar an application using comm api....... the comm.jar does not seem to be recognised at runtime when the jar is double clicked....... (the jar is an executable jar)....... however the jar works fine with the following command "java -jar jarname" ......... have been looking for a solution for a long time would appreciate any help ......
according to the release notes of comm api the comm.jar has to be placed in <jdk>\jre\lib\ext , the win32com.dll has to be placed in <jdk>\jre\bin and the javax.comm.pro sheet has to be in <jdk>\jre\lib.... the comm api being an external package was included in the class-path field of the manifest file however the comm.jar is not recognised..... the manifest file looks like :
Manifest Version: Class-Path: comm.jar Main-Class: main class name
the jar created using this manifest works good at the command prompt using the java -jar jarname command..... however the jar wehen executed by double clicking works fine untill the class using the comm api is encountered.... had posted this on intermediate as well no one seems to help..... need to sort this out, got practicals coming up.....
Bonagiri UmaMaheshwar Rao
Greenhorn
Joined: Mar 27, 2005
Posts: 12
posted
0
you dont need to set any classpath explicitly. just copy into ext directory it should work fine.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
1
posted
0
As I recall, the comm API depends on a configuration parameter to tell it which native code to use - windows versus solaris versus whatever. When I was playing with the comm API, getting the right location for javax.comm.properties file was always a problem. That file had:
And had to be placed where the comm code could find it. Bill
prat chan
Greenhorn
Joined: Mar 25, 2005
Posts: 7
posted
0
yes, the property sheet and the comm.jar file cause problems i have placed copies of the two in almost all java and my project classpath folder hoping it would pick up from somewhere. i have unjarred the comm.jar and placed the folders in my project folder. comm.jar has two folders the com/sun/comm and javax/comm folders, theres not much to read about the comm api and jar files on net or maybe i could not locate any . would appreciate your help.
Ben Wood
Ranch Hand
Joined: Aug 14, 2001
Posts: 342
posted
0
I just checked where I had these files when I was doing some work with comm.jar.
comm.jar in <java>\lib , <java>\jre\lib , <java>\jre\lib\ext
javax.comm.properties in <java>\lib , <java>\jre\lib
dll file into <java>\bin , <java>\jre\bin
hope this helps!
SCJP 1.4, www.gsi3d.org.uk
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
1
posted
0
the jar created using this manifest works good at the command prompt using the java -jar jarname command..... however the jar wehen executed by double clicking works fine untill the class using the comm api is encountered.... had posted this on intermediate as well no one seems to help..... need to sort this out, got practicals coming up.....
How about this - perhaps your system uses a different Java runtime when you double-click a jar file and that runtime can't see the config file. Bill
prat chan
Greenhorn
Joined: Mar 25, 2005
Posts: 7
posted
0
thank you all so much for all the help i had installed java on the d: drive and the system drive is c: java installation would create a java folder in c: as well even if we install java on any other drive, i placed the comm.jar, the dll file and the properties sheet in the lib and bin directores on the system drive and things worked fine this forum is excellent with good response from the users, i am using this for the first time and its very knowledgable, one can learn a lot if we browse through the various queries posted on tis forum... well now i am planning to test it on a network and see how the comm api behaves... thanks again....