How to create and call a COM component in Java

Hi All,
can you suggest how to create and call a COM component..or if have any sample simple application can you send it to me...i will try to develop my project.
actually i am configuring a OCR Engine using SDK which is in VB .Net when i contacted their support they told that if i have any sample COM based component Project they will help me...
So please can you help in this.
Thanks in advance.

As said by my fellow posters Java Devolopment Environment (Except Microsoft implementation of JVM,this is no longer supported by MS themseleves) does not provide an built-in support to serve this cause.
If you are looking to devolop a custom based solution the below is a good place to start with where end user is talking about Java <=> JNI <=> Native <=> COM connectivity.
[http://bloggershetty.blogspot.com/2004/12/java-jni-com-activex-bridge-lots-of.html]
However,if you are looking for ready made solutions ?
Implementation any one of the solutions stated below might serve your cause.
Open Source Solutions:
[http://j-interop.org/]
[http://www.danadler.com/jacob/]
Commercial Solutions:
[http://javacombridge.com/]
[http://www.jnbridge.com/]
[http://www.nevaobject.com/j2cdetails.asp?kw=java%20com%20bridge]
[http://j-integra.intrinsyc.com/]
Hope this might help :)
REGARDS,
RaHuL

Similar Messages

  • How to create and call webservices in VC?

    Hi Experts,
    Please tell me the steps to create web services and how to connect and call in VC.
    Regards,
    Nutan

    Hi,
    all steps are described in the two attached document:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a160392c-0e01-0010-7784-9cc564d871d2">How to Consume ES Workplace Enterprise Services in Visual Composer</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e017128b-0c01-0010-fa85-e3a576f1a40d">Consume a Web Service from Visual Composer</a>
    Rgds,
    Karim

  • How to create and edit a .ini file using java

    Hi All...
    Pls help me in creating and editing an .ini file using java...
    thanks in advance
    Regards,
    sathya

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • How to expose and call AM methods from plain java (testability etc)?

    Hello,
    my project is just starting out with the OA Framework. We just encountered our first hurdle - I hope someone here can help out or at least point me in the right direction. None of this stuff seems to be explicitly mentioned in the standard OAF documentation.
    This is the situation: We need to call the logic in our Application Modules directly. Two reasons for this:
    - We need to expose methods in the AM as web services
    - We really want to create unit\integration tests (probably JUnit) and set up some sort of continous integration environment (Cruisecontrol or similar).
    Now, how do we go about this? I see that controller code usually does something a la this:
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    This doesn't seem viable for plain javacode, since there is no pageContext or web beans in that situation.
    Now, I allready tried the most naive approach (tried it in the OAF Tutorial):
    EmployeeAMImpl employeeAMImpl = new EmployeeAMImpl();
    This of course doesn't work, since none of the VO\EO seem to be instantiated, db connection is probably not set up etc.
    The third approach is the one I found in the javadoc for OAApplicationModuleImpl:
    // load some basic properties
    Properties properties = loadProperties();
    javax.naming.Context ic = new InitialContext(properties);
    // 'defName' is the JNDI name for the application module
    // definition from which the root Application Module is to be created
    String defName = "abc.xyz.SampleApplicationModule";
    oracle.jbo.ApplicationModuleHome home = ic.lookup(defName);
    return home.create();
    This seems more promising this far, however I need help with the following two questions:
    1: Do I really need to go through JNDI to access my AMs from plain javacode (JUnit tests, webservices etc)? If not, how do I then instantiate AMs, complete with EOs, VOs etc?
    2: If I do need to go through JNDI: what is the easiest way to register and subsequently call my AMs and their logic\context, particularly for usage from web services and testing frameworks (JUnit etc)?
    I'm kinda stumped here, guys. How have you solved this, if you haven't then how would you go about doing it?

    Hello,
    my project is just starting out with the OA Framework. We just encountered our first hurdle - I hope someone here can help out or at least point me in the right direction. None of this stuff seems to be explicitly mentioned in the standard OAF documentation.
    This is the situation: We need to call the logic in our Application Modules directly. Two reasons for this:
    - We need to expose methods in the AM as web services
    - We really want to create unit\integration tests (probably JUnit) and set up some sort of continous integration environment (Cruisecontrol or similar).
    Now, how do we go about this? I see that controller code usually does something a la this:
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    This doesn't seem viable for plain javacode, since there is no pageContext or web beans in that situation.
    Now, I allready tried the most naive approach (tried it in the OAF Tutorial):
    EmployeeAMImpl employeeAMImpl = new EmployeeAMImpl();
    This of course doesn't work, since none of the VO\EO seem to be instantiated, db connection is probably not set up etc.
    The third approach is the one I found in the javadoc for OAApplicationModuleImpl:
    // load some basic properties
    Properties properties = loadProperties();
    javax.naming.Context ic = new InitialContext(properties);
    // 'defName' is the JNDI name for the application module
    // definition from which the root Application Module is to be created
    String defName = "abc.xyz.SampleApplicationModule";
    oracle.jbo.ApplicationModuleHome home = ic.lookup(defName);
    return home.create();
    This seems more promising this far, however I need help with the following two questions:
    1: Do I really need to go through JNDI to access my AMs from plain javacode (JUnit tests, webservices etc)? If not, how do I then instantiate AMs, complete with EOs, VOs etc?
    2: If I do need to go through JNDI: what is the easiest way to register and subsequently call my AMs and their logic\context, particularly for usage from web services and testing frameworks (JUnit etc)?
    I'm kinda stumped here, guys. How have you solved this, if you haven't then how would you go about doing it?

  • Create and bind javafx objects out of java

    hello,
    iam start to learn javafx and cant find the right way to do what i want.
    the goal is: i have written a graph datastructure in java and want to parse a xml file. for every String in the xml file a new node in the graph should be created. this node holds the data and a position (2D). now evertime a node in the graph was created, a visual representation for this node should pop out in my javafx stage. when the position of the node changed the visual rep. should notice this or rather a function on this object is called (observer).
    is javafx an approach to do so? or should i use java2d?
    do you know a tutorial where i can learn how to create an call javafx objects out of java and how to put them into the stage/scene?
    i found this: http://java.sun.com/developer/technicalArticles/scripting/javafx/javafx_and_java/index.html
    but there is not mentioned how to put the object into the stage/scene.
    regards
    peter

    thanks. this is also a good article. [http://blogs.sun.com/michaelheinrichs/entry/binding_java_objects_in_javafx|http://blogs.sun.com/michaelheinrichs/entry/binding_java_objects_in_javafx]
    Edited by: iam_peter on May 23, 2009 4:49 AM

  • Syntax of creating and calling a stored query in Ms Access

    What is the syntax of creating and calling a stored query via a java program

    Google found this:
    http://www.quepublishing.com/articles/article.asp?p=170870 It has some examples about how to call a stored procedure. Not for Access, though - if you have questions about that, ask Microsoft.

  • How to create and delete an Endeca application in Windows

    HI,
    can you please help me in ,
    how to create and delete an Endeca application inWindows machine not in Linux Machine.
    Thanks.....

    Hi,
    Steps to create an Endeca Application are clearly given in Getting Started Guide.
    http://docs.oracle.com/cd/E38680_01/Common.311/pdf/GettingStarted.pdf (Chapter 6 : Deploying a Reference Application)
    If you want to create an endeca application so as to integrate with Product Catalog system such as ATG using ATG 10.1.1 or above , then create an endeca application using the discover-data-catalog-integration reference application. Steps for doing this are documented in ProductCatalogDTGuide
    http://docs.oracle.com/cd/E38679_01/ToolsAndFrameworks.311/pdf/ProductCatalogDTGuide.pdf (Deploying the Product Catalog Application)
    To delete an Endeca Application that you have created in Windows/linux
    1. Navigate to the control directory of the application that you want to remove and execute the script
    runCommand.bat --remove-app (Removes the provisioning information with EAC admin console)
    2. Remove the instance configuration files for the application using the emgr_update command line utility
    emgr_update.bat host localhost:8006 app_name My_app action remove_all_settings prefix My_prefix
    3. You can then explicitly delete the directory in the Endeca_apps directory where you have initially created your application.
    If you are using discover-data-catalog-integration, you can remove the CAS Record Store Instances by navigating to CAS/bin directory and executing
    ./component-manager-cmd.sh delete-component -n {YOUR_APP_RECORD_STORE_NAME}
    Thanks,
    Shabari

  • How to create and configure JMSConnection Factory programatically?

    Guys,
              How to create and configure JMSConnection Factory programatically and (<b>NOT THRU CONSOLE</b>)?
              There is an option using the JMSHepler to create the Queues.
              Is there an option to create ConnectionFactories using the same or other classes?
              anshuk

    There are no 8.1 "JMSHelper" extensions for creating conection factories (they've been added for 9.0). Instead, you can use a variety of more generic methods.
              You can create configuration scripts using WLST or wlconfig or wlshell, or make direct calls from java into WebLogic's public JMX mbean APIs (all config tools, including the console, call into these APIs).
              For a JMX example, see the implementation of the "JMSML" utility on dev2dev.bea.com. For WLST examples search for "+WLST +JMS".
              Tom

  • How to create and share notes in icalendar

    how to create and share notes in icalendar
    i have created a reoccuring all day event for monday thru friday throughout the month.
    Each day I write notes in the event. I do not want the notes to duplicate each day.
    Now do I set up so notes for that day is only in that day.
    thank you
    angelscott1

    Hi Parga,
    You need to declare the variable at Interface controller and need to map this at the context level.
    Like a variable declared at web dynpro component context level can be used among all views.
    every web dynpro component have an Interface component. this can be used in other components where this perticular component is used it is also have a Context.
    For more info Take Usage of Component Controller Examples.
    [Check this thead|http://help.sap.com/saphelp_nw70/helpdata/en/3a/165da11551994db913f56829f8f3f1/frameset.htm]MPUSAGE
    WDR_TEST_CMPUSAGE_CI1
    WDR_TEST_CMPUSAGE_CI2
    WDR_TEST_CMPUSAGE1
    WDR_TEST_CMPUSAGE2
    WDR_TEST_CMPUSAGE3
    WDR_TEST_CMPUSAGE4
    WDR_TEST_CMPUSAGE5
    WDR_TEST_REF_CMP_USAGE_CI
    WDR_TEST_USAGE_GROUPS_CI
    WDT_COMPONENTDETAIL
    WDT_COMPONENTUSAGECheerz
    Ram

  • How to create and deploy a simple jstl applicaton in weblogic 10.3.3

    How to create and deploy a simple jstl applicaton in weblogic 10.3.3

    1) Since JSTL libraries are provided as Web application libraries, they must be deployed before the Web application that is using JSTL functionality is deployed. The libraries can be deployed using the Administration Console or with the command-line weblogic.Deployer tool.
    Here’s an example of deploying a JSTL 1.2 library using the weblogic.Deployer command-line:
    java weblogic.Deployer -adminurl t3://localhost:7001
    -user weblogic -password weblogic
    -deploy -library
    d:/beahome/wlserver_10.3/common/deployable-libraries/jstl-1.2.war
    This command deploys the JSTL 1.2 library using the default library-name, specification-version and implementation-version defined by the MANIFEST.MF in the library.
    After a library is deployed, the extension-name, specification-version and implementation-version of the library can be found in Administration console. This information can also be found in the MANIFEST.MF file of the library WAR file.
    For more information on deploying a Web module refer below URL
    http://docs.oracle.com/cd/E15051_01/wls/docs103/deployment/deployunits.html
    2) To reference a JSF or JSTL library, a standard web application can define a <library-ref> descriptor in the application’s weblogic.xml file. Here is an example:
    <library-ref>
    <library-name>jsf</library-name>
    <specification-version>1.2</specification-version>
    <implementation-version>1.2.0</implementation-version>
    <exact-match>false</exact-match>
    </library-ref>
    For more information on referencing a Web application library refer below URL
    http://docs.oracle.com/cd/E15051_01/wls/docs103/programming/libraries.html
    3) Create a sample JSP in your application and JSP should look as shown below
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>TestJSTL</title>
    </head>
    <body>
    <c:set var="topic" value="JSTL" />     
    <c:out value="${topic}" />
    </body>
    </html>
    4) Create WAR and deploy and test.
    Edited by: Murali Veligeti on Jul 26, 2012 9:00 AM

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a hint for a component(awt),thanks

    How to create a hint for a component(awt),the component of awt has not the property.

    If you are talking about a tooltip, this is going to be hard.
    You are probably going to have to use a mouseMotionListener to get the event that the mouse is over the component and then a Timer to fire the showTooltip event if the mouse hasn't moved in some amount of time.

  • How to create and share streaming video?

    Hi -
    I have finally finished a project in PE8 and I'd like to upload it to my website so that others can stream it.
    I have created output in FLV, MOV and MPG formats.
    I have uploaded them to my web server.
    However, whenever I link to the video, my browser (IE or Firefox) just asks to download or run it.
    Then, it tries to download the entire video - this is a problem as the files are up to 1.3gb.
    I've tried this:
    <html>
    <a href="myvideo.flv">CLICK HERE</a>
    </html>
    and this:
    <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" WIDTH="160" HEIGHT="136" >
    <PARAM NAME="src" VALUE="myvideo.mov" >
    <PARAM NAME="autoplay" VALUE="true" >
    <EMBED SRC="myvideo.mov" TYPE="image/x-macpaint"
    PLUGINSPAGE="http://www.apple.com/quicktime/download" WIDTH="160" HEIGHT="136" AUTOPLAY="true"></EMBED>
    </OBJECT>
    and this:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="400" >
    <param name="movie" value="myvideo.flv">
    <param name="quality" value="high" >
    <param name="LOOP" value="false">
    <embed src="myvideo.flv" width="400" height="400" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></ embed >
    </ object >
    So, why isn't it streaming?
    Is it the video format?
    The embedding on the web page?
    My server?
    Perhaps you can share the details of how you created and setup a streaming video?
    Thanks....

    You need to embed a player for the file. This will differ by the file type that you choose. I'd probably go with a Flash player, but you have other choices.
    I'd post your request for the exact instructions, and HTML code needed, plus tips on optimization to the Muvipix "Community," probably under the "Water Cooler" sub-forum. The Webmaster there, Ron, is an expert in embedded players, as are several other subscribers. I'll bet that you'll get the exact code, with all sorts of useful tweaks, in no time. If Ron suggests another file type and player, listen to him, and not to me. I just deliver the streaming AV files in the exact format that my client asks for. They have their Webmaster use them in their particular page design. My job ends, before your's, now, begins.
    Good luck,
    Hunt

  • Creating and calling stored procedure using jdbc

    When I try to create and call a stored procedure using JDBC a very confusing error message about non-existence of the procedure just created is thrown. Using Informix database (IDS 10). Any pointers to point out what am doing wrong would be great!
    Thanks
    import java.io.FileNotFoundException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Scanner;
    public class CreateStoredProc {
    public static void main(String args[]){
    if (0 == args.length)
    return;
    try {
    Class.forName("com.informix.jdbc.IfxDriver");
    Connection conn = DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    } catch (Exception e) {
    e.printStackTrace();
    The stack trace:
    java.sql.SQLException: Routine (runproc) can not be resolved.
    at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3204)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3518)
    at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2353)
    at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2269)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2157)
    at com.informix.jdbc.IfxSqli.executeExecute(IfxSqli.java:2132)
    at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:378)
    at com.informix.jdbc.IfxStatement.a(IfxStatement.java:1299)
    at com.informix.jdbc.IfxStatement.executeImpl(IfxStatement.java:1269)
    at com.informix.jdbc.IfxStatement.c(IfxStatement.java:989)
    at com.informix.jdbc.IfxStatement.execute(IfxStatement.java:875)
    at CreateStoredProc.main(CreateStoredProc.java:37)
    Caused by: java.sql.SQLException
    at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:373)
    at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3523)
    ... 10 more

    DriverManager.getConnection("jdbc:informix-sqli://10.76.244.120:30000/sampledb:INFORMIXSERVER=krisunda;user=root;password=cisco");check with ur sys admin wheather the particular user in the database has >execute privilage(rights) also.i mean execute the SP in the DB level.I guess that a root user will have the enough right.
    String q = " create procedure runproc() "+
    " define i int; "+<" let i = 0; "+
    " end procedure; "+
    " execute procedure runproc(); ";
    Statement stmt = conn.createStatement ();
    stmt.execute (q);Try to use the following code:
    String q = " create procedure runproc() "+
    " define i int; "+
    " let i = 0; "+
    " end procedure; "
    Statement stmt = conn.createStatement ();
    stmt.execute (q);
    q=" execute procedure runproc(); ";
    stmt.execute (q);
    Because maybe the driver failed to precompile your sql once, so that nothing happen.

  • How to create and manage the log file

    Hi,
    I want to trace and debug the program process.
    I write the code for creating log file and debugging the process.
    But i am not able get the result.
    please help me how to create and manage the log file.
    Here i post sample program
    package Src;
    import java.io.*;
    import org.apache.log4j.*;
    import java.util.logging.FileHandler;
    public class Mylog
         private static final Logger log = Logger.getLogger("Mylog.class");
         public static void main(String[] args) throws Exception {
         try {
           // Create an appending file handler
            boolean append = true;
            FileHandler handler = new FileHandler("debug.log", append);
            // Add to the desired logger
            Logger logger = Logger.getLogger("com.mycompany");
            System.out.println("after creating log file");     
              catch (IOException e)
                   System.out.println("Sys Err");
            }Please give the your valuable suggesstion... !
    Thanks
    MerlinRoshina

    Just i need to write a single line in log file.

Maybe you are looking for

  • Restore Preview Button in Acrobat 9

    Using Acrobat 9 on Mac OS 10.6.8.      Previously when I opened a file in Acrobat and chose Add or Edit Fields it opened in the edit mode and at the top I had a button "Preview" to switch between Preview and Edit mode.      Now that Preview button ha

  • How to create a help file for a VI

    I want to create a help file describing my VI. How do i do that by clicking a control. How do I store the help file.

  • @media print css tag

    I am using the @media print rule to present my data in a printable format (letter size). The problem I am having is Safari shrinks the output to about 1/4 of the desired size. It works fine in IE and Firefox. Has anyone else experienced this issue?

  • Looking for an ABAP Trick

    Hi All, I have two internal tables say it_itab1 and it_itab2. it_itab1 have distinct sale order numbers and it_itab2 contains the material numbers with the sale order numbers. Now in the output i need those lines from it_itab2 which material numbers

  • OS 10.6 Airport incompatible with Sky routers

    Hi guys, this is my first post and also my first month "going mac" as a PC user I always wanted the new stuff even if it was a major step back in some cases...cough*VISTA*cough anyway i got snow leopard on its release day pretty much (my mac had been