Javax comm problems

Hi,
I am trying to communicate with the communication ports using javax comm API through an applet.
I am using Java 1.3.1.
It gives me the exception:
java.lang.ClassNotFoundException:javax.comm.commPortIdentifier
I run the same program not using the applet , it runs fine.(i.e.recognises the ports etc)
i tried to using a signed applet for the communication and still the exception is raised.
All the files like comm.jar and properties file and also windriver are located in the reqd locations.else my program would not have run without using the applet.
Can someone suggest what could be causing this problem
Thanks
Sai

I am having the same problems with this javax.comm package. I am using Java 1.3.1_01 under WIN2K. I checked the hardware profile, and it listed my serial ports. I also have a palmpilot which communicates with this serial port, and it works fine as well.
I tryed installing it two different ways:
1.)
installed it as if I was using jdk1.1.x
putting the comm.jar package in the <jdkroot>/lib dir
putting the properties file in the <jdkroot>/lib dir
putting the dll in the <jdkroot>/bin dir
adding <jdkroot>/lib/comm.jar to the classpath.
While this did not give me a runtime error, it would not recognize any of my serial ports.
2.)
installed it according to the jdk1.2 documentation
comm.jar -> <jdkroot>/jre/lib/ext/ dir
properties -> <jdkroot>/jre/lib
dll -> <jdkroot>/jre/bin
not altering the path
This gave me the following runtime error:
java.lang.NoClassDefFoundError: javax/comm/CommPortIdentifier
     at VirtualGPSConsoleApp.main(VirtualGPSConsoleApp.java:27)
Exception in thread "main"
Process VirtualGPSConsoleApp exited abnormally with code 1
Please let me know if you make any headway.
Thank you,
[email protected]

Similar Messages

  • Javax comm 2.0 API

    Hello everyone.
    Do anyone of you know why the new version of comm api (version 3.0) does not support Windows? It is only available for Solaris SPARC, Solaris x86, and Linux x86.
    Therefore, I can only use comm 2.0. But my problem is that although I have managed to connect a GPS device with my desktop, I can not do that with my laptop or a different desktop pc that I have tried.
    The problem is that the application that I have developed can not find the COM port that I describe.
    Any thoughts?
    Thanks a lot
    Pavlos

    http://www.rxtx.org/
    RXTX is an open source javax.comm 2.x compatible package with multi platform support. I use it on all of WinXP/CE, Linux, FreeBSD, OSX and it works like a charm for parallel, serial and serial to USB devices (for GPRS modems and GPS devices specifically). RXTX is nicely abstracted also so you don't specifically need to use anything but the javax.comm interface unless you want to use one of the API extensions (for example clearCommInput() which is a very obvious omission in the javax.comm api - skip() just does not cut it).
    The code itself is not well documented - for the most part you can use the javax.comm documentation or just read the source - but it works, and works very well. Even if the heuristics in the RXTXCommDriver don't automatically find the device (you can check the sources as to why) you can add devices at runtime with CommPortIdentifier.addPortName() if needed.

  • Javax Comm API on linux

    Hi,
    I am using javax comm API on linux. I am using RXTX comm API release 1.4 that uses gnu.io.RXTXCommDriver on J2ME Personal Profile Runtime Environment for x86 Linux Version 1.0.
    When I try to open a serial port, I get javax.comm.NoSuchPortException. What could be the problem? Does the cvm not support comm API. Is there any alternate way?

    I am looking for one too.. i figured better would be to use JNI classes... but i havent yet implemented it.. mebbe that will cause even more problemos..
    please post here if you find smthing

  • Javax comm api

    hi all,
    I tend to install the javax comm api on my windows98 se but it seem that I cant find the win32com.dll in the unzipped file.
    I downloaded the javax.comm 3.0, update 1 for Linux plateform, since there is no version for the windows.
    I have tried to enable the view every folder in my view tool but cant seem to work, I still cant see the win32com.dll file.
    Regards,
    Rejina Choi

    hi , I having problem downloading this file ""Comm3.0_u1_linux.zip""" and I need it urgently could someone give me a link where I can download it. Sun say that "Product Not Found The product you requested is not available at this time".

  • Trying to use javax comm api in Windows Environment

    I am working on developing a module to dial a phone number in a Windows environment. This is to test a voicemail connection so it isn't, necessarily, calling a modem.
    A couple of questions:
    1) I found the javax comm api but it appears Sun has only provided a Solaris and Linux version - where would I find a Windows version?
    2) I was planning on dialing a modem with the voicemail phone number (programmatically, of course). I, then, want to recognize response and react to it - possibly stopping only with seeing that the phone number answered (since I don't want to write voice recognition software). Am I on the right track?
    Ed

    I don't know of any devices named "/dev/term/a" - and that's both Linux and Solaris.

  • Comma problem with global string variable

    Hi,
    I'm fiighting with comma problem for global string variable. I've on page string for example "7nndqrr52vzyb,0" and by dynamic column link I'm assigning this string to global variable. Then I'm trying to display value of that global variable on another page but I see only string till comma, nothings more. I'm not sure what I'm doing wrong because when I'm trying to assign that value normally by computation process as a constant value is fine and see on another page correct string. I'll be really glad for help.
    Thanks
    Cheers,
    Mariusz

    When it tries to display the string, it sees the comma and wants to believe the string is terminated. You could escape the , in the string or replace it with a different character..
    See this link: http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/concept.htm#BEIGDEHF
    Thank you,
    Tony Miller
    Webster, TX
    If vegetable oil is made of vegetables, what is baby oil made of?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Java comm problem

    hi,
    i'm new to comm api,
    i want to know how to communicate with modem using the comm api.
    coz i have run following code.
    used diff AT commands to set modem properties.
    but
    I could just see the DTR bit of modem set and TD and RD bit were set just a fraction of sec. and then the program went into loop.
    but i couldn't read anything from the inputStream.
    Can anyone help me out?
    Following is the code i used and output i got.
    import javax.comm.*;
    import java.util.*;
    import java.io.*;
    import java.io.DataOutputStream;
    public class TestCommPort implements SerialPortEventListener
    CommPortIdentifier portId;
    Enumeration portIds;
    SerialPort serialPort;
    DataOutputStream outputStream;
    BufferedReader inputStream;
    static String centralPagingNo="1234567";
    public static void main(String arg[])
         TestCommPort testCommPort =new TestCommPort();
         testCommPort.portIds=CommPortIdentifier.getPortIdentifiers();
         while (testCommPort.portIds.hasMoreElements())
              testCommPort.portId=(CommPortIdentifier)testCommPort.portIds.nextElement();
              if(testCommPort.portId.getName().equals("COM2"))
              System.out.println(testCommPort .portId.getName());
              try {
              testCommPort.serialPort = (SerialPort) testCommPort.portId.open("TestCommPort", 2000);
                        try{
                             testCommPort.serialPort.addEventListener(testCommPort);
                   catch(java.util.TooManyListenersException tme){System.out.println(tme.getMessage());}
         catch (PortInUseException e) {System.out.println(e.getMessage());}
              try {
                        testCommPort.outputStream = new DataOutputStream(testCommPort.serialPort.getOutputStream());
                        testCommPort.inputStream = new BufferedReader(new InputStreamReader(testCommPort.serialPort.getInputStream()));
              catch (IOException e) {}
         try {
                   if(testCommPort.serialPort.isDSR()==true)
                   System.out.println("the dsr bit is set");
                   if(testCommPort.serialPort.isRTS()==true)
                   System.out.println("the rts bit is set");
                   if(testCommPort.serialPort.isCD()==true)
                   System.out.println("the cd bit is set");
                   else
                   System.out.println("the cd bit is not set");
                   if(testCommPort.serialPort.isCTS()==true)
                   System.out.println("the cts bit is set");
                   try {
                        testCommPort.serialPort.setSerialPortParams(15200,
                        SerialPort.DATABITS_8,
                        SerialPort.STOPBITS_1,
                        SerialPort.PARITY_NONE);
                        } catch (UnsupportedCommOperationException e) {}
                   try {
                        testCommPort.outputStream.writeChars("AT");
                        System.out.println("initializing modem");
                        testCommPort.outputStream.writeChars("ATQ0 <CR>");
                        testCommPort.outputStream.writeChars("ATM1 <CR>");
                        testCommPort.outputStream.writeChars("ATL2 <cr>");
                        testCommPort.outputStream.writeChars("ATV1 <cr>");
                        System.out.println("result code format option set to Verbose mode");
                        testCommPort.outputStream.writeChars("ATSr? <cr>");
                        System.out.println("reading sr registers");
                        System.out.println(testCommPort.inputStream.readLine());
                        testCommPort.outputStream.writeChars("ATI4 <CR>");
                        System.out.println(testCommPort.inputStream.readLine());
                        testCommPort.outputStream.writeChars("ATX4 <CR> ");
                        testCommPort.outputStream.writeChars("ATE1 <CR>");
                        testCommPort.outputStream.writeChars("ATDT 8655979; <CR>");
                        System.out.println(testCommPort.inputStream.readLine());
              } catch (IOException e) {}
         } catch (Exception e){System.out.println(e.getMessage());}
         public void serialEvent(SerialPortEvent se)
              if(se.getEventType()==SerialPortEvent.DSR)
              System.out.println("the data set is ready");
    and the output is:
    COM2
    the dsr bit is set
    the rts bit is set
    the cd bit is not set
    the cts bit is set
    initializing modem
    result code format option set to Verbose mode
    reading sr registers

    I was also getting strange results in a similar scenario.
    I was using "AT\n" and getting strange results. The above solution, using "AT\r\n" fixed everything.
    Just wanted to pass that along.
    Thanks for the info.

  • Javax comm package

    Do I need to download the javax comm package or what. If yes , what is url for downloading

    What platform are you using, javax.comm is easy on Windows and Solaris http://java.sun.com/products/javacomm/downloads/index.html. On Linux you will need a third party driver from http://www.rxtx.org/.

  • Javax Comm

    Could anyone please explain the exact use of JAVAX COMM ? (ie what it does ?)

    A blackbox is a piece of hardware normally. With this box one can monitor communication lines.
    In this case it is a Java application that monitors the hardware (see the readme in the source directory).

  • Master-Detail commit problem

    I have master detail scenario. I have two forms. First one for the master and the second for the detail. I am first inserting the master data and then i navigate to the other form to insert the detail data. If i make commit from the second form it works just fine, but i need to go back(using JSF navigation) to the first form and commit from there. When I'm doing that i get the following error: JBO-27102: Attempt to access dead view row
    I need solution to this problem
    Thanks
    Edited by: user2136329 on Dec 3, 2009 3:44 AM

    JBO-27102: DeadViewRowAccessExceptionReason: Trying to access a ViewRow which is part of an obsolete/invalid collection. This could happen if a reference to the ViewRow is held by some business logic while the containing view object was removed.
    Solution: Find the referenced ViewRow either by re-querying or using findByKey methods to get a valid reference to the ViewRow.
    >
    How are you creating your detail row - when you are navigating back are you doing a form submit to make sure that the data is submitted to view object..? If yes, try to get the handle to detail viewobject instance to check it holds new rows before commit..?
    ~Krithika

  • COMMIT problem in TopLink, Struts, JSP and ADF Databinding sample

    In the sample Developing a J2EE Application using TopLink, Struts, JSP and ADF Databinding,
    I followed all the steps to build a department browse page and a edit page.
    But when I get to Step number 23 in "Create a JSP to Edit Departments" I have a problem with the commit.
    Only after I make a change in the form and click the sumbit button, the commit and rollback buttons become active. And After I click the commit button the data gets commited to the database but the page inofmation changes to the very first department record, not the current one.
    How do I make those buttons active with out the extra click on the submit?
    After I click the commit button, how do I keep the current data on the screen?
    Thanks for you help.

    Shay,
    Thanks for the reply.
    For #1, I was able to do the following and get away with not having to press submit first. I just removed the bindings for disable. I hope that does not cause any problems?
    <input type="submit" name="event_Commit" value="Commit" />
    <input type="submit" name="event_Rollback" value="Rollback" />
    For #2, How I add an action on an HTML button? My UIModel.xml for the edit department page currently has two actions on it. Commit and RollBack. Is it linked through the "name" attribute of the input tag?

  • Javax.print problems on applet - bug on mac os implementation?

    Dear All,
    I am working on an applet and application that include a print function and I get a weird behaviour on MacOS in applet mode (both with Safari and Firefox - Mac OS X Versione 10.4.9 (Build 8P135) ). In contrast, things work fine on Windows XP (both Explorer 7 and Firefox with Java Plug-in 1.6.0_01) and even in MacOS when using the application.
    The problems are:
    - the print dialogue goes on and off a few times before letting the user interact with it
    - the page format in the dialogue is set to A5 (instead of the printer's default)
    - there is a small empty window appearing together with the dialogue and not disappearing even after the applet is closed
    Is this a known problem? If so, are there work-arounds?
    (I had no luck on Google about this)
    To reproduce the problem I created a stripped down version of the applet, in 2 files, I report it at the bottom of this message. I am using a modified version the PrintUtilities class from http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html
    Am I doing something wrong? Or shall I consider submitting a bug report?
    Any suggestion is welcome! Please let me know if I should provide more detailed information.
    Thank you in advance,
    Enrico
    PrintMe.java
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    public class PrintMe extends JApplet implements MouseListener{
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         public PrintMe() {
              super();
         private class MyComponent extends JPanel{
              private static final long serialVersionUID = 1L;
              public void paintComponent(Graphics g) {
                   super.paintComponent(g);
                  Graphics2D g2 = (Graphics2D) g;
                  g2.setColor(Color.black);
                  g2.drawString( "Test text", 0, g2.getFontMetrics().getHeight() );
         public void init() {
              MyComponent aComponent = new MyComponent();
              jContentPane = new JPanel();
              jContentPane.setLayout(new BorderLayout());
              jContentPane.add(aComponent);
              this.setContentPane(jContentPane);
              this.addMouseListener(this);
         public void print(){
              try{
                   PrintUtilities.printComponent(this);
              }catch (Exception e) {
                   e.printStackTrace();
         public void mouseClicked(MouseEvent e) {
              print();
         public void mouseEntered(MouseEvent e) {
              // not used
         public void mouseExited(MouseEvent e) {
              // not used
         public void mousePressed(MouseEvent e) {
              // not used
         public void mouseReleased(MouseEvent e) {
              // not used
    PrintUtilities.java
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    import javax.swing.RepaintManager;
    import javax.swing.RootPaneContainer;
    /** A simple utility class that lets you very simply print
    *  an arbitrary component. Just pass the component to the
    *  PrintUtilities.printComponent. The component you want to
    *  print doesn't need a print method and doesn't have to
    *  implement any interface or do anything special at all.
    *  If you are going to be printing many times, it is marginally more
    *  efficient to first do the following:
    *    PrintUtilities printHelper = new PrintUtilities(theComponent);
    *  then later do printHelper.print(). But this is a very tiny
    *  difference, so in most cases just do the simpler
    *  PrintUtilities.printComponent(componentToBePrinted).
    *  7/99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
    *  May be freely used or adapted.
    public class PrintUtilities implements Printable {
         private Component componentToBePrinted;
         public static void printComponent(Component c) {
              new PrintUtilities(c).print();
         public PrintUtilities(Component componentToBePrinted) {
              this.componentToBePrinted = componentToBePrinted;
         public void print() {
              try{
                   PrinterJob printJob = PrinterJob.getPrinterJob();
                   printJob.setPrintable(this);
                   PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
                   if( printJob.printDialog(attributes) ){
                        try {
                             printJob.setJobName("MyName");
                             printJob.print(attributes);
                        } catch(PrinterException pe) {
                             System.err.println("Error printing: " + pe);
                             pe.printStackTrace();
              }catch (Exception e) {
                   e.printStackTrace();
         public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
              if (pageIndex > 0) {
                   return(NO_SUCH_PAGE);
              } else {
                   RootPaneContainer rpc = (RootPaneContainer)(this.componentToBePrinted);
                   rpc.getRootPane().getGlassPane().setVisible( false );
                   Graphics2D g2d = (Graphics2D)g;
                   double sy = pageFormat.getImageableHeight() / componentToBePrinted.getHeight();
                   double sx = pageFormat.getImageableWidth() / componentToBePrinted.getWidth();
                   if( sx > sy ){
                        sx = sy;
                   }else{
                        sy = sx;
                   g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
                   g2d.scale(sx, sy);
                   disableDoubleBuffering(componentToBePrinted);
                   componentToBePrinted.paint(g2d);
                   enableDoubleBuffering(componentToBePrinted);
                   return(PAGE_EXISTS);
         /** The speed and quality of printing suffers dramatically if
          *  any of the containers have double buffering turned on.
          *  So this turns if off globally.
          *  @see enableDoubleBuffering
         public static void disableDoubleBuffering(Component c) {
              RepaintManager currentManager = RepaintManager.currentManager(c);
              currentManager.setDoubleBufferingEnabled(false);
         /** Re-enables double buffering globally. */
         public static void enableDoubleBuffering(Component c) {
              RepaintManager currentManager = RepaintManager.currentManager(c);
              currentManager.setDoubleBufferingEnabled(true);
    }

    Trying to answer to myself..
    Is it possible that the problems are due to me mixing java.awt.print and javax.swing.print ?

  • Oracle Forms 6i - mySQL (Commit Problem)

    Hi,
    i'm using Oracle Forms Builder 6i to connect to mySQL 3.23.49 via
    Oracle Open Client Adapter for ODBC 6.0.5.35.0
    Now I have a problem of controlling which form to commit if more than one form are opened.
    E.g. I need to open 2 forms (eg. A, B) and only want to commit the changes made on Form A
    1.
    I open the forms using the follows (i can't use OPEN_FORM('A', SESSION); since mySQL doesn't support)
    OPEN_FORM('A');
    OPEN_FORM('B');
    2.
    then I changed both forms
    Now the :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'CHANGED'
    3.
    I then press my custom save button on form A (triggers KEY-COMMIT). Inside KEY-COMMIT, it calls COMMIT_FORM, then triggers
    ON-COMMIT eventually. In ON-COMMIT, i use the built-in COMMIT to commit the changes.
    Then I found that :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are 'QUERY' which is normal. However both
    forms are committed.
    4.
    So I fixed it by: In ON-COMMIT, add RAISE FORM_TRIGGER_FAILURE; after COMMIT. Although it stops committing changes on another
    form. But :SYSTEM.FORM_STATUS, :SYSTEM.RECORD_STATUS, :SYSTEM.BLOCK_STATUS are still 'CHANGED'. Then I do a EXECUTE_QUERY
    after COMMIT_FORM to change back :SYSTEM.FORM_STATUS, etc to 'QUERY'
    5.
    It works. Only Form A is committed. However when Form A has a lot of records (eg. >500), it affects performance.
    Does anyone know how to solve this problem?
    Any help would be greatly appreciated
    Peter

    The question is not how you disable a key, it might be more how to disable a functionality. What functionality do you want to disable? By default F5 maps to the KEY-MENU-trigger, if thats the function you want to disable, write a NULL; in the KEY-MENU-trigger.

  • Oracle distrebuted document capture commit problem

    hi,i am working with ODDC v10.1.3.5 using (UCM 11g commit driver) and every thing is going well except one problem that is when i commit to ucm there is a field called(subject) is not commited to UCM even it is maped through the commit driver .
    at the document title field(at Commit Driver Configurations) ,i use it as a compination of multible fields (Name-Subject-Date) ,UCM can see the value of (Subject) Field at this position but at the (subject) field (on UCM) it is empty .
    i dont know what is the reason for this issue ,is it a problem whith the commit driver ?
    any help will be appreciated .
    Regards
    H.Sweiss

    Thanks Jiri,
    I have started with the mandatory metadata fields only. I have resolved the previous problem.
    It was because Client Access folder was not properly set.So the .pak files was still residing in the client access folder.
    But now all batches are present in the Batches folder and the logs says
    eg: 07/13/10 04:48:10 PM 19360358_19360532 extracted into C:\Program Files\Oracle\Document Capture\WebPages\ClientAccess\19360358_19360532.
    07/13/10 04:48:10 PM Start processing DS19360358. File Cabinet: captureDocuments; Create User: TEST; Modify User: TEST; Computer Name: MUKESHLT1\MUKESHLT1; Create Date: 7/13/2010 4:45:57 PM; Modify Date: 7/13/2010 4:48:52 PM.
    07/13/10 04:48:10 PM Client Version Number: 10.1350.26.
    07/13/10 04:48:11 PM DS00000000000023 (ID: 24) created in captureDocuments with 1 pages from DS19360358.
    07/13/10 04:48:11 PM DS00000000000023 (ID: 24) is committed, number of documents: 1, total page(s) committed 1.
    07/13/10 04:48:11 PM Post processing batch DS19360358. File Cabinet: captureDocuments; Batch ID: 24; Create User: TEST; Modify User: TEST; Computer Name: MUKESHLT1\MUKESHLT1; Create Date: 7/13/2010 4:45:57 PM; Modify Date: 7/13/2010 4:48:52 PM.
    07/13/10 04:48:11 PM 19360358_19360532 deleted.
    07/13/10 04:48:11 PM
    But it is still not sending to UCM.
    Is there any setup to commit these batches?

  • Dot - Comma problem in WS_download --

    I have 3 fields in the internal table.
    I want to download all those fields in to excel sheet based on the selection screen either dot or comma. I am using ws_download. I want to display all records in left side.
    I have declared all 3 fields as characters.
    Data: a, b,c type c.
    If you select dot all the columns are displaying right side.(perfect)
    Now if I select comma all the columns are displaying in right side.
    Now I want to display all the records are right side even if its comma or dot.
    Pl send me the sample code.

    HI!
    It's not exactly an ABAP problem, but maybe an excel problem.
    In ABAP you can remove all dots from a string with the following command:
    REPLACE ALL OCCURRENCES OF '.' WITH '' IN column1.
    In excel you can declare your cells as a text, or as a number. As text it is always aligned to the cell's left side, as a number it is aligned to the right side.
    Select a few cells, then right click on them and choose cell properties.
    The algnment of the texts, you can overrule with the manual align buttons (left, right, center...)
    Regards
    Tamá

Maybe you are looking for

  • Freight forwarder in Proforma Invoice

    Hi All, In Proforma Invoice, the freight forwarder name does not appear.  Can someone tell me how to fix this issue? Thks.

  • How many repeat repairs before Apple admits they cannot repair problem?

    I have brought in my 15" Powerbook G4 FW800 for a 4th time today to the Apple Store to try and resolve an intermittant problem with the machine not waking from sleep properly. Upon waking from sleep, the screen sometimes doesn't return. The caps lock

  • Invoice cancellation doc picking up billing doc creation date

    hi,      i am cancelling an invoice document which was created and posted last month(july- mm period closed,fi still open) but the cancelled accounting document  is picking up the invoice creation date rather today's date. help would be appreciated.

  • Intermittent error at renderkit.core.xhtml.FormRenderer.getAutoComplete

    We're running into this intermittent issue with Jdev Build JDEVADF_11.1.1.6.0_GENERIC_111117.0916.619 while opening our product. The error stack trace is below. When we were using Jdev 11.1.1.5 and Jdev 11.1.1.4, we had never ran this before. This is

  • Cisco ACS Appliance

    I'm trying to customize the Appliance, which is running ACS 3.3.2.1, via the web interface. When I click on Interface configuration, only "User Data Configuration" and "Advanced Options" selections are displayed. We are customizing this appliance as