Communications  API

To all;
Does anybody know if Sun's, or IBM's Communications API works with Win Modems.
Symptoms;
Both COM1 and COM2 are disabled in the BIOS of my PC.
My Win Modem is installed and working fine using COM1(its a PCI modem).
From MS-DOS Prompt I key mode COM1:
I get Illegal Device in Return.
From My Java Program that uses Communications API, I get noSuchPortException.
If I enable both COM1, and COM2 in the BIOS, set
up my modem to use COM3, the DOS mode works
for both COM1 and COM2, but not COM3.
My Java program also finds COM1, and COM2, but
not COM3.
Any body have any experience with this?
Bruce Houghton

No luck yet???

Similar Messages

  • Java communication api for windows 64 bit

    Hi,
    I need communication api for windows 64 bit. Are these api's in developement?
    Thanks,
    Andrea Todeschini

    If you use version 2.0 of the rxtx library then it provides a complete implementation of the javax.comm package.
    Version 2.1 does not (its in the gnu.io namespace)
    // Try the following url
    http://users.frii.com/jarvi/rxtx/download.html
    matfud

  • Does the Communications API work with Studio 4

    I just installed Studio 4 along with the JDK. The Java version that I am running now is:
    java version "1.4.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
    Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
    Running on MS XP.
    The Communications API seemed to work just fine on JDK 1.3 with Forte 1.0.
    I installed the Comm API as instructed and set my ClassPath:
    CLASSPATH=D:\PROGRA~1\s1studio_jdk\j2sdk1.4.1_02\lib\comm.jar;D:\MyProjects\java\GarxFace
    A call to:
    Enumeration portList;
    portList = CommPortIdentifier.getPortIdentifiers();
    does not yield any ports at all.
    Stranger yet, if I use the auto complete feature in the editor. For example if I type: m_PortID. then no members of PortID show up.
    But the code compiles just fine.
    Any idea what is going on?

    First I found the reason that the auto complete was not working. I had to mount the comm.jar file (you did not have to do this in Forte 1,0, just set the classpath). I thought that I had done that. That is the problem when you work late. ;)
    Here is a eexcerpt that I found on a search in another post:
    Copy javax.comm.properties to your <JDK>\lib directory.
    C:\>copy c:\commapi\javax.comm.properties c:\jdk1.1.6\lib
    The javax.comm.properties file must be installed. If it is not, no ports will be found by the system.
    Notice it says that "javax.comm.properties file must be installed"
    javax.comm.properties is indeed installed in my JDK lib subrirectory, but it is almost like it is not being found.

  • About Java Communication API for Windows

    hi
    I'm studying Serial Communication in university.
    I'd like to know the reason why we can't downlaod Java Communication API for Windows.
    I confirmed Comm for Linux and Soralis, but I can't find Comm for Win.
    Please tell me the reason if someone know.

    For no particular reason Sun stopped supporting the windows version
    of that package. I use rxtx which happens to allow for much faster
    communication too.
    The interface is identical to Sun's version, just the package differs: "gnu.io".
    kind regards,
    Jos

  • Problem with Java Communication API

    hi
    I installed the Java Communication API on win32 platform (as per the guidelines)
    Now when I try to run the sample program 'Blackbox' for the serial port, I get an error (in fact an exception is generated inside main function in BlackBox.class file)
    I tried the SimpleRead.java example but that too generated the same exception
    Can anybody help me out.... I am a novice with Java Comm API

    I tried running the sample BlackBox program provided for serial port and now it says
    No Serial Ports Found!
    I verified that both comm.jar and javax.comm.properties are in the <JDK>\lib directory.
    Actually, I am using netBeans IDE 1.4 and I used the C:\J2SDK folder installed with netBeans for the Java Communicaion API
    plz help.

  • Java Communications API and Java SDK 1.4.2

    I just installed the Java Communications API 2.0 on my Windows XP system, with JDK 1.4.2. As per the install instructions, I copied files from the zip into my /lib and /bin directories and set the classpath. However, when I attempt to compile any of the samples, the compiler displays a large number of errors. I know the API documentation only references JDK1.2 -- are there any special tricks to installing on newer JDKs, or will I need to acquire an older JDK to develop?

    My path variable is still not being set! Here is the content of my autoexec.bat located on the root directory of C:\
    rem - By Groove Setup
    PATH=%PATH%;"C:\Program Files\Groove Networks\Groove\Bin"
    PATH=%PATH%;C:\PROGRAM FILES\J2SDK1.4.2_07\BIN
    /code]
    When I type 'path' at the MSDOS C:\ prompt, I receive the following in the get the following:C:\WINDOWS;C:\WINDOWS\COMMAND;\C:\PROGRAM FILES\GROOVE NETWORKS\GROOVE\BIN
    As an aside, I noticed that when I perform a search of the my hard drive (c:\), I find two autoexec.bat files. One at the root, and the other in C:\Windows\Command\EBD.
    I believe the instructions stated to modify the autoexec.bat at the root directory.
    TIA for any assistance. This is really becoming a nusance and taking up quite a bit of my time trying to resolve this problem.

  • Identifying a comm port using java communication API

    HI ALL,
    i'm using the communication API to detect the comm port to which my modem is attached.
    i say CommPortIdentifier c = CommPortIdentifier.getPortIdentifier("COM3");
    then i SOP(c.getName())
    i get an exception saying noSuchPortException
    i've put the javax.comm.properties file in jdk/lib but to no avail.
    i also have a win32com.dll file that is there inside lib.
    but this hasn't helped. Now the properties file has a driver mentioned. do i have 2 download that driver or does it come with the OS (i've no idea)
    i would be helpful if anybody could help me out with this problem.

    Try putting tha javax.comm.properties file in you <java>/jre/lib folder as well... It worked for me !

  • Communication API for Linux

    I want to develop an application in Java for Linux that uses serial port .
    But java.sun.com provides communications API for Windows, Solaris but not Linux ! ! !
    Where can I find free java api to drive a serial port easily ???
    Thanks a lot

    I think you can do this using the version for Solaris/SPARC along with RXTX for Linux (do a search on google), also I think IBM did a JavaCOMM api for linux.

  • Hurry! Communication API's Application?

    Hello everyone!
    I have some questions for java.lang.object and javax.comm.*.
    I have edited a serial communication program which use jb7.0e to act a serial equipment.
    That program is used java's communication API. And I do it well in my computer.
    But when I make it into application program, always has one error trouble me...:
    java.lang.NullPointerException
    at adx.SerialBean.WritePort(SerialBean.java:125)
    at adx.App1.<init>(App1.java:51)
    at adx.App1.main(App1.java:114)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.zerog.lax.LAX.launch(Unknown Source)
    at com.zerog.lax.LAX.main(Unknown Source)
    I send the SerialBean.java at the end of the message.
    Would you show me a right way.
    Waiting for your early reply!
    Yours, telerich
    2002-11-22
    SerialBean.javaimport java.io.*;
    import java.util.*;
    import javax.comm.*;
    public class SerialBean
    static String PortName;
    CommPortIdentifier portId;
    SerialPort serialPort;
    static OutputStream out;
    static InputStream in;
    SerialBuffer SB;
    ReadSerial RT;
    public SerialBean(int PortID)
    PortName = "COM" + PortID;
    public int Initialize()
    int InitSuccess = 1;
    int InitFail = -1;
    try
    portId = CommPortIdentifier.getPortIdentifier(PortName);
    try
    serialPort = (SerialPort)
    portId.open("Serial_Communication", 2000);
    } catch (PortInUseException e)
    return InitFail;
    try
    in = serialPort.getInputStream();
    out = serialPort.getOutputStream();
    } catch (IOException e)
    return InitFail;
    try
    serialPort.setSerialPortParams(19200,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch (UnsupportedCommOperationException e)
    return InitFail;
    } catch (NoSuchPortException e)
    return InitFail;
    SB = new SerialBuffer();
    RT = new ReadSerial(SB, in);
    RT.start();
    return InitSuccess;
    public String ReadPort(int Length)
    String Msg;
    Msg = SB.GetMsg(Length);
    return Msg;
    public void WritePort(String Msg1)
    int c;
    try
    for (int i = 0; i < Msg1.length(); i++)
         {System.out.print(Msg1.charAt(i));
    out.write(Msg1.charAt(i));}
    } catch (IOException e) {}
    public void ClosePort()
    RT.stop();
    serialPort.close();
    }

    You do know what a NullPointerException is, right? In line 125, in the WritePort-method, you try to access a variable that is null. The way you have posted your code I can't see which line that is, so it's hard for me to say anything more, (use code tags next time) but it is probably something rather straigthforward that you have forgotten. Carefully check all variables you use in that line to see if they are really initialised.

  • Serial Communication API

    Can anyone recommened any API's that can be used to read and write to Serial ports? I have looked into Java Communication API but this is depricated and I would prefer not to use it. I have also tried RXTX but this is a little buggy.
    Any others out there? Would prefer a Windows/Linux multiplateform solution but if not just a Windows one is fine.
    Thanks,

    Yeah, I know that's what you 'should' do, but a user doesn't always do what you expect they 'should' do. So if a user does pull out the USB cable before the application is shut down and the COM port is closed, then the error appears. Isn't there a way to catch that exception?
    Best regards,
    RoDeNtJe

  • Communication API and Linux

    But... exists an implementation of Communication API for linux?

    But... exists an implementation of Communication API
    for linux?http://www.google.com/search?q=javacomm+for+linux
    First hit:
    Java Comm Serial API How-To for Linux
    http://wass.homelinux.net/howtos/Comm_How-To.shtml
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • About Java(tm) Communications API

    Hi all,
    I am customizing some project, using Java(tm) Communications API.
    I've find it is not include of J2SE core module, and had some incompatibility issue.
    I am wondering if there are other package I could use in replace of this particular API?
    Thx,
    James

    Hi all,
    I am customizing some project, using Java(tm) Communications API.
    I've find it is not include of J2SE core module, and had some incompatibility issue.
    I am wondering if there are other package I could use in replace of this particular API?
    Thx,
    James

  • Use of communications API

    Communication API is used for windows platform, with win32comm.dll file & it is working satisfactorily. But the same is not working with Novell. It asks for win32com.nlm file, where do I get it?
    How to shutdown windows 98/95 through java application?

    I don't think COMM API are supported in Novell. I think that they are only for Windows and Solarias but actually there is a port for Linux and BSD too (it is called RXTX).
    To shutdown windows 9x try this:
      Runtime.exec("rundll32 user32.dll,ExitWindowsEx");

  • Java Communications API

    Hi
    I've written a program to communicate with a circuit with JCA throught LPT Port. I have done this:
    import java.io.*;
    import java.util.*;
    import javax.comm.*;
    public class test65{
    static Enumeration portList;
    static CommPortIdentifier portId;
    static int num = 8;
    static ParallelPort parPort;
    static OutputStream outputStream;
    public static void main(String arg[]){
    portList = CommPortIdentifier.getPortIdentifiers();
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier) portList.nextElement();
    if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
    System.out.println ("Found Parralel Port :"+portId.getName());
    if (portId.getName().equals("LPT1")) {
    try {
    parPort = (ParallelPort)portId.open("Robotics", 2000);
    } catch (PortInUseException e) {
    System.out.println("ERROR: This port is in use by: "+e.currentOwner+".");
    try {
    outputStream = parPort.getOutputStream();
    } catch (IOException e) {
    System.out.println ("ERROR: IO Exception.");
    parPort.close();
    } catch (NullPointerException e){
    System.out.println ("ERROR: OutPutStream could not be Created.");
    parPort.close();
    try {
    System.out.println ("Number "+num+" is about to be sent ....");
    System.out.println ("Mode : "+parPort.getMode());
    outputStream.write(num); //(1)
    System.out.println ("Number "+num+" was Sent.");
    } catch (IOException e) {
    System.out.println ("ERROR: Could not Write Output");
    parPort.close();
    in the line that writes num to the stream,(1), program stops and doesn't send anything. If i install a printer then the num is sent to the printer driver to be PRINTED. i don't want to print anything. I've think if there is any driver that sends to the port whatever it recieves. What should i do to send numbers to LPT port like outp and out commands in basic and c ?

    When using java communications api you need to simulate a centronics printer circuit in order to get output to the pins all this requires is that you pull pin11 (Busy) low, pin12 (Paper Out) low, and pin15 (Printer Error) High, although I've only had success thus far using spp mode which of course only supports output. Good luck all.

  • Communication API

    i have to develop a little program for my studies which deals with the communication api.
    my question: is there a possebility to find out if printer is connected to a serial port or not. any method that returns whether there is one or not...
    thx in advance

    Sun dropped the support on Windows' Comm-API.
    You could have a look at RXTX: [http://www.rxtx.org/]

Maybe you are looking for

  • N8 update issue,

    That recent 266 MB update, it always reaches 194 MB and freeze on it, and after a while it says  " There seems to be a problem with connecting to the service. Make sure that your firewall and virus protection settings are correct. Also, make sure tha

  • Automator to sync with a memory Stick

    i am looking to have a memory stick every time i plug it in to my mac, to automatically check with a folder on my hard drive and sync up any changes with the 1 folder (and subfolders) bi directionally (same stick and folder every time) this is a mem

  • Can FCP Beep When Done With A Task?

    I used to use this feature in Photoshop when I had to work late, in case I fell asleep at the wheel. Can FCP play a sound when it finishes rendering something? Thanks. --Alex

  • Data Joins and Pivot Help

    Hi, I have one fact table and one huge history table that goes really deep with scores stored with month end dates. I am looking for a way to manipulate the month and year of DateChanged in table A along with joins on the acct no to retrieve scores f

  • Html slider control not working

    Hi, I am working on a extension for which I would need a slider control. But it seems that they are not correctly handled in the latest version of PS CC 2014. The handle is not created (see below, I disable the onLoad method to make sure that is not