• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in javax.comm

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends

I am doing one program to list all the ports.I down loaded javax.comm-v2-win32.zip from http://www.stanford.edu/~bsuter/javax.comm-v2-win32.zip

I set class path with the help of link http://www.stanford.edu/~bsuter/javax.comm-instructions-win32.txt

When i run the below program i am getting the error of

Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String I while loading driver com.sun.comm.SolarisDriver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String I while loading driver com.sun.comm.SolarisDriverVerifying Comm Build Environment


My Program is
[code]
public class VerifyCommBuild
{

public static void main(String args[])
{
Enumeration ports;
System.out.println("Verifying Comm Build Environment");
try
{
ports = CommPortIdentifier.getPortIdentifiers();
if (ports == null)
{
System.out.println("No comm ports found!");
return;
}
System.out.println("Some ports appear to have been found, let's try to
enumerate them.");

while (ports.hasMoreElements())
{
System.out.println("Here is a port [" +
((CommPortIdentifier)ports.nextElement()).getName() + "]");
}
} catch (Exception e)
{
System.out.println("Failed to enumerate ports [" + e.getMessage() + "]");
e.printStackTrace();
}

System.out.println("Complete.");
}
}
[\code]


pls help me to sort out this.I tried in many ways using google but failed
thanks
priya
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you trying to run the Windows implementation on Solaris? I don't think you'd get these error messages if the code was running on Windows.
 
priya pratheepp
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am working in pure windows XP

i am getting mad with this error
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you really sure that you are using the Windows version of the library? Because the error messages look like it is trying to find libraries for Solaris (not Windows - Solaris is Sun's implementation of Unix).
 
priya pratheepp
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you friends...

I deleted everything and copied once again...problem is solved but i am not getting any port names ...can please tell me why
 
priya pratheepp
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually i am getting problem in this line

ports = CommPortIdentifier.getPortIdentifiers();

After that ports is not null but it is not executing the loop ports.hasMoreElements()

Please help
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also trying to connect to my cell phone through the com port on windows XP.. and getting same error i tried a lot but not able to overcome this situation.

but on sun site in the documentation of the java communication API also known as javax.comm, it is written that this api is currently available for linux solaris and spark.
http://java.sun.com/products/javacomm/index.jsp
does it means it is not available for windows XP, if that is so, Can anybody please tell me how to connect to my nokia cell phone as i am developing an application that can send sms from PC using my nokia phone.

Help me please
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It used to be that you could still download javax.comm version 2 for Windows; I'm not sure if that's still the case. If not, check the http://faq.javaranch.com/java/JavaIoFaq for links to some alternative libraries for serial communication.
 
Rituraj Jain
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for reply..i tried rxtx 2.0.7 pre release that is mentioned on sun site, actually i was comfused how to use both of them together.
so what i did is, downloaded rxtx 2.1.7 final release that is complete in itself and it woked it has same class names as javax.comm so no need to change your code just change import paramaters.
my code is compiling and running but stil there is some problem so code is not sending message but sooner or later i will find solution and offcourse i will ask questions here if i have doubts.

seriously many many thanks to you for this reply. it is helpful.


thank you
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic