🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1798

Re: How to make the javax.comm work!

#1798
From: Joi Ellis [TeamB]
Date: Sat, 08 Sep 2001 14:42
35 lines
2016 bytes
Scott Yaung <gzscott@21cn.com> wrote:
> My code is following like this.
> Nothing printout, it seems that nothing in the list of
> portidentifiers.
> Can anyone help?

> import javax.comm.*;
> import java.util.*;

> public class Comport{
>   public Comport(){}
> static{
>   try{
>   Enumeration enu=CommPortIdentifier.getPortIdentifiers();
>   while(enu.hasMoreElements()){
>     CommPortIdentifier cpid=(CommPortIdentifier)enu.nextElement();
>     System.out.println(cpid.getName());
>     }
>   }catch(Exception e){e.printStackTrace();}
>  }

>   public void main(String args[]){
>   Comport com=new Comport();
>   }
>  }

Is it that there are no elements in the enumeration, or that there are, but
all the names are blank?

-- 
Joi Ellis (TeamB)               http://www.teamb.com/
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Guidelines: http://www.borland.com/newsgroups/guide.html
Only posts which violate the rules in guide.html are subject to cancelation.
Technical Details
Message-ID: <3b9a2e65_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!newshub2.home.com!news.home.com!cpk-news-hub1.bbnplanet.com!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!lsanca1-snf1!news.gtei.net!enterprise!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews!not-for-mail
References: <3b99f67e$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,971e6062e64afa89
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-09-08 07:51:31 PST
Message-ID: <3b9a2e65_2@dnews>
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: How to make the javax.comm work!
Newsgroups: borland.public.jbuilder.java.api
References: <3b99f67e$1_2@dnews>
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))
NNTP-Posting-Host: 209.46.41.66
Date: 8 Sep 2001 07:42:45 -0700
X-Trace: dnews 999960165 209.46.41.66 (8 Sep 2001 07:42:45 -0700)
Lines: 35
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!newshub2.home.com!news.home.com!cpk-news-hub1.bbnplanet.com!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!lsanca1-snf1!news.gtei.net!enterprise!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews!not-for-mail