Java OCX Communication

Hi,
In our project there is a necessity that one of my java program reads an OCX which is provided by a sensor instrument.We cannot use a third party tool like IBM's BridgeToJava,rJax,JIntegra.Now my question is can it be done entirely programmatically using JNI or any other java API?I would be grateful if someone has any sample code for reference.
Thanks in advance
Kabindra Narayan Dutta

You can use SWT package from eclipse project it's completely free.
Win version supports OCX and ActiveX components. The only problem is that you can't integrate ActiveX with 1.4 Swing. You can make all your GUI with SWT - if you know Win API it's more or less the same.
Cheers

Similar Messages

  • Problem download: Java serial communication

    Hi,
    I need to work with Java serial communication api for Windows.
    As mentioned on SUN site, downloaded the following:
    1) comm2.0.3.zip, &
    2) rxtx-2.0-7pre1-i386-pc-mingw32.zip
    Extracting, unable to see win32com.dll & javax.comm.properties
    Can you help me?
    Thanks,
    Priya

    Hi priya
    There is problem in your downloaded s/w
    Download commAPI once again then try
    Read the readme file and follow the instruction

  • Problems uninstalling Forte for java 4 community edition

    I just installed Forte for java 4 community edition at work, and when i tried to uninstalled it with add/remove programs from control panel. And the uninstall wizard start but then a Sun window apper and it is written, uninstalling and the uninstall program seems to be frozen.

    i have the same problem, reading the documentation it seems you got to run the installer again and you ll get prompted with the "file deletion confirmation"
    too bad i have a self-installing package and i don't get the prompt...
    guesses anyone?

  • Java System Communications Express attachment problem

    Hello everyone, please excuse my ignorance on this query as I have very little to do with the Java language and I've really approached this forum as I've run out of ideas for the problem my customer has.
    The customer is connecting to a 'Sun Java System Communications Express' server, from approximately 20 PC's. 2 of the PC's have a problem that is not user based because if they sign in elsewhere their problem disappears and likewise if someone signs into their PC, they experience the same problem.
    If the user receives an email with an attachment and forwards it to a recipient, no problem.
    If the user recieves an emal with an attachment and forwards it to themselves, no problem.
    If however, the user tries to send an email with an attachment (which for all intents and purposes seems to take the correct amount of time to upload, and when you click save appears in the message attached) the attachment disappears, including if you simply save the message in drafts and do not actually send it.
    I have tried uninstalling and reinstalling versions 5 and 6 of Java, resetting the web settings using both IE6 and IE7 (unfortunately the initial secure server refuses any other connections from Firefox / Netscape / Opera / Safari therefore I can only test with IE)
    I have disabled all additional addons, disabled all non-microsoft startup services, disabled all startup programs.
    As you will appreciate, I've done a fair and reasonable amount of testing and simply cannot work out why the attachment fails to stay with the email on these two machines. Help on this problem would be very much greatly appreciated.
    Many Thanks
    Tony

    Unfortunately I do not have access to version information of the server as I am only have access to the client end. All that I can provide you with is the fact that it works on 18 identical systems. The missing attachment(s) occur regardless of whether you save the message to draft or send the message. It should be noted however that if you receive an attachment with a message and save that to drafts, the message retains the attachment so it only seems as though it is affected during the phase of attaching the file to the message from the local PC. The environment that the client is working in uses a verified certificate and is connected through https.

  • Sun Java System Communications Express 6

    Does anyone have information about Sun Java System Communications Express?
    Has it been released? What are your opinions, etc?
    Thanks,
    GB

    i started with schema 2
    so installed directory identity - verified them
    ran instalelr again and instaleld messagign , calendar - tested them
    then installed communicatiosn express and configured as per setup docs - configured them for identity sso not messaging sso
    l8r

  • What are the pre-requisite for JAVA Proxy communication?

    What are the pre-requisite for JAVA Proxy communication?

    Hi,
    You can install the Java proxy runtime on the SAP J2EE Engine Release 6.40 SP5 or higher.
    The messaging system that the Java proxy runtime uses to send messages to the Integration Server must also be installed on the J2EE server.
    To send messages from a J2EE application, the application must be programmed against beans that encapsulate all details about the Java runtime. The following classes are generated:
    ·        Proxy classes that send or receive messages using the Java proxy runtime.
    ·        Bean classes as an outer shell that conform to the J2EE standard. The beans call the proxy classes for communication.
    The classes must be deployed on the J2EE server together with their J2EE application
    see this link for the example scenario http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d

  • Use of synchronized queue for java socket communications

    Hi all,
    We have a need for a server socket application (stand alone java application) to process just one command per time coming from a java socket client (JSP Web application). There are a lot of users accessing the java socket client, but the server socket can only handle one command per time, so there is a need of a queue type, so users will have to wait for their time.
    We've been told that we can use "synchronized Queue", but we don't know what it is and how to use. A URL, book etc. with sample code would assist us, since we are new to both java socket communication and queue of commands.
    Can anyone assist us
    cheers
    Trajano
    P.S.
    The server socket java application has two threads:
    1st thread handles the java socket communication;
    2nd thread is a RS-232 serial driver that communicates to several micro-controllers connected on a multi-drop.
    JSP web app client socket users can issue various commands at the same time to the java server socket app, however the server can only service one command per time (just one RS-232 COM1 serial port available). The commands have to somehow be added to a queue for processing.

    I do not have the experience to offer advice. But I just happened to be reading today about Collections.synchronizedList.
    import java.util.List;
    import java.util.LinkedList;
    import java.util.Collections;
    public class Queue {
       private List queue;
       public Queue() {
          queue = Collections.synchronizedList(new LinkedList());
       public Object removeItem() throws InterruptedException {
          synchronized (queue) {
             while (queue.isEmpty())
                queue.wait();
             return queue.remove(0);
       public void addItem(Object item) {
          synchronized (queue) {
             queue.add(item);
             queue.notifyAll();
    class Test {
       public static void main(String[] args) {
          final Queue queue = new Queue();
          //start a thread to process items from the queue
          Runnable work = new Runnable() {
             public void run() {
                try {
                   Object item = queue.removeItem();
                   //do something with item
                } catch (InterruptedException e) {
                   //handle this
          Thread worker = new Thread(work);
          worker.start();
    }Reference: Java Thread Programming, Paule Hyde
    Also, here is Doug Lea's library,
    http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

  • 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

  • Out of memory error in java- flex communication using RTMP

    We are using flex and java in our application. due to RTMP call to fetch data every 5 seconds. it is hiting database and establishing connection and keeps it open hence this is causing for Out of memory issue. Can come one help on this issue.

    You probably want to ask here: http://forums.adobe.com/community/flex

  • Java one community edition

    Hi-
    I am looking for a cheap windows IDE that has GUI and
    database capability. Sun one seems to contain these things as I read
    through the features. One IDE I played with a little (years ago) was
    Delphi. Does sun one community edition come with a toolbar for
    draging and dropping pre-built items like a database grid, check boxes,
    radio buttons, combo boxes, push buttons etc.?? Does it come with
    predefined events like form open & close or for database before post, on delete,
    after post attached to the components etc. I know that is lots to ask for something that is free which
    brings me to a final question. If I use this tool and profit from using it am
    I violating a license agreement? I have 2 semesters C++ programming at
    college and cant find a cheap tool in C++ for windows (widely used).
    Borland and Microsoft are both expensive for C++ GUI.
    thanks for your help
    jim

    for java...
    you are asking about forte i believe. yes it has all the whirly bits of a full blown IDE and it is free. but it is slooooow and pretty piggish on memory (although a lot of IDE's tend to be). i personally don't like it but i don't like IDE's in general so my opinion on this matter is somewhat irrelevant. anyway the answer to all your questions i believe is yes.
    actually i was just looking about and i see it's all changed it used to be forte. i can't find anything at the moment but for answers to your legal questions try reading the licence agreement, they are usually very legalese but if you read a couple of times you should be able to get the gist of it.
    for c++, i don't know about the IDE question. here is a link though to the gcc compiler which is an open-source c and c++ compiler for a LOT of platforms http://gcc.gnu.org/
    hope this helps you out a bit

  • Java and communication port

    Hi all
    I want to know if java can communicate with a device , for example a TPE (Terminal de Paiement Electronique), via the PC communication port . I want to send and receive informations between a java stored procedure and the TPE.
    Thank you very much indeed.

    In case if you find any Win32 Calls or C++ calls which accomplish your requirement, You might write an JNI wrapper over it and use those java APIs.
    -Suria

  • Java - Excel communication

    hi all,
    I am new to Java. I am looking for some information regarding how to communicate between java and Excel. I've tried the Java active x bridge and it is not very scalable, getting several issues. I am not sure whether that is the right way to go. Some one suggested to have Java - Com direct communication and I 've no idea where to start. If you know about this, could you please share?.
    please email to [email protected]
    Thanks,
    kris

    Hi scsi-boy,
    I'm trying to help him out. I'm not spam the forum.
    I gave him an option and a detailed example that he
    can follow to slove his problem. I didn't see
    anything wrong about this.
    Have a nice day.
    Hao Zhang
    J-Integra Interoperability Solutions
    http://j-integra.intrinsyc.com/
    high performance interop middleware for java, corba,
    com & .netHoa Zhang,
    Oh yeah you really wanted to help. That's why you put your advertisement for your crap into a thread that was SEVEN MONTHS OLD.
    No I don't believe you. I believe you are liar. I believe you and your associates search for old posts to post your advertising into.
    That is spam. And from this account and the other jintegra ones this has been going on for some time. This is spam and an abuse of the forum and has been reported as such. The other account also was an abuse because there were two or three different people using it to post your jintegra ads into very old posts.
    It is one thing to mention something that may help in a topical thread. But when the thread is old like this you are NOT doing it to help. You are doing it to advertise. And don't think anybody is so stupid as to not see or understand the difference.
    And just to be clear since you people won't stop as well as reporting abuse I will be posting my jintegra is a dirty spammer company message in every one of these style posts I see from now on to warn any unsuspecting individuals about your conniving behaviour.
    You have a good day now too. It will be better if you and your associates drop your little campaign now.
    Sincerely,
    Max

  • Java Applet Communication

    I have discovered that a Java Applet in a browser (Win or Mac) can talk to a Servlet on a server to access a database.
    Is there anyway that a Java Applet in a browser (Win or Mac) can talk to a Java application running on the client system so that it can access local databases?
    I was thinking something like writing cookies and then using the java application to read the contents and act accordingly. This would obviously be slow as far as feedback is concerned, is there a quicker or better way?
    Thanks
    James.

    I had the same problem and i had to implement a server running on my local machine.
    The servlet on the server allow me to access the local database.
    As for trying to change the policy tool.....it's a nightmare.
    I would recommend you to use a applet-servlet communication..

  • Java JDBC Communication Link Failure

    Hi,
    I have a Java application which utilizes the JDBC mysql connector 5.1.6. It works great, and I am able to connect to my MySQL database just fine and execute queries perfectly.
    However, it seems that if my server idles for certain periods of time without issuing a command to the MySQL server (and this idle period seems to be variant; sometimes if it sites just 5 minutes I get this error, other times it has to idle for close to 25 minutes before it gives me this error):
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    Last packet sent to the server was 1493610 ms ago.Obviously the "... ms ago" part varies based on how long the server was idling.
    This is a particular problem for me because the purpose of my application is to be one part in more of an enterprise information system. So this connection to the database is intended to make an update every 25 minutes to update a user's session data in my database. Unfortunately, when idling for this long it will just error out.
    My temporary solution has been to catch this exception, reconnect, and re-issue the query which is working, but that's like putting a band-aid on a wound that needs stitches. The real problem is I have so many areas in my code where I execute commands that it would make it difficult to maintain if I had to use this Try-Catch method of reconnecting in each spot.
    Is there some timeout setting I need to set in MySQL or in the JDBC to stopt his error from happening? I have read the MySQL documentation and its timeout is already set to an hour so that shouldn't be the problem...
    Thanks!

    I searched for this on google:
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
    and here is a link that might help:
    http://forums.mysql.com/read.php?39,199085,204628#msg-204628
    I think the key to your problem is the last line in that link. In connection pooling, you should get a connection, use it, then close it as quickly as possible (ideally, all in the same function within try/catch/finally block) for each time you need to use a connection (hundreds of times within your application). I suspect you open a connection and keep it open with the anticipation that there is a performance penalty in alternatively opening and closing it hundreds of times. There is none. The act of getting and closing a connection from a connection pool is a lightweight operation (in terms of performance). I suggest going back and refactoring your code with the above in mind. That way, your connections will never time out (they are only open for a few milliseconds at a time).

  • Java Serial Communication (Student)

    Hey there,
    Im new to this forum and currently a full time student (not in any type of computer programming). I am currently working on an assignment in Java Programming and I am having difficulty with having my program executing the scenario i want.
    If anyone is willing or available to help me, I will post the code I currently have and explain where I am encountering problems.
    The program is a basic serial communication applet, that has two buttons and a textfield. The first button is supposed to send the text in the textfield (writeButton) and the second button will be used to read the text (readButton).
    For now I am creating two separate applets, one to write and one to read, with only one button "performing" an action in each.
    Thanks

    Ok I got rid of the code that I don't think I need and added the actionListener.
    The program compiles with no errors, but will still not send the messageString.
    Do you see where the possible errors are?
    import java.io.*;
    import java.util.*;
    import javax.comm.*;
    import javax.swing.JApplet;
    import java.awt.event.*;
    import java.awt.Graphics;
    import java.applet.*;
    import java.awt.*;
    public class ProjectWrite_test_2 extends JApplet implements ActionListener
         static Enumeration portList;
         static CommPortIdentifier portId;
         static String messageString = "Hello, world!\n";
         static SerialPort serialPort;
         static OutputStream outputStream;
         //public static void main (String [ ] args) {
         String OutString;
         TextField textFieldWrite;
         Button writeButton;
         Button readButton;
              public void init()
                    writeButton = new Button ("Press to Write");
                    writeButton.addActionListener(this);
                    readButton = new Button ("Press to Read");
                   Container window = getContentPane();
                   window.setLayout(new FlowLayout());
                   window.add(writeButton);
                   window.add(readButton);
                    textFieldWrite = new TextField(50);
                   add(textFieldWrite);
                    String outString = textFieldWrite.getText();
                   public void paint (Graphics g)
                             String s = textFieldWrite.getText();
                   g.drawString(s, 40, 50);
              public void actionPerformed(ActionEvent c)
                        portList = CommPortIdentifier.getPortIdentifiers ( ) ;
                                  while (portList.hasMoreElements ( ) ) {
                                       portId = (CommPortIdentifier) portList.nextElement ( ) ;
                                       if (portId.getPortType ( ) == CommPortIdentifier.PORT_SERIAL) {
                                            if (portId.getName ( ) .equals ("COM1")) {
                                                      try {
                                                           serialPort = (SerialPort)
                                                           portId.open ("SimpleWrite", 2000);
                                                      } catch (PortInUseException e) { }
                                                      try {
                                                           outputStream = serialPort.getOutputStream ( ) ;
                                                      } catch (IOException e ) { }
                                                      try {
                                                           serialPort.setSerialPortParams (9600,
                                                                SerialPort.DATABITS_8,
                                                                SerialPort.STOPBITS_1,
                                                                SerialPort.PARITY_NONE) ;
                                                      } catch (UnsupportedCommOperationException e) { }
                                                      try {
                                                           outputStream.write(messageString.getBytes());
                                                      } catch (IOException e) { };
                             }

Maybe you are looking for

  • Problem setting the value of a substitution variable in a calc script

    Hi, All. I'm trying to update the value of a substitution variable inside an IF statement and I'm having trouble. Here's the code: *"Jan"(* IF  (LoopCounter = 1) &varEntity = "100"; ENDIF;) the error I get back from EAS is: Error: 1200336 Error parsi

  • Need help with logo

    Hi I have a logo on the top of the page, it is an oval and had has a g with a horse...I am trying to clean the picture up and not having any luck....can anyone help me... I suck with photoshop http://www.gullionshowhorses.com/

  • Html on labels

    Hello, I use html in several places in my frame-based app, e.g. on various labels, as a tree cell renderer, etc. Is there anyway to globally set html font sizes? For example, if my html string specifies SIZE=2, is there some way to force the JVM to r

  • TM Options - Warn when old backups are deleted

    I have this option checked. At what threshold will that occur, and is there a way to define at what point they'll start to get deleted?

  • Query bean and multipleSelection (Urgent, please help!!!!)

    In my search page(query region, Construction Mode:     autoCustomizationCriteria, result table: advancedTable). I have a column of check box, some how the check box value is not updated when it is checked. Do you see what is missing? thank you in adv