Re: Serial Port problem

From: <- Chameleon -> (cham_gss_at_hotmail.NOSPAM.com)
Date: 09/03/04


Date: Fri, 3 Sep 2004 18:29:33 +0300


> >>>Enumeration portList = CommPortIdentifier.getPortIdentifiers();
> >>>
> >>>this command returns an empty Enumeration. Why?
> >>>
> >>>My system is PC with WinXP.
> >>>I have 1 parallel and 2 serial ports
> >>>
> >>>
> >>
> >>As a first thought, have you initialized the comm driver.
> >>I forgot and couldn't see any ports until I used this:
> >>
> >> String driverName = "com.sun.comm.Win32Driver";
> >> try{
> >> CommDriver commdriver =
> >>(CommDriver)Class.forName(driverName).newInstance();
> >> commdriver.initialize();
> >> }
> >> catch (Exception e2)
> >> {
> >> e2.printStackTrace();
> >> }
> >>
> >>If this doesn't help maybe you could post your code.
> >
> >
> > I have javax.comm.properties file inside <java dir>\lib directory and
this
> > file have this line inside:
> > -------------
> > Driver=com.sun.comm.Win32Driver
> > -------------
> > Your code works and thankyou, but why I must load dynamically this
driver?
> > If I want to run this code in Linux or other platform?
> >
> > Thanks again!
> >
> >
> If that works my first thought would be that you do not have your java
> lib path set up correctly. What environment/IDE are you developing in?
> Do you have multiple JREs installed and if so have you installed the
> Java comm api in the one ypu are running?

I have 3 JRE in my machine.
1 with Borland J Builder
1 the original from Sun
1 with Mathematica

I have installed comm in both Borland J Builder and Sun's stand-alone



Relevant Pages

  • Re: Serial Port problem
    ... >>If that works my first thought would be that you do not have your java ... >>Java comm api in the one ypu are running? ... > 1 with Borland J Builder ...
    (comp.lang.java.programmer)
  • Re: Visual Studio 2005 Express in now permanently free...
    ... I call it constructive criticism. ... I'd agree Borland has a history of botching releases - C++ Builder, ... Kylix and finally Delphi. ... If I have to choose C++ Builder compared to VS Express, ...
    (borland.public.delphi.non-technical)
  • Re: Learning borland.
    ... > borland builder and they won't run. ... If you have installed C++ Builder, ... (Unless Borland have mended their conformance issues recently, ... this newsgroup is for helping you learn the language, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: microsoft c# vs Borland c# builder
    ... First, just to be clear, I am a Borland Employee, so obviously my ... C# builder, has some additions that might be compelling under some ... ADO.NET providers on steroids, they also provide the ability to preview ... with the framework sdk) both IDE's install the framework sdk. ...
    (microsoft.public.dotnet.languages.csharp)
  • Borland C++ Libraries & XPEmbedded
    ... Is there anyone out there that has experience in writing ... programs in Borland C++ Builder, ... The problem is traced down to some specific library functions E.g ...
    (microsoft.public.windowsxp.embedded)