• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

comm api

 
prat chan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ......
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it depend from which directory you call java -jar jarname.jar?
Where is the comm.jar located?

crossposting to intermediate - where better located.
[ March 27, 2005: Message edited by: Stefan Wagner ]
 
prat chan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic