How to use the java native api

i am new to the java native api, can anyone tell me how to use it in order for me to use the c++ file in the java file?please explain it if possible, thanks

Try this out to learn the basics :
http://java.sun.com/docs/books/tutorial/native1.1/index.html
You can't go wrong from there.

Similar Messages

  • How to use the Java embedding activity in BPel

    hi all,
    How to use the java embedding activity in BPEL
    pls can u provide sample example

    1 Use [Oracle BPEL Process Manager Client Java API Reference|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/overview-summary.html] and especially [com.collaxa.cube.engine.ext|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/com/collaxa/cube/engine/ext/BaseBPELXExecLet.html]
    Instead of System.Out.println use addAuditTrailEntry(java.lang.String message)
    2. If you want to import a package write in code (Source View) of bpel process
    +<bpelx:exec import="package_name"/>+ for example +<bpelx:exec import="java.util.regex.Matcher"/>+
    example 1:
    String bodyAsString;
    StringBuffer myStringBuffer = new StringBuffer();
    try {
    bodyAsString = (String)getVariableData("BodyString");
    addAuditTrailEntry("bodyAsString1: "+ bodyAsString);
    Pattern pattern = Pattern.compile("goodDay");
    Matcher matcher= pattern.matcher(bodyAsString);
    while (matcher.find()) {   
    matcher.appendReplacement(myStringBuffer, "shitDay");
    matcher.appendTail(myStringBuffer);
    bodyAsString = myStringBuffer.toString();
    addAuditTrailEntry("bodyAsString2: "+ bodyAsString);
    } catch (Exception ex) {
    addAuditTrailEntry("Failed+bodyAsString",ex.getMessage());
    I put in code (Source View) the following
    <bpelx:exec import="java.util.regex.Matcher"/>
    <bpelx:exec import="java.util.regex.Pattern"/>
    example2:
    Object temp;
    try {
    temp = ((XMLElement)getVariableData("inputVariable","payload","/ns2:FiscalisMessage/ns2:Body")).getChildNodes().item(1);
    setVariableData("AdjReceipt",temp);
    addAuditTrailEntry("ok",temp.toString());
    catch (Exception ex) {
    addAuditTrailEntry("Failed :",ex);
    I put in code (Source View) the following
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

  • How to use the java class created by  "CONTIVO" as web sevrvice?

    Hi All,
    We are creating the java class by the Contivo mapping tool, how to use that class as a web serivce?
    Very thankful if anyone gives some light on this.
    Thanks in advance.....
    rgds,
    Rajeev Pariyadathu

    com.contivo.runtime.dom.Transform
    Transform.transform(     "Transform_HotelAvailRQ_",file1, file2);, like this we can use the contivo generated class

  • How to use the Java objects or methods in pl/sql function as a parameter

    dear all,
    I java object passed as a parameter in pl/sql. how can i access the java objects as parameter in pl/sql function. please give a soultion to me
    mohan reddy

    I'm not sure whether this would help you.
    Have a look at this program to list files from a directory.
    CREATE GLOBAL TEMPORARY TABLE DIR_LIST
    ( FILENAME VARCHAR2(255) )
    ON COMMIT DELETE ROWS
    Table created.
    create or replace
    and compile java source named "DirList"
    as
    import java.io.*;
    import java.sql.*;
    public class DirList
    public static void getList(String directory)
    throws SQLException
    File path = new File( directory );
    String[] list = path.list();
    String element;
    for(int i = 0; i < list.length; i++)
    element = list;
    #sql { INSERT INTO DIR_LIST (FILENAME)
    VALUES (:element) };
    Java created.
    SQL>
    create or replace
    procedure get_dir_list( p_directory in varchar2 )
    as language java
    name 'DirList.getList( java.lang.String )';
    SQL> exec get_dir_list( 'C:\Bhagat' );
    PL/SQL procedure successfully completed.
    Thanks,
    Bhagat

  • How to use the java developer

    I have recently downloaded the jdeveloper from the oracle site . I want to know how to use it .
    We are using oracle9i as DB in m/c with IP 192.168.2.7
    and oracle 10g in app server with IP 192.168.2.5
    The servers are loaded with Linux Opr system.
    I want to know how to load the jdeveloper from a window m/c
    Thanks in adv ..
    S R Chowdhury

    You unzip the JDeveloper zip file and invoke jdev.exe
    in the jdev/bin directory.
    For more information please check out the tutorials
    on the JDeveloper home page:
    http://otn.oracle.com/jdev
    Thanks for the reply ..
    Sir I have already unzipped the file .
    Then what to do ?
    My email ID is [email protected]

  • How to use the J2EE Deployment API ?

    Hi,
    I want to develop a EJB deploytool using the Deployment API.
    I know I must implement the module interface and develop some programs to
    relate the module interface and spi interface.
    who can give me some detail description or some ebook to help me?
    thanks!
    /Flytsu

    Hi,Kyle
    Thanks for your reply.
    I already read the specification. Now I'm coding for my deployment tool for the Sun AppServer.
    But I found getDConfigBeanRoot() return null from SunDeploymentConfiguration.
    So I can't do the following things.
    Do you know it ? Why the Sun class return null?
    Thank you very much!
    --Flytsu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Sending a Rich Text (RTF) email using the Java Mail API

    Folks
    I've spent about half a day trying to find out how to do this, now I'm not even convinced you can. Here's the problem...
    I currently use JasperReports to generate an HTML report, this I then send as the body of a Multipart email. Because there are two images in the report, these I inline attach, it diaplsy in Outlook perfectly.
    The problem comes with a bug in Outlook (recognised by Microsoft) where after a while the images stop displaying, you just get the little red cross. Having dug around this is because Outlook doesn't always clean the inlined files from the temp directory. When this occurs next time you view an email that has the same image file in it, the file in the temp directory is appended with a number. This happens correctly until 99, then it throws the towel in and just gives you the red cross. Although I could orgainse for the folder to be emptied on network, I can't on client networks. Thsi sadly means that this approach isn't going to work for me.
    My latest idea is to get JasperReports to generate an RTF version instead, then set this as the body of the email. I don't know if this will still require me to inline the images, if it does it's no better, but because I can't find a working example on how to send an RTF bodied email I can't even find out.
    Any help anyone can provide is greatly appreciated.
    Tom

    I'm afraid neither of these are really feasible. The email is sent to many external parties, and guaranteed access to a server is unlikely to happen. I guess I could change the file name, but then I'd have to parse the HTML everytime and change the many reference to the file in there.
    Why is information about sending RTF email so scarce? I assume it possible?
    Tom

  • Trying to figure out how to use the Microsoft Speech API to write speech to a WAV file.

    I have tried and tried to do this. I have downloaded the LabVIEW example for doing speech through the sound card and tried to modify it to write to a stream, but can not hook the correct objects together to get something that will work. Anyone have any ideas?

    Never mind - figured it out. Solution attached.
    Attachments:
    Text to WAV .llb ‏36 KB

  • How to use the COMM API in a JAR file

    I have developed an application, using the NetBeans IDE, to communicate with a modem over the COM1 serial port using the Java Comm API. The application works fine within the IDE, but when a JAR file is created and "double-clicked", the application launches correctly, but when the code is executed to "talk" over the COM1 serial port - nothing happens. No exceptions and no warnings are thrown. My environment is XP, SP1.
    The manifest file is as follows:
    Manifest-Version: 1.0
    Class-Path: ../j2sdk1.4.2/jre/lib/ext/TimerBean.jar ../j2sdk1.4.2/jre/
    lib/ext/AbsoluteLayout.jar ../j2sdk1.4.2/jre/lib/ext/comm.jar
    Created-By: NetBeans IDE
    Specified-By: Projects/TheApp/Files/TheApp.jarContent
    Main-Class: Main
    According to the Comm API installation instructions, the following files are copied:
    copy comm.jar \j2sdk1.4.2\jre\lib\ext
    copy wind32com.dll \j2sdk1.4.2\bin
    copy javax.comm.properties \j2sdk1.4.2\jre\lib
    I suspect it has something to do with the paths.
    Any help would be greatly appreciated. Thanks.

    Thanks for your input, but after trying what you suggested the problem still exists. I think your right to be suspicous of the javax.comm.properties file. The application, that worked in the IDE, exhibits the same behavoir as the JAR file if the javax.comm.properties file is removed from the ../jre/lib directory. In other words it compiles correctly in the IDE, but when executed, nothing happens when the code that "talks" to the serial port is run.
    I've tried moving the javax.comm.properties file into the working directory. Also, the CLASSPATH and PATH system variables were modified to include the path to javax.comm.properties.
    If you have anymore ideas, please let me know.
    Thanks.

  • Newbie question on the Java communications API

    Hi All,
    I found the javax.comm extension package that lets me listen to the serial port of the PC, but am unsure as to how to use it. Well, I've tried running the SimpleRead.java program and I get an error message that says the package is missing in the import (which I assume means that I havent downloaded it and added it to one of the folders in my Java directory). Where can I find the package from? And am I missing anything else?
    In case you're all wondering, I've got a microcontroller attached to the serial port that sends data periodically. I would like to use the Java comm API to read the incoming data (and if possible store it in the form of a text file or something). Any suggestions would be great as I'm still new to Java. More of a C/C++ person (^_^) Thanks in advance.....

    Did you try using that little search field in the upper right hand corner of your browser?

  • Can anyone help me to find the Java Speech API?

    I really need to use the Java Speech API but I don't have any idea where to find it.
    In the Sun page are many implementations of the API but I want to use it and is very important for me.
    Please, can anyone send me the little API...........

    Look at the thread two posts down, that might be what youre looking for. Theres also a thread seven posts down that will help you.

  • How do I create a user, in my context in OID using the Java API

    How do I create a user, with subschema, in my context in OID using the JAVA API
    I need to be able to create new users in my OID, I was doing it in our old iPlant Directory, but I don't seem to see the same methods in the Oracle LDAP API. I figured out how to get and modify the attributes of a user, but I can't seem to figure out how to add a new one.

    Try this code , modify it accordingly
    ------- cut here -------
    import oracle.ldap.util.*;
    import oracle.ldap.util.jndi.*;
    import javax.naming.NamingException;
    import javax.naming.directory.*;
    import java.io.*;
    import java.util.*;
    public class NewUser
    final static String ldapServerName = "yourLdapServer";
    final static String ldapServerPort = "4032";
    final static String rootdn = "cn=orcladmin";
    final static String rootpass = "welcome1";
    public static void main(String argv[]) throws NamingException
    // Create the connection to the ldap server
    InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx(ldapServerName,
    ldapServerPort,
    rootdn,
    rootpass);
    // Create the subscriber object using the default subscriber
    Subscriber mysub = null;
    String [] mystr = null;
    try {
    RootOracleContext roc = new RootOracleContext(ctx);
    mysub = roc.getSubscriber(ctx, Util.IDTYPE_DN, "o=dec", mystr);
    catch (UtilException e) {
    e.printStackTrace();
    // Create ModPropertySet with user information
    ModPropertySet mps = new ModPropertySet();
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"cn", "Steve.Harvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"sn", "Harvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"uid", "SHarvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"givenname", "Steve");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"mail", "[email protected]");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"userpassword", "welcome1");
    // Create the user
    User newUser = null;
    try {
    newUser = mysub.createUser(ctx, mps, true);
    System.out.println("New User DN: " + newUser.getDN(ctx));
    catch (UtilException e) {
    e.printStacktrace();
    ------- end cut --------
    Enjoy.
    Suhail

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • How to use the RequestService API to create request in OIM 11g

    Hi Guys,
    We are trying to build a custom ADF app (Request Forms) to allow users to request access to resources. We want to use the OIM RequestService APIs (oracle.iam.request.api.RequestService).
    We can't seem to find a proper guide to use this service.
    Is there anyone who has done this or know how we can achieve this in OIM 11g?
    Thanks in advance
    Tav

    Try here
    http://java.net/projects/openptk/sources/svn/show/branches/Oracle/OIM11g/examples/java?rev=1313
    Fred

Maybe you are looking for