Call Java (Beans) from VisualBasic/COM?

Is this ActiveX Bridge (that come with the Java Plugin) suitable for Visual Basic programmers to call Java classes/beans/applications?

yes.
i have developed some tutorials etc. that use VBA that you can see here
http://www.reallyusefulcomputing.com/java/
i am also using the Bridge for a client server app with RMI where the
client is VB and the server is Java.

Similar Messages

  • How to call Java Beans from JSP (eg.put them in a WAR or package)

    Can anyone explain to me what are the steps and ways to call java beans from JSP?

    1st, put the javabean classes in the right place:
    the web-inf/classes/your_bean.class directory of corresponding web application
    2nd in your jsp page:
    <jsp:useBean id="obj_var_name" class="your_bean"/>
    <jsp:setProperty name="obj_var_name" property="smthg" value="smthg_calue"/>
    Micheal

  • How to call java bean from jsp

    hi
    How to call a java bean from jsp page..
    Is any other way to call javabean from jsp page apart from this sample code...
    <jsp:useBean id="obj" class="com.devsphere.articles.calltag.TestBean"/>
    thnx in advance

    If you also use servlets, you can attach beans to the request or session and use them directly in your JSP's. So if you do:
    request.setAttribute("name", yourBean);and then forward to a JSP, you can reference the bean like:
    ${requestScope.name}

  • Calling Java Bean From JSP

    <%@ page contentType="text/html;charset=windows-1252" errorPage = "error.jsp"%>
    <%@ page import="java.sql.*,java.io.*,javax.sql.*, mypackage1.*"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>Process</title>
      </head>
      <body>
          <P align="center">
            <STRONG><FONT face="Algerian" size="6" color="#0033cc">Result from the Query</FONT></STRONG>
          </P>
          <P align="center"> </P>
          <P align="center"> </P>
          <P align="center"> </P>
          <P align="center"> </P>
          <P align="center">
       <%
            int rowsChanged;
            Connection con;
            try
              String sql;
              sql = request.getParameter("query");
              System.out.println(sql);
              session=request.getSession(true);
              String name = (String)session.getAttribute("theID");
              String password = (String)session.getAttribute("paswd");
              String driver="oracle.jdbc.OracleDriver";
              Class.forName(driver);
              String url ="jdbc:oracle:thin:@minerva.humber.ca:1521:grok" ;      
              con = DriverManager.getConnection(url,name,password);
              if(sql.substring(0,6).equalsIgnoreCase("Select"))
                  Statement stat = con.createStatement();
                     ResultSet rs = stat.executeQuery(sql);
          %>
         <jsp:useBean id="myBean" scope="page" class="mypackage1.Table" >
               </jsp:useBean>
             <jsp:setProperty name="myBean" property="*" param="<%rs%>"/>
          <%
            myBean.setTable(rs);
            out.println(myBean.getTable());
         %>
          <%
           else
              Statement stat = con.createStatement();
              rowsChanged = stat.executeUpdate(sql);
              out.println("<h3><STRONG><FONT face=Algerian size=5 color=#0033cc>Number of rows affected are: "+rowsChanged+"</h3></Strong></Font>");
           }//End of Try
           catch(Exception e)
              System.out.println(e+ "gd"+ e.getMessage());     
          %>
          </P>
            <P align="center">
            <a href="check.jsp">Please Click Here to Return to Main Page</a>
          </P>
      </body>
    </html>Above is my JSP file, which is calling a Java bean class called Table. The thing is that Its not returning any Table from the Table Class. I dont know how to use Java bean as I m new to it. Following is my Table Class. So If anyone can plz help me then it would be great. I m suffering from 2 days just because of this class and JSP.
    package mypackage1;
    import java.io.Serializable;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    public class Table implements Serializable
      private ResultSet rs;
      public Table()
      public void setTable(ResultSet result)
        rs = result;
      public String getTable()
             String output=null;
             try
                    ResultSetMetaData metadata;
                    metadata=rs.getMetaData();
         // find the number of fields in customer table
                    int col=metadata.getColumnCount();
                    output = "<table/><tr/>";
                    for(int i=1;i<=col;i++)
                        output+="<td/><b/>"+metadata.getColumnName(i)+"</b/></td/>";
                    output += "</tr/>";
                    while (rs.next())
                           output="<tr/>";
                           for(int i=1;i<=col;i++)
                             output+="<td/>"+rs.getString(i)+"</td/>";
                           output += "</tr/></table/>";
                    }//End of While
               catch(Exception e)
        return output;
      }//End of Table method
    }//End of Class

    First reaction: yuck.
    This is not something you should be using a bean for.
    Beans are meant for storing data, not for generating HTML from.
    I don't really like queries on a JSP page either, but thats a different story again.
    I would recommend you use JSTL for this.
    1 - it provides a c:forEach tag for looping
    2 - it provides sql tags for doing queries in a database
    IF you are going to do database queries from a JSP page, I absolutely recommend you use the JSTL tags.
    (end rant)
    Your problem is probably caused by the fact that in your bean you have the following
    try{
      // code here
    catch (Exception e){
      // completely ignore exception and carry on as if nothing bad happened.
      // what you should be doing is something like:
      System.out.println("Error occurred " + e.getMessage());
      e.printStackTrace();
      return e.getMessage();
    }Cheers,
    evnafets

  • Calling Java Bean from Form 9i

    Dear all,
    I have developed a Java Bean and I want to use it in FOrm 9i. I have imported that Bean (.jar file) sucessfully to my form. I use following code to call the Bean:
    declare
    WordDoc ora_java.jobject;
    javaException ORA_JAVA.JOBJECT;
    Begin
    WordDoc := WordBean.new;
    WordBean.OpenWord(WordDoc, true);
    EXCEPTION
    WHEN ORA_JAVA.EXCEPTION_THROWN THEN
    javaException := ORA_JAVA.LAST_EXCEPTION;
    message(Exception_.getMessage(javaException));
    ORA_JAVA.CLEAR_EXCEPTION;
    WHEN ORA_JAVA.JAVA_ERROR THEN
    message(ORA_JAVA.LAST_ERROR);
    ORA_JAVA.CLEAR_ERROR;
    end;
    But I receive the "raise unhandled Exception Ora-105100" and my form doesn't handle the errors. What am I missing in the code?
    Thanks in advance,
    Hamid Motahar

    Hi,
    You receive this error because at runtime the form can't find the jar. See note : http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=169529.1
    on metalink
    Greetings

  • Calling java beans from forms 6

    Could anyone please tell me if it is possible to call an EJB component from within forms 6.
    And if so how.
    Thanks

    If your EJB is for doing some server side processing, etc. you can consider exposing it via a servlet deployed on the Forms 6i server that accepts GET requests. You can then call to the servlet using utl_http.request.

  • Java bean from oracle Forms6i

    Hi Guys,
    I am calling java bean from oracle Forms6i (implementation
    class property set to bean class). This java bean in turn
    calling some JNI methods written in C. The application server
    (Forms6i) is hanging at the point of calling the JNI method.
    Is oracle Forms6i supports all java functionality (JNI here)
    and if so how to solve the problem ?
    Any pointers or tips in this regard is highly appreciated ?
    Thanks & Regards
    Chandra Mohan

    To call Java from forms:
    look at the technical documents on Java integration at
    http://otn.oracle.com/products/forms
    and also look at the Javabeans and PJC samples in the sample
    code section of Forms on OTN.
    Creating a random number using a java class is an excelent
    example of how to use Java with forms.

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How to call java files from different directories

    hi, how do i call java files from a different directory??
    let say i got partA.java, and i need to include functions from partB.java which is in a different folder. how can i do that?

    Chicon wrote:
    Hi nuttynibbles,
    Before the class declaration in partA.java, you must have an import statement like :
    import someDirectory.partB;
    public class partA {
    ... and before you ask... you'll probably want to read through this http://java.sun.com/docs/books/tutorial/java/package/index.html

  • Stepping into Java Beans from JSP

    I am trying to figure out how to step into the Java Source code for my beans that are used in my JSP pages. I need to be able to debug them by stepping into them, using break points, etc.
    I have Nitro installed and a sample JSP page with the import to my test Java Bean class. What I did was create two projects in my work space. One as a Web project application and one as a Java project. I referenced and opened both projects. Everything compiles fine and the syntax is correct.
    The problem is I can not make the link for importing the class.
    I get this error: Class com.BrianTest.MyBean not found in import com.BrianTest.MyBean
    Anyone got a clue or a good example? I did try and add the class path and I tried to put it in a Jar file and attach the source to the Jar, but same problem.
    Thanks :?

    Stepping into jsp:useBean is not possible, but you can step-into jsp getter & setter tag.
    Since you are using java bean from a dependent project you need to configure your server with DevLoader.
    And currently only Tomcat server can be configured with Sysdeo Devloader to handle this situation
    Download Sysdeo DevLoader for Tomcat from http://www.sysdeo.com/eclipse/tomcatPlugin.html
    NOTE: If the project is self sufficient and not dependent on other projects/locations for classess/libraries then NitroX picks up all the libraries & classes present within default WEB-INF/lib & WEB-INF/classes respectively. And in this case you need not modify server configuration.
    Sysdeo DevLoader is to allow your web project to use libraries/classes from dependent projects. All you need to do is extract DevLoader.zip present within tomcatPluginV3.zip inside your Tomcat/server/classes folder.
    For more information about DevLoader please refer to http://www.sysdeo.com/eclipse/readmeDevLoader.html
    This will solve your problem and you should be able to run/debug your application. And most important make sure you have the correct NitroX build that supports Sysdeo DevLoader, refer http://www.m7.com/whatsnew.htm document against your build id (Help > About NitroX > NitroX Icon)

  • Calling java class from jsp page

    Dear Friends.
    I wrote jsp page and java class.
    Am calling java class from jsp page. after processing result,
    I have to refresh jsp page from java class.
    processing time may take 5 minutes or 1 minute etc. that depends on user.
    Can It be possible ? if possible , How ?

    Ok, I get a very strange error now:
    org.apache.jasper.JasperException: Unable to compile class for JSPerror: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
    What is this??? Anyone?

  • Can we call java jar from ODI?

    Hi All,
    Can we call java jar from ODI? if yes please suggest how?
    Regards,
    Satish

    This is an excellent article from Uli.
    One reason, I dont like this approach is that is mandates to copy the .jar file to the driver folder and restart the agent.
    Think of a scenario where there are several developers in love with Java and want to place the jars in the drivers directory.
    This is a maintenance nightmare for the admin and would clutter up the drivers directory.
    Find here the way to invoke Java jar methods
    http://askankit.blogspot.com/2010/09/call-java-jar-methods-from-odi.html

  • Calling Java API from ABAP using JCo

    I need to call Java API from ABAP & BSP also. For this I have got useful information related to JCo from following blog:
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    But, I am facing one problem. On executing Java program myExample5.java (recommended by Gregor Wolf) from command line I get following error message:
    Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
    Exception in server JCOSERVER01:
    com.sap.mw.jco.JCO$Exception: (129) JCO_ERROR_SERVER_STARTUP: Server startup failed at Thu Apr 26 13:46:32 IST 2007.
    This is caused by either a) erroneous server settings, b) the backend system has
    been shutdown, c) network problems. Will try next startup in 1 seconds.
    Connect to SAP gateway failed
    Connect_PM  TPNAME=JCOSERVER01, GWHOST=gateway, GWSERV=3300
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname 'gateway' unknown
    TIME        Thu Apr 26 13:46:32 2007
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      ninti.c
    LINE        336
    DETAIL      NiPGetHostByName2: hostname 'gateway' not found
    SYSTEM CALL gethostbyname_r
    COUNTER     1.
    Can anyone please help me out. Do I need to do any setting?
    I'll surely reward points.
    Thanks & Regards,
    Nilesh Kumar

    Hi Nilesh,
    From the error i think that the error is with the hostname.
    Please enter the the Application Server IP/Hostname.
    If you are loggin to SAP System "XX1" from SAP GUI. Then click the change Item tab and see Application server name/IP let say "XX2" for hostname or "xx.xx.xx.xx" for IP.
    Replace <i>srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);</i>
    with <i>srv[0] = new Server("XX2","sapgw00","JCOSERVER01",repository);</i>
    If App Server is IP then replace with
    <i>srv[0] = new Server("xx.xx.xx.xx","sapgw00","JCOSERVER01",repository);</i>
    Let me know if it is throwing any error.
    Thanks,
    Prashil

  • How to call Java method from XSLT??

    Hi All,
    Jdev 11.1.1.3.0
    I have a requirement to implement that, I have to call Java method from XSLT. Could anyone please suggest to implement that??
    Thanks,
    Santosh M E

    As pointed by others, you must expose your method as a custom function, registering with JDeveloper (for development time) as well as with SOA Suite (for runtime).
    In the link below you will find a simple step by step example:
    https://blogs.oracle.com/reynolds/entry/building_your_own_path
    Regards,
    Luis F. Heckler

  • Canot call Weblogic Bean from Delphi via JNI

    I tried to call a bean within the weblogiv server 7 from Delphi.
    I use a JNI Wrapper which allows me easily to acces normal java objects.
    I can call the bean from a java application.
    When i try to call the bean via jni, the following error occurs:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****
    [ Assertion violated] at weblogic.utils.Debug.assertion(Debug.java:74)
    at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:258)
    at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:233)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.computeInterfaces(ClientRuntimeDescriptor.java:224)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.intern(ClientRuntimeDescriptor.java:123)
    at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:165)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:145)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    at ejbtest3.ejbtest3sbTestClient1.getInitialContext(ejbtest3sbTestClient1.java:104)
    at ejbtest3.ejbtest3sbTestClient1.init(ejbtest3sbTestClient1.java:32)
    at ejbtest3.ejbtest3sbTestClient1.testmain(ejbtest3sbTestClient1.java:277)
    It seems that i canno create a context object, but i do not know why ...
    So i would be glad if anyone could help me here ...
    Regards Robert

    I would try this with the newest service pack since it seems this assertion does
    not exist in later code lines. It appears to be related to a class loader
    issue. Do you know what version of the Java VM Delphi uses?
    Sam
    robert wrote:
    I tried to call a bean within the weblogiv server 7 from Delphi.
    I use a JNI Wrapper which allows me easily to acces normal java objects.
    I can call the bean from a java application.
    When i try to call the bean via jni, the following error occurs:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****
    [ Assertion violated] at weblogic.utils.Debug.assertion(Debug.java:74)
    at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:258)
    at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:233)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.computeInterfaces(ClientRuntimeDescriptor.java:224)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.intern(ClientRuntimeDescriptor.java:123)
    at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:165)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:145)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
    at javax.naming.InitialContext.init(InitialContext.java:218)
    at javax.naming.InitialContext.<init>(InitialContext.java:194)
    at ejbtest3.ejbtest3sbTestClient1.getInitialContext(ejbtest3sbTestClient1.java:104)
    at ejbtest3.ejbtest3sbTestClient1.init(ejbtest3sbTestClient1.java:32)
    at ejbtest3.ejbtest3sbTestClient1.testmain(ejbtest3sbTestClient1.java:277)
    It seems that i canno create a context object, but i do not know why ...
    So i would be glad if anyone could help me here ...
    Regards Robert

Maybe you are looking for

  • Passing field symbol value to a variable

    Hi All, I have a value in Field Symbol declared as   <FS-STATUS> TYPE STANDARD TABLE. I want to use the value  <fs-status> -low  in  a case statement. For this i think i have to pass the <fs-status> -low  into a variable and then use in case statemen

  • How to clear show isdn history

    Hi, show isdn history command will give active and inactive calls details. I wanted to clear this command output. Shall I know the relevant command for this. IOS is 12.2(8)T5 Regards Sivakondala Rao

  • Shockwave- Unknown Publisher Error

    I help in tech @ a school updating software on about 360 pcs.  Adobe Shockwave last week stopped allowing me to update computers like Optiplex GX520 using XP.  The message box says This is happening since last week and each pc I try to update with Sh

  • Why won't the email I delete from the inbox delete from Verizon server as advanced setting says it will?

    Why doesn't the "remove from server when deleted from I.nbox" not do it on my Verizon server?

  • Cannot Edit source definition of a report

    Hi All, I am new to Apex... I created a Master/Detail form. it automatically creates a report. I am trying to edit the report to add extra conditions but I go to the report page > Regions Zone > Select my report link > Source. It has an option to "Sh