Java comm api not working in j2sdk1.4

am doing a sms project in java..
my code is works fine in jdk1.3 ,but when i tried in j2sdk1.4 it failed
1.classpath used
c:\j2sdk1.4.2_08\lib\comm.jar;
2.copied win32 dll to j2sdk1.4.2_08\ bin
3.comm.jar and java.properties toj 2sdk1.4.2_08\lib
also in policy tool,grant allpermissons set
thkx
arvind

i cant run the program in j2sdk1.4
port is not opening.
iam using comm.jar,javax.comm.properties ,win32 dll

Similar Messages

  • Java comm api in 64-bit Linux

    I apologise if this is off-topic. I can't find a suitable forum, I tried posting in the Java plugin forum, but no luck there. I would appreciate any ideas to find a solution.
    I am trying to use the java comm api to read and write to the serial port but I am getting the following error:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError: /usr/lib64/libLinuxSerialParallel.so: Can't load IA 32-bit .so on a AMD 64-bit platform
    I am using openSUSE 10.2 (X86-64) which uses Linux 2.6.18.2-34-default x86_64.
    I tried Switching to a 32-bit version of java (1.4.2) from within Eclipse and I always run Eclipse in 32-bit java (/usr/share/eclipse/eclipse -vm /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java) but I still get this error.
    Is there anything I can do to get the java comm api working on a 64-bit system?
    Is the java comm api still being developed and maintained? It does not look like it is?
    I've done some searching on the web and I find there is an open source version of the java comm api called RXTX but the website at http://www.rxtx.org/ is not very readable. I don't think I know enough to install this on my system.
    I would appreciate any ideas to get this working.
    Thanks,
    Martin

    I'm stuck again so I would appreciate some more help.
    I've managed to install the Sun 1.6 JDK and configure
    and make rxtx.Any small amount of progress is still progress. :)
    >
    But it still does not work, I get the following error
    when I run the SerialDemo:<snip>
    >
    It seems to be com.sun.comm which is not finding its
    native binary not rxtx! No, it's finding the shared library, unless there are a few more lines at the start of your error message that look like this:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError:
    no LinuxSerialParallel in java.library.pathIt's not finding the function it is looking for in that library.
    This is what confuses me, the
    instructions say install the Solaris version of comm
    api (http://www.rxtx.org/ how-to said Solaris Sparc
    and the rxtx INSTALL file said Solaris x86 so I tried
    both in turn and neither worked) Same here after downloading the latest stuff to my x86 Linux box. I received a similar UnsatisfiedLinkError. I checked the shared libraries and the functions were not in it.
    normally these would
    call the Solaris binary drivers but I assume this has
    to be redirected to rxtx which calls its own
    binaries?Yes. There is a part of RXTX called JCL (Java Comm for Linux) that handles that.
    http://www.geeksville.com/~kevinh/linuxcomm.html
    However, I think the problem is that Sun's API has changed since the RXTX How-To was written. Try downloading the 'comm.jar' at the bottom of the page. It says:
    comm.jar, 2.0.3, generic, English (3rd party backward compatibility, only), EnglishUnzip it and copy the comm.jar file to the 'jre/lib/ext' folder of the JDK/JVM where everything else RXTX created was placed.
    After doing this the SerialDemo app started for me without errors.
    Jim S.

  • Java command still not working - please help

    i have installed jdk1.6.0_05. The javac command works fine but the java command does not work at all. even when i try java HelloWorld i receive this exception message
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Caused by: java.lang.ClassNotFoundException: HelloWorld
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    please help (you to SUN)!!

    bart@kerberos:~$ javac -help
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files and annotation processors
      -cp <path>                 Specify where to find user class files and annotation processors
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -proc:{none,only}          Control whether annotation processing and/or compilation is done.
      -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
      -processorpath <path>      Specify where to find annotation processors
      -d <directory>             Specify where to place generated class files
      -s <directory>             Specify where to place generated source files
      -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -Akey[=value]              Options to pass to annotation processors
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime systemSee the bold part.
    More information: [http://java.sun.com/docs/books/tutorial/java/package/managingfiles.html]

  • Error in the latest Java comm api for Linux

    installed latest Java comm api for Linux, tried test application for the Sun package:
    $ java SimpleRead
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at SimpleRead.main(SimpleRead.java:67)
    Caused by: java.lang.NullPointerException
    at javax.comm.CommPortIdentifier.findConfFile(CommPortIdentifier.java:199)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:117)
    ... 1 more
    What deis this message mean? How to make you serial port support work?

    and what does this error message mean??
    The package was installed accordingly to "Java(tm) Communications API Linux Installation Instructions":
    $ls /usr/lib/libLinuxSerialParallel.so
    /usr/lib/libLinuxSerialParallel.so
    $env|grep CLASS
    CLASSPATH=<..skipped..>:/opt/commapi/jar/comm.jar:/opt/commapi/jar/commtest.jar
    $ ls /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
    /opt/jdk1.5.0_04/jre/lib/javax.comm.properties
    What else does it need?

  • Problem in Accessing serial port using java comm Api

    I have installed java comm Api in my pc.
    i have gone through the instalation instruction which comes on this package.
    I have done the instalation like this
    Copy win32com.dll to my <JDK>\bin directory.
    Copy comm.jar to my <JDK>\lib directory.
    Copy javax.comm.properties to my <JDK>\lib directory.
    and restart the system.
    But when i run the BlackBox , it is giving me message
    "serial port not found".
    Can any one tell me , what is the exact problem ?

    I'm not sure what you mean by BlackBox, but I have used the COMM api extensively.
    The majority of problems is that the api cannot see the serial port (which is what you are describing) and this is caused by incorrect placing of the javax.comm.properties file.
    As well as <JDK>\lib, try putting it into <JRE>\lib as well. That has often solved problems on my setup.

  • Need some help on JAVA COMM API's

    Hi all,
    I am working on Java for first time,,and I am working on serial interface ,I need some documentation of JAVA COMM API's ,Please forward some links

    Have you read any of these?
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2B%22chat+server%22&col=javaforums

  • Java script is not working in custom tabular form

    hai all,
    i have changed my built in tabular form to custom tabular form.my java script is coding working fine in built in tabular form . But in my custom tabular form java script is not working ,since it is created as standard report(Display As).
    pls help me.
    with thanks and regards
    sivakumar.G

    Is the appostrophe function test(pthis) *'* present in your javascript code...
    If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
    Regards,
    Shijesh

  • Deploying Java Comm API

    Hi,
    I am developing an applet which uses Java Comm API. I'm running into some deployment issue. My understanding is that Java Comm API needs to have win32com.dll and javax.comm.properties files installed on the client machine for my applet to use Comm API. Is there a way around this? The ideal way will be to have everything (win32com.dll and javax.comm.properties) in a jar file so that it doesn't need to install any file on the client machine. However looking at previous posts, I don't think that's possible with Java Plug-in. Will I be able to utilize Java WebStart to accomplish this? I'll be interested to find how other people deploy Java Comm API. Thanks in advance.
    Regards,
    Joy

    I�ve developed a solution to this problem. I created a class that creates the javax.comm.properties file where the comm.jar lib looks for it. The trick is to run the method that creates the file before the lib looks for it.
    I show you the example of my code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    public final class PrinterInit {
        public static void printerInit(){
            String archivoConf =
                System.getProperty("java.home") + File.separator + "lib" +
                File.separator + "javax.comm.properties";
            try {
                BufferedWriter out = new BufferedWriter(new FileWriter(archivoConf));
                out.write(
                    "#"+ "\n" +
                    "# Drivers loaded by the Java Communications API standard extension"+ "\n" +
                    "# at initialization time "+ "\n" +
                    "# "+ "\n" +
                    "# Format: "+ "\n" +
                    "#   Each line must contain ONE driver definition only "+ "\n" +
                    "#   Each line must be of the form: "+ "\n" +
                    "#           driver=<ClassName> "+ "\n" +
                    "#       No spaces or tabs in the line. "+ "\n" +
                    "#       ClassName must implement the interface javax.comm.CommDriver "+ "\n" +
                    "#           example: driver=Win32Serial"+ "\n" +
                    "#   "+ "\n" +
                    "#"+ "\n" +
                    "# The hash(#) character indicates comment till end of line."+ "\n" +
                    "#"+ "\n" +
                    "# Windows Serial Driver"+ "\n" +
                    "Driver=com.sun.comm.Win32Driver" + "\n");
                out.close();
            } catch (IOException e) {
                System.err.println("No se pudo crear el archivo:" + "javax.comm.properties");
                System.err.println("Ruta completa:" + archivoConf);
    }Before opening the port I call
    PrinterInit.printerInit();This example writes de javax.comm.properties file needed for a windows implementation. You can change the value of the Driver property for the system you are using.
    Good Luck!

  • Could not find an installed JDK, SCM Java Tools may not work until registry

    Hello all,
    I've downloaded the latest full version of Designer (10.1.2.3), but getting installation error: Could not find an installed JDK, SCM Java Tools may not work until registry
    Any solution?

    3. install the Designer 10.1.2.3 patch to the Developer suite home.When I try to do this at C:\oracle\product\Ora10gDSR2, I get a message OUI-10137: An Oracle Home with name OUIHome already exits at C:\OraHome (a directory that doesn't exist) please specify another name for Oracle Home.
    I don't want to just specify another name because cleaning up these faulty installations requires deleting registry keys, etc, since the deinstall does't really remove everything sufficiently to start with a clean slate.
    I also got the Java JDK message because the JDK 5 is no longer being put straight onto the C drive, it is buried in C:\Sun\SDK\jdk, so some java programs have to be pointed to it. The Oracle installer doesn't provide this option.
    Also, Michael, your post, "Re: Designer 10.1.2.3 on windows Xp Posted: Oct 20, 2007 7:05 AM in response to: mmehdi" is full of unreadable characters and question marks. Maybe I don't have a font you are using. There are also references to a zip file and a Word document that aren't there.
    Anyway, thanks for all your time and effort,
    Edward

  • Troubles with Java Comm API

    I am trying to use the Java Comm API with Windows 2000 and I can enumerate the ports (I am almost sure that the problem is the dll). Do anybody knows a solution?

    Where is the problem?

  • HT1338 Hi, as I shall correct Java for a new mountain ...? Java is currently not working at all Jarda

    Hi, as I shall correct Java for a new mountain ...?
    Java is currently not working at all
    Jarda

    Your question doesn't make much sense, so this is a WAG. Launch the Java Preferences.app in /Utilities, install the Java Runtime Environment when prompted, and, when that's finished, enable Java and Web Start apps.

  • Comm.jar not working in Applet but works in Eclipse

    Hello,
    Please help me to read serial port data from Java Applet.
    The below code working well and get data from weighing machine when we run in eclipse(Run Applet). But it now working when we use class file in Applet.
    I think its security issue, but i still could not understand what we need to do.
    I put the JOptionPane.showDialog and found that the code is crashing in line CommPortIdentifier.getPortIdentifiers(); (Not understood why try catch not working.)
    I am using in Windows 7 environment.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.event.*;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Enumeration;
    import java.util.logging.Logger;
    import javax.comm.*;
    import javax.swing.*;
    public class SimpleApplet extends JApplet {
    public void init() {
    JButton button = new JButton("Click me!");
    button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {                 
         JOptionPane.showMessageDialog(SimpleApplet.this, "hello");
    JOptionPane.showMessageDialog(SimpleApplet.this, Getdata());
    add(button, BorderLayout.CENTER);
    setBackground(Color.GRAY);
    public String Getdata()
         try
              String drivername = "com.sun.comm.Win32Driver";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance();
    driver.initialize();
    catch (Exception e) { //just do nothing, it doesn't really matter
         Enumeration portList=null;
    CommPortIdentifier portId;
    SerialPort serialPort;
    OutputStream outputStream;
    try
         portList = CommPortIdentifier.getPortIdentifiers();
    }catch(Exception ex)
         JOptionPane.showMessageDialog(SimpleApplet.this, "erorr:" + ex.getStackTrace().toString());
    JOptionPane.showMessageDialog(SimpleApplet.this, "get port lsit");
              while(portList.hasMoreElements())
                   portId = (CommPortIdentifier) portList.nextElement();
                   if(portId.getPortType()== CommPortIdentifier.PORT_SERIAL)
                        if(portId.getName().equals("COM1"))
                             try
                                  serialPort = (SerialPort) portId.open("WeightMachine",200);                              
                                  serialPort.setSerialPortParams(1200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
                                  outputStream = serialPort.getOutputStream();
                                  InputStream mInputFromPort = serialPort.getInputStream();
                                  outputStream.write("W".getBytes());
                                  outputStream.flush();
                                  Thread.sleep(500);
                                  byte mBytesIn [] = new byte[20];
                                  mInputFromPort.read(mBytesIn);
                                  //mInputFromPort.read(mBytesIn);
                                  String value = new String(mBytesIn);
                                  mInputFromPort.close();
                                  serialPort.close();
                                  return value.replace("+00", "").replace(" Kg", "");
                             }catch(Exception ex)
                                  return ex.getMessage();
              }catch(Exception ex)
                   JOptionPane.showMessageDialog(SimpleApplet.this, "erorr last:" + ex.getStackTrace().toString());
              return "Not found";
    Thanks in advance.
    Avinash

    959817 wrote:EJP wrote:959817 wrote:
    it now working when we use class file in Applet.Define 'not working'.But when i run applet from browser from same machine its not working.That's not an answer. That's just a vague and pointless restatement of the original vague and pointless statement that I asked you to clarify.
    When you take your car to a mechanic, do you just tell him it's 'not working'?

  • Java comm api doubt.

    ive downloaded the comm api and installed it in my system (win 95) Ive followed exactly all the steps that are recommended and even changed by classpath. I still get the followin error message
    Excpetion in thread "main" java.lang.NoClassDefFoundError : SimpleRead/java.
    Please help.
    thanks
    G.P.

    u were right amolk, i did not include the period and that was the problem. thanks a lot and thank u too DrClap.
    G.P.

  • Java "Endorsed" Mechanism not working?

    Hello,
    I came across a very strange issue earlier this week. I was getting a "NoSuchMethodError" from somewhere in my code. Googling the problem revealed that I was supposed to "endorse" some certain jar files (jaxb-api.jar and jaxws-api.jar). Here is where my problem started.
    I added the following option to java when running my code (my jar file(s) ):
    -Djava.endorsed.dirs="/path/endorsed"
    (For the record: YES, the jar files are in that directory. I've tried all sorts of different configurations in terms of this endorsed dirs option, the classpath, and copying/moving files around. I have thus far been unable to get it to work.)
    My code is run from C++ which looks at a conf file to see what options to pass java. This is a potential weakness (an extra "moving part"), but I'm pretty sure these options are concatenated correctly because when I put in the "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=1044" option, it correctly suspends execution until I attach a debugger. Clearly this is a pretty lazy test, but like I said it's passing the option. Unless java is peculiar about the order of these commandline options, I don't see a problem here.
    So, by this point I was pulling my hair out trying to figure this out. I am extremely averse to shoving these jars into the jre/lib/endorsed directory, but I finally tried that (I actually didn't think there was any difference, but it was a last-ditch effort). To my surprise, my code ran fine without the "NoSuchMethodError." So, for now we have this jar file in the "official" jre endorsed directory, but ideally I would be able to figure out this java.endorsed.dirs option so we didn't have to do that (it just seems so dirty - and global, which I especially don't like).
    Getting the full java command is a little trick, but I can provide that if necessary. From what I can see in the code it's being constructed as:
    java <JAVA_OPTIONS> -jar "<MY_JAR>" "<MY_MAIN_ARGS>"
    where:
    <JAVA_OPTIONS> comes from this conf file (which I was setting as '-Djava.endorsed.dirs="/path/endorsed" ')
    <MY_JAR> is the full path to my "main" jar file which obviously references a bunch of other jars, including these jaxws-api and jaxb-api jars.
    <MY_MAIN_ARGS> is the list of arguments passed into the main function which tells "<MY_JAR>" what to do.
    P.S.> I also noticed that if I shove these files into the jre/lib/endorsed directory and I still specify the -Djava.endorsed.dirs option, it acts as though the files are not endorsed ("NoSuchMethodError"). As soon as I take the option out, it starts working (no error). I don't know if this is relevant information besides the fact that it seems the -Djava.endorsed.dirs option is actually being passed, even though it's not doing what I expect (as in, it's affecting the execution in some way so it must be making a difference in the call somehow).
    So, what gives? Why does -Djava.endorsed.dirs not work?

    Hi Gayatri,
    There are a lot of reasons as to why the java stack could be down. Try bouncing the J2EE stack again. ( restart), and see if it works
    All the best!
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • COMM API - Not finding ports

    Hi there.
    I am having a severely irritating problem with the comm api. I wrote my program in netbeans v3.6 and it runs perfectly, no problems at all. My problem is when I try to run the program using the command prompt. It finds all the relevant .jar file, yet it does not find any ports. I have checked, then checked again and checked once more that the javax.comm.properties is installed properly. I've even re-downloaded it, but it still finds no ports. It finds the comm port fine it netbeans, using external execution. But no such luck from the prompt.
    I'm running windows xp pro, SP2.
    I would really appreciate any insight anyone has, so thanks a lot in advance...

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=COMM+API+-Notfinding+ports&subCat=&site=dev&qp=&chooseCat=javaall&col=developer-forums
    Would have worked, too...

Maybe you are looking for