Using C++ Library in Java

Hi,
How do I use a prewritten C++ API in Java? With C++ I have to use the include files that came with the DLL. I have no access to the code. I'd appreciate reasonably extensible code examples.
Thanks.

You can use JNI(Java Native Interface) to solve this problem.
I give an example below, you can do advanced functions in depth.
First, write a simle class named Test, it contains one method called getSquare which pass a int argument only. Of course It contains the program entry.
public class Test
public static void main(String args[])
//import dll and print returned result
try{
System.loadLibrary("Test.dll"); //we will name the compiled program as "Test.dll"
}catch(Exception e){}
System.out.println(Test.getSquare(5));
public static native int getSquare(int num);
As you can see, It is very easy. You need native method to access functions which wrote in C or C++. The native method like abstract do not have method body, it has signature only, we will write method body in other programming language such as C or C++.
Next step, likes we did normal, compile it(javac Test.java), then we will use JNI compiler tool which in Java bin directory compile the Test class(javah Test), note never specify the suffix ".class" or ".java". After the command executed, you will find Test.h in the same directory. That is, it is the header file of C or C++, it is the code skeleton, next step we will write function body.
You may complain the function's signature is too long to rember, don't worry, it is needless, just copy it to your C file or C++ file, then imply it. here the fountion returns the square of the argument.
JNICALL jint methodSignature(JNIEnv *env,jint arg)
return arg*arg;
Excuse me, I forget the functionsignature too, but there is a rule with it, so replace it in any signature(when you coding, never change the signature, it was created by compiler automatically).
At this step(imply the function), you can do as you like include invoke dlls, execute applications even thougn win32 founctions. Note, there are too many data types(jint, jshort,jstring), functions and structs and pointers defined in JNI environment, you must know the change C or C++ type to java types. If you know much about C or C++ and Java, you can read jni.h file which in Java include directory, it is important to read books or articles about JNI.
compile the code, name it with "Test.dll"
Execute your java class, what did you find?

Similar Messages

  • How to process (populate & merge) XFA PDF Forms using Adobe library in Java

    We have the XFA Forms (.pdf) created in Adobe LiveCycle designer 8.2 ES. We have the following requirement :
    1. We need to populate data in those forms using standalone Java programs.
    2. We need to merge the populated forms and create a single PDF out of these forms, using standalone Java programs.
    Can both of these be done using Adobe PDF Library or Acrobat SDK?
    What is the difference between Adobe PDF Library or Acrobat SDK?
    We already have the licensed version of Adobe Acrobat Professional 9 with LiveCycle Designer 8.2 ES. Where can I get the relevant Adobe Java APIs from?
    Can someone provide some sample code that could be used for the above requirements?
    Please provide your inputs on these. We have been using IText, but facing some limitations in that recently.

    The answer looks quite clear, and the conclusion is essentially simple: Don't use LiveCycle Designer.
    Keep in mind that LiveCycle Designer originated as design tool for the according servers (that's way back in JetForms's days). For reasons I still can follow, Adobe decided to thow this design tool after any Acrobat Pro for Windows buyer. And the forms industry is now suffering from the mess that created.
    Also, keep in mind that the term "Server" is used here as "service providing application".
    Rants aside, was there a specific feature making you chose XFA (aka LiveCycle Designer)? Knowing these reasons can help us finding suitable workarounds.
    HTH.
    Max Wyss.

  • Using visual library in java applet

    Hi,
    I try to develop an web application which is use the java applet. So, I just want to ask, is it possible to use the netbeans visual library in the java applet? If not, which library must be used this kind of appliacation and what is the efficent developmen environment (netbeans, java studio creator ?)
    best regards,
    Ufuk Utku Turuncoglu
    ITU, Informatics Institute
    HPC Lab

    Add org-netbeans-api-visual.jar into your jar/classpath and you should be
    OK assuming your Applet is signed/jar packed, you will have to jump through
    some hoops to get rg-netbeans-api-visual.jar accessible from your main
    jar.
    Namely....
    class YourClass
    void copyResourceFromJarToExtDir(String tResource)
    InputStream dllInputStream = getClass().getClassLoader().getResourceAsStream(tResource);
    fileSeparator = System.getProperty("file.separator").charAt(0);
    String extDir = System.getProperty("java.home")+fileSeparator+"lib"+fileSeparator+"ext";
    File outFile = null;
       try
          BufferedInputStream  binStream  = new BufferedInputStream(dllInputStream);
          outFile = new File(extDir+fileSeparator+tResource);
          BufferedOutputStream boutStream = new BufferedOutputStream(new FileOutputStream(outFile));
          System.out.println("saveing to"+outFile.toString());
          int b = -1;
          while((b = binStream.read()) != -1)
             boutStream.write(b);
          binStream.close();
          binStream.close();
          boutStream.flush();
          boutStream.close();
       catch(Exception e)
           e.printStackTrace();
    }To summarize pack the rg-netbeans-api-visual.jar into your Applets main jar and call copyResourceFromJarToExtDir("rg-netbeans-api-visual.jar");
    In your Applet.init() and you will be able to access the rg-netbeans-api-visual.jar
    directly.
    Good Luck!
    (T)

  • What are the simple to use COM library in your java code

    Hi,
    what are the simple to use COM library in your java code

    PhHein wrote:
    [javax/comm|http://java.sun.com/products/javacomm/reference/api/javax/comm/package-summary.html]
    No, he wants to use Windows COM objects!
    @OP
    It's not easy. You can try j-integra or ezjcom, which I tried years ago and was not too happy, but maybe
    they improved or they are just fine for your needs. $$$ involved!
    If you want to do it by yourself, it won't be easy at all, I promise, but it can be done with JNI or JNA.
    If your interactions are very few and simple, maybe some workarounds could be found.

  • Using External Library in a DC problem (SP16)

    Hi,
    I've been trying to get the example that Valery is outlining in his <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro">Blog</a>.
    I've done it exactly as Valery says, but I can't get it to work. I create the External Library DC, add the jar to Public Part (purpose Assembly) and build. Builds ok.
    I then proceed to creating the J2EE Library. It is created ok. I then add the External Lib I just created to Used DCs. This goes ok. I build the DC. There are warnings:
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    And:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    I've tried nearly every combination of Dependency Types When adding the used DC to J2EE DC. The jar never ends up in the SDA file in gen\default\deploy or jar in gen\default\public. I only get different types of warnings.
    Here is the whole build.log:
    Apr 7, 2006 8:48:00 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: js/lib: built with warnings orion.com/js/lib(MyComponents) in variant "default" (0.753 sec) :
    Build log -
    Development Component Build (2006-04-07 08:48:00)
      Component name: js/lib
      Component vendor: orion.com
      SC compartment: MyComponents
      Configuration: LocalDevelopment
      Location: local
      Source code location: jarpak@UFIES-JARPAK
      DC root folder: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\
      DC type: J2EE Server Component
      DC subtype: Library
      Host: UFIES-JARPAK
    DC Model check:
              [dcmake] All used DCs are available locally
              [dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/addLib"
              [dcmake] validating dependency to  public part "Tokenizer" of DC "orion.com/js/jars"
              [dcmake] DC model check OK
    Start build plugin:
              [dcmake] using build plugin: sap.com/tc/bi/bp/addLib
              [dcmake] starting build plugin from : C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\
    Build Plugin 'J2EE Library', Version 6.40 SP 16 (630_VAL_REL, built on 2006-02-13 00:17:07 CET)
       development component:  js/lib (orion.com)
          software component:  MyComponents (demo.sap.com)
                    location:  local
                        type:  J2EE Server Component, subtype Library
               build variant:  default
             source location:  jarpak@UFIES-JARPAK
           plugin start time:  2006-04-07 08:48:00 GMT+02:00 (EEST)
                     Java VM:  Java HotSpot(TM) Client VM, 1.4.2_03-b02 (Sun Microsystems Inc.)
    General options:
      convert *.xlf to *.properties: yes
      include sources for debugging: yes
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    Preparing data context..
    No 'default' JDK defined, will use running VM.
    Data context prepared in 0 seconds
    Executing macro file..
      Using macro file:     C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\macros\build.vm
      Creating output file: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
    Macro file executed in 0.482 seconds
    Starting Ant..
      Using build file:     C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
      Using build target:   build
      Generation folder:    C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426
      Using Ant version:    1.5.4
    prepare:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\int-pp
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sda
    compile:
    createPublicParts:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    packDeployArchive:
    [srcpacker] Creating source archive
    [srcpacker] No sources available for packing, no archive will be created.
         [timer] Source archive creation finished in 0.02 seconds
        [jarsap] Info: JarSAP version 20041217.1600
        [jarsap] Info: JarSAPProcessing version 20060104.1634 / JarSL version 20060106.1831
        [jarsap] Property jarsap.info.dir is not set.
        [jarsap] Building: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy\orion.comjslib.sda with compression
         [timer] JarSAP finished in 0.03 seconds
    build:
    Ant runtime 0.161 seconds
    Ant build finished with WARNINGS
    Build plugin finished at 2006-04-07 08:48:00 GMT+02:00 (EEST)
    Total build plugin runtime: 0.693 seconds
    Build finished with WARNING
    What am I doing wrong ?
    Kind Regards,
    Jari Pakarinen

    Hi,
    There is an issue with SP16 in using External library DC.
    Go through this Jars not included in J2EE Library DC SDA. This thread deals with the same issue.
    Hope this helps.
    Regards,
    Rathna.

  • Using the Data Engine Java API

    I try to use the Data Engine Java API to generate an XML document from database data.
    So as mentioned in the documentation Business Intelligence Publisher User's Guide Release 10.1.3.2 (page 4-26 to 4-27)
    a) I created a java class (using Jdev Version 11.1.1.0.0)
    package oracle.apps.XMLPublisher.client;
    import com.sun.java.util.collections.Hashtable;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import oracle.apps.xdo.XDOException;
    import oracle.apps.xdo.dataengine.DataProcessor;
    public class XMLFileGenerator {
    public XMLFileGenerator() {
    public static void dataEngine() throws ClassNotFoundException, Exception {
    XMLFileGenerator xMLFileGenerator = new XMLFileGenerator();
    try {
    //Initialization instantiate the DataProcessor class//
    DataProcessor dataProcessor;
    dataProcessor = new DataProcessor();
    //Set Data Template to be executed
    dataProcessor.setDataTemplate("PERFRBS.xml");
    Hashtable parameters;
    parameters = new Hashtable();
    parameters.put("P_LEGAL_ENTITY_ID", "3259");
    parameters.put("P_TRU_ID", "3262");
    parameters.put("P_YEAR", "2009");
    dataProcessor.setParameters(parameters);
    // Now set the jdbc connection to the database that you
    // wish to execute the template against.
    // This sample assumes you have already created
    // the connection object 'jdbcConnection'
    Class.forName("oracle.jdbc.OracleDriver");
    String url =
    "jdbc:oracle:thin:@ap6005sdb.us.oracle.com:1526:hremeadv";
    Connection jdbcConnection;
    jdbcConnection= DriverManager.getConnection(url, "apps", "*****");
    dataProcessor.setConnection(jdbcConnection);
    System.out.println("Here1");
    // Specify the output directory and file for the data file
    dataProcessor.setOutput("BilanSocial.xml");
    System.out.println("Here2");
    dataProcessor.processData();
    System.out.println("Here3");
    } catch (SQLException e) {
    System.out.println("SQLException " + e.getMessage());
    } catch (XDOException e) {
    System.out.println("XDOException" + e.getMessage());
    public static void main(String[] argv) throws ClassNotFoundException,
    Exception {
    XMLFileGenerator xmlPublisher = new XMLFileGenerator();
    XMLFileGenerator.dataEngine();
    b) to generate my xml file based on the following data template
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <dataTemplate name="PERFRBS" defaultPackage="" version="1.0">
    <parameters>
    <parameter name="P_LEGAL_ENTITY_ID" dataType = "number"></parameter>
    <parameter name="P_TRU_ID" dataType = "number"></parameter>
    <parameter name="P_YEAR" dataType = "number"></parameter>
    </parameters>
    <lexicals>
    </lexicals>
    <dataQuery>
    <sqlStatement name="Q_INDICATORS">
    <![CDATA[ SELECT pai.action_information3   YEAR,
                    pai.action_information17  INDICATOR_VALUE
              FROM   pay_action_information pai 
             WHERE  pai.action_information_category     = 'HR_FR_BS'
                AND    pai.action_context_type             = 'PA'
                AND    pai.action_information1             = :P_LEGAL_ENTITY_ID
                AND    pai.action_information2             = :P_TRU_ID
                AND    pai.action_information3            = :P_YEAR       
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_YEARS" dataType="varchar2" source="Q_INDICATORS">
    <element name="YEAR" dataType="varchar2" value="YEAR"/>
    <element name="INDICATOR_VALUE" dataType="number" value="INDICATOR_VALUE"/>
    </group>
    </dataStructure>
    </dataTemplate>
    ---> But when I run it , it fails when calling the data processor with the following error
    D:\Jdeveloper11g\jdk\bin\javaw.exe -client -classpath "D:\Jdeveloper11g\jdevhome\XMLPublisher\src\Client\classes;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\versioninfo.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\xdocore.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\collections.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\xmlparserv2-904.jar;D:\BI publisher\XMLP562_WIN\XMLP562_WIN\manual\lib\i18nAPI_v3.jar;D:\Jdeveloper11g\jdbc\lib\ojdbc14dms.jar;D:\Jdeveloper11g\jlib\orai18n.jar;D:\Jdeveloper11g\diagnostics\lib\ojdl.jar;D:\Jdeveloper11g\jlib\dms.jar" -Dhttp.proxyHost=emeacache.uk.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts= -Dhttps.proxyHost=emeacache.uk.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts= oracle.apps.XMLPublisher.client.XMLFileGenerator
    Here1
    Here2
    Exception in thread "main" java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleStatement from class oracle.apps.xdo.dataengine.DBConnection
         at oracle.apps.xdo.dataengine.DBConnection.setRowPrefetchSize(DBConnection.java:42)
         at oracle.apps.xdo.dataengine.XMLPGEN.setRowPrefetchSize(XMLPGEN.java:1224)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:420)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:281)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:251)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:192)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:222)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:334)
         at oracle.apps.XMLPublisher.client.XMLFileGenerator.dataEngine(XMLFileGenerator.java:50)
         at oracle.apps.XMLPublisher.client.XMLFileGenerator.main(XMLFileGenerator.java:62)
    Process exited with exit code 1.
    Thanks by advance for your help

    Make sure you have the Oracle JDBC library setup in project parties and it's setup to export. The api's are fine. Have you looked at the BIPublisherIDE I wrote. All this code is already written for you. There is a manual on the site as well
    http://bipublisher.blogspot.com/2008/03/bi-publisher-bipublisheride.html
    Ike Wiggins
    http://bipublisher.blogspot.com

  • Using JDBC in multithreaded Java application?

    Hello everyone
    Is it supported to use JDBC in multiple concurrent threads of a single Java application?
    I intend to use Java 7 (or even Java 8?) from standard Java multi-threaded library to access the following: Oracle 11g/12c and Microsoft SQL Server 2012-2014 and also PostgreSQL 9.4+.
    The Java dababase client application will run on Linux and on Windows (64-bit).
    If its supported to use JDBC in multi-threaded way - will it scale up well or am I better off using mutiple single-threaded Java applications instead?
    Are there any rules to follow when using JDBC from multiple-concurrent threads (such as: do not share any JDBC objects among threads, etc).
    Thank you
    Yuri Budilov

    Is it supported to use JDBC in multiple concurrent threads of a single Java application?
    Of course.
    I intend to use Java 7 (or even Java 8?) from standard Java multi-threaded library to access the following: Oracle 11g/12c and Microsoft SQL Server 2012-2014 and also PostgreSQL 9.4+.
    You should use a separate connection pool for each database.
    See the JDBC Dev Guide and use the latest Oracle driver and the latest connection methods shown in that doc
    http://docs.oracle.com/cd/E11882_01/java.112/e16548/toc.htm

  • Explain the annotation used in a ______ListMaintenance.java

    HI,
    Can anyone explain me the annotation used in a ______ListMaintenance.java(CurrencyListMaintenance.java) what does each attributes map in CCB and DB.
    Like the one marked in bold
    @EntityListPageMaintenance
    ( service* = CILTCURP, modules={foundation}, entity = currency, program* = CIPTCURP,
    body = @DataElement (contents = { @FieldGroup ( *_name_* = SRCH-CRITERIA,
    contents = { @DataField (name = CURRENCY_CD)})
    , @ListField (name = CURRENCY_CD)}),
    lists = { @List (name = CURRENCY_CD, size = 50, program = CIPTCURL, *_constantName_* = CI-CONST-CT-MAX-COMM-LIST-COLL,
    baseCobolGroupName* = TCURL,
    body = @DataElement (contents = { @RowField (includeRCopybook = false, entity = currency, baseCobolGroupName = TCURT)}),
    headerFields* = { "CURRENCY_CD"
    , "LAST_CURRENCY_CD"})})
    -- I want to write a ListMaintenance.java what are the mandatory attributes in the annotation.
    -- Steps required to write a ListMaintenance.java
    -- Where can we find the document for annotation?

    The problem is that ther eare no definite tests for character encoding. A particular byte stream can be valid in any number of different encodings (even if the resulting characters are not correct). If the characters don't happen to include any above unicode 127 then a UTF-8 stream is identical to the same characters in any number of different encodings.
    It's not just a matter of there being no code for it in the library, it's impossible to do with any certainty, and to do it even probabalistically you'd have to run the results through a multi-lingual spelling checker.
    If you just ask java.io to open a Reader without specifying an encoding it will assume the default encoding of your system.

  • How to run a library in Java Card

    Hi guys
    I have a question related to the running in emulator. Well, I now have 2 separated projects, one is class library and the other is java card applet. Both of them are constructed by Netbeans
    When I build the classic library, it is fine. I have class file, cap file and export file of this package. This is the source code of my class library
    package lib4;
    public class lib4 {
        public short func1(){
            return (short)0x1234;
    }And then, I use this library for the java card applet which is developed onto another project in Netbeans as well. This applet invokes func1 in class lib4. This is the source code of the applet
    package app1;
    import javacard.framework.*;
    import lib4.*;
    public class app1 extends Applet {
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new app1();
        protected app1() {
            register();
        public void process(APDU apdu) {
            //Insert your code here
            short t;
            lib4 d= new lib4();
            t = d.func1();
            ISOException.throwIt((short)t);
    }However, when I build this applet by Netbeans, the error is "error: export file lib4.exp of package lib4 not found.". I think that's fine if I build them by ANT TASK. Nervertheless, for the sake of emulating, I want to build them onto Netbeans.
    This is the whole result of the build
    init-platform-properties:
    Using JavaCard Platform Definition at C:\Documents and Settings\chandufo\.netbeans\6.9\config\Services\Platforms\org-netbeans-api-java-Platform\javacard_default.jcplatform
    Java Card Home is C:\Program Files\NetBeans 6.9\javacard\JCDK3.0.2_ConnectedEdition (Java Card Platform)
    init-ri-properties:
    init-device-properties:
    Platform device property name is jcplatform.javacard_default.devicespath
    Computed device folder path is C:\Documents and Settings\chandufo\.netbeans\6.9\config\org-netbeans-modules-javacard\servers\javacard_default
    Platform device file path property name is C:\Documents and Settings\chandufo\.netbeans\6.9\config\org-netbeans-modules-javacard\servers\javacard_default\Default Device.jcard
    Deploying to device Default Device http port 8019
    init-keystore:
    Keystore is C:\Program Files\NetBeans 6.9\javacard\JCDK3.0.2_ConnectedEdition/samples/keystore/a.keystore
    build-dependencies:
    unpack-dependencies:
    compile:
    Compiling 1 source file to D:\netbean\app1\build\APPLET-INF\classes
    compile-proxies:
    create-descriptors:
    create-static-pages:
    do-pack:
    Resolved dist.bundle as relative file D:\netbean\app1\dist\app1.cap
    Resolved build.dir as relative file D:\netbean\app1\build
    Packager [v3.0.2]
        Copyright (c) 2009 Sun Microsystems, Inc.
        All rights reserved.
        Use is subject to license terms.
    [ INFO: ] Validating Command Line
    [ INFO: ] Setting packaging information
    [ INFO: ] Package is being created
    [ INFO: ] Converter [v3.0.2]
    [ INFO: ]     Copyright (c) 2009 Sun Microsystems, Inc.
        All rights reserved.
        Use is subject to license terms.
    [ INFO: ] conversion completed with 1 errors and 0 warnings.
    error: export file lib4.exp of package lib4 not found.
    D:\netbean\app1\nbproject\build-impl.xml:205: Creation of D:\netbean\app1\dist\app1.cap was not successful. See Packager output
    BUILD FAILED (total time: 1 second)-->> What can I do now?
    Any kinds of help will be appreaciated.

    First things first.
    Do you know how to compile a simple hello word program, get it to compile, and run it in jbuilder? Do you know how to do other basic programming tasks (ignoring iADF for now) in the IDE? If not, you need to concentrate on how to use jbuilder before messing with Oracle ADF (Oracle Application Development Framework). Alternately, if you are very familiar with another IDE such as Eclipse, you can look at ADF plugins for it instead (if they exist). If you are not familiar with Java, its supporing technologies, and an IDE very well, I suggest you drop ADF and work on simpler architectures because ADF is way, way too advanced for you at this time. Instead, spend your time reading books on Java, etc from cover to cover and working through a number of their examples instead.
    Assuming you are an experienced programmer and plan to go ahead with ADF, I suggest you go to amazon.com and order a book on ADF that has good reviews. Read it from cover to cover and work through a number of the book's examples. You should start out with a very very simple ADF project before attempting something more complicated, then build on it. If you are not familiar with some of the components of ADF such as JSF, I suggest you create a few simple projects using them in isolation before combining them all under ADF.

  • Using External Library in Mobile Web Dynpro Offline

    Hi all,
    i would like to use a jar in a Mobile Application for Handheld and i followed the steps from the wiki "Using External Library in Mobile Web Dynpro Offline" at
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/usingExternalLibraryinMobileWebDynpro+Offline
    >How to use External Library in Mobile Web Dynpro Offline
    >For using external jar in local deployment scenario, one can do following:
    >1. In the dc where jar has to be used, add the jar as external jar classpath entry. It can be done via <dc> > (Right-click)> properties->Java Build Path->Select "add external jar".
    >2. Do the programming using the jar.
    >3. Shut down the mobile client.
    >4. Copy the jar in the "lib" folder of mobile client installation.
    >5. Deploy the application in the IDE.
    >6. Run the application.
    >In 5, the jar will not deployed and will be picked from the lib folder during 6.
    >...
    >Note: This will work on and after SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 (and after).
    i get a error at the deployment with the message "...package myres does not exist...":
        >echo:     C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_oca
          >echo:   class path:  C:Program FilesSAPIDECEeclipsepluginscom.sap.tc.ap_2.0.1.080222142948compXOCADCssap.com     cmobileocaapi\_compgendefaultpublicapilibjavasap.comtcmobileocaapi~api.jar
          >echo:   output dir:  C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5classes
         >javac: Compiling 16 source files to C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5classes
         >javac: ERROR: C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_ocacomsapdemoemployee_scserviceimplEmployeeService.java:8: package myres does not exist
         >javac: ERROR: import myres.TestA;
    there is only sap.comtcmobileocaapi~api.jar in the class path and myres.jar was not added.
    how can i fix my problem or does the steps in the wiki not work yet for SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 ?
    Thanks,
    Ismet

    Hi,
    1) in Development Infrastructure Perspective -> rightklick in Navigator/Projekt Explorer  -> new Project  -> (Development Infrastructure)  Development Component (DC).
    NWDS generates Project Ressources e.g. the folder "libraries"
    2) copy the jars to the "libraries" folder.
    3) rightklick on the newly created Development Component (DC) ->  Development Component -> Show In ->  Development Properties -> go to the Tab "Public Parts",
    in -> "Defined Public Parts" -> klick on Button "Add" -> give a name for "Public Part" -> at "Purpose" select "Compilation" -> Finish.
    rightklick on the newly created Public Parts -> select  "Manage Entities" and select the jars you want to use -> Next -> Finish.
    4) switch to the Mobile Apps for Handhelds Perspective ->  in Development Component  select e.g. the Service Component or the UI Component ->
    rightklick ->  Development Component -> Show In ->  Development Properties -> got to Tab "Dependencies" -> klick on Button "Add"  -> under the Node MyComponents -> select the newly created Development Component with the Public Parts/jars (that was created in 1 - 3).
    thats all, now you can deploy your application
    Regards,
    Ismet

  • How to add jar library in java?

    Hi,
    I am Anil,
    Could it possible to add library in Java library?
    like java.io.DataInputStream is library in Java (JDK), so I want to add my own library in Java JDK.
    I have created a package net.jini.j2space and one interface in it J2Space, I have created jar of this.
    and now I want to this jar to Java library so I can import it in my projects.
    Please help me.
    Thanks in advance.

    Hi, I am Zander Smith and I want to share my story with you. I am a sport star in my community, I am known for my football skills. I had a very healthy physique because I used to do almost 4 hours of daily workout. One day it was raining heavily and I was busy playing football with a nearly club who challenged our team. While playing I hit my leg on the goal post and broke my leg. I came out of hospital after three months. Since I was on complete bed rest I gained 35 pound. I had lost my athletic shape. I was very upset with my bulky body and I wanted to have my old shape back at any cost.
    I started to work out. As I was restricted by doctor to do rigorous work out, it did not help me the way I wanted. After a month one of my friends suggested me [Acai berry|http://ezinearticles.com/?Acai-Berry---How-I-Lost-30-Pounds-in-Under-30-Days-Using-The-Acai-Berry&id=1998407] . I thought that my workouts are enough for losing my weight, but I was impatient. I took all the information about this product and I found it useful. I purchased Acai Berry Supplement and used it. Now it is like a dream come true, I have come back to my earlier shape. Thanks to Acai Berry now I am living my life as I lived before. [Acai berry|http://www.goarticles.com/cgi-bin/showa.cgi?C=1829429]

  • ANN: G - 2D Graphics Library for Java, v1.0

    G - 2D Graphics Library for Java
    Version 1.0, December 13, 2004:
    http://geosoft.no/graphics/index.html
    Features:
    * Object oriented hierarchical scene graphs
    * Layered graphics with visibility support
    * Flexible 3D space world extents
    * World and device coordinate support
    * Powerful rendering style support
    * Smart annotations
    * Powerful object detection functions
    * Extensible
    * Interaction support
    * Raster image support
    * Embedded Swing component support
    * Utilities for geometry generation and transformations
    * Image export and printing support
    * JDK 1.2, 1.3, 1.4 and 1.5 compatible
    * Light weight (~80kB), self contained, simple to use
    * Free, open source (LGPL), OSI certified
    Jacob Dreyer
    G Project Manager
    GeoSoft

    I see no question - so I can't answer you ... do i
    get the dukes now?:-)
    Download the library, create something great and beautiful,
    report your experiences back to me, and we'll see...

  • Using Dynamic Library

    Hi friends,
    As a newbie , one more question solution am hunting.
    can we make dynamic shared library for java .
    If java support dynamic library(i hope it must be) then can you people provide me just how(any link to be read or tutorial) we make and compile and use these library

    I need my java program working like that..
    when i see that i need to do remote query from USA database than i will invoke USA vendor jar file and load a class within that jar file that provide methode to query USA database.
    Same i want to do for UK vendor jar file, or Indian vendor jar file. which jar file i need to invoke it should be decided runtime by looking some trigger like some specific message type.
    When i was looking jar files tutorials .. they all say how to make jar file,run jar files from command line and benefities like digitally signatured .. and many others ... But i don't want to run jar files by giving command line options. i need to invoke these within java class file by looking some specific event and then want to use one of methode provided by jar's java file.
    There was one more thing i came to know about JCL. So i need you people help me to point out how exactly i can do this.

  • JSON Library for Java

    Hi folks,
    I have found few JSON libraries for Java such as Google and json.org. Would anyone recommend a good one for me, thanks!

    I have been using that library (org.json) for about 3 months. It is simple and I haven't found any bugs.
    There isn't much to JSON so I wouldn't expect one library to much different than another.

  • Problem while using cewolf library with jsf jboss.

    Hi Guys,
    I am trying to use cewolf library to generate graphs in my web application based on jsf. But I am getting the following exception.
    I have pointed down that cewolf. jar file is causing the problem.
    javax.servlet.ServletException: #{LoginBean.validateUser}: javax.faces.el.EvaluationException: javax.ejb.NoSuchObjectLocalException: Object Not Found ; CausedByException is:
         Receive timed out
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    root cause
    javax.faces.FacesException: #{LoginBean.validateUser}: javax.faces.el.EvaluationException: javax.ejb.NoSuchObjectLocalException: Object Not Found ; CausedByException is:
         Receive timed out
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
         javax.faces.component.UICommand.broadcast(UICommand.java:312)
         javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    And this login pages does not at all uses the cewolf library.

    Hello, Reena
    Your process flow seems to be correct in term of getting/freeing memory.
    Following error
    The problem occurs after executing the procedure for 5000 records and I get the error
    ORA-04031: unable to allocate 4176 bytes of shared memory ("shared pool","unknown object","sga
    heap","library cache")may be caused by memory leaks in xdk or memory fragmentation(due to get/free memory cycle)
    To find out if this is an memory leak issue you could try to monitor V$SGASTAT from one session while running your batch process in another session.
    To prevent (or lower its impact) fragmentation issues try to PIN objects, and adjust java_pool_size and shared_pool_reserved_size.
    Anyway, counsult your Oracle DBA.
    Oracle version 8.1.7.0.0I think, you should apply database patch first of all. The latest one (8.1.7.4.x) could be accured from Metalink.

Maybe you are looking for

  • CRM Activity Report

    I need a report in BC to show all the contacts in the CRM with name, contact information, company name and a list of their activity (opened email, clicked on link, etc). There is a list of the Activity in the Activity tab under each contact but I am

  • Mdbt result

    Hi, how to see the result of mdbt planning in single screen instead of md04 for individual materials. i want to see list of planned orders and list of pr's. pls advise any t-codes available.

  • Defining SLD Target Systems for DEV, QAS & PRD

    In a 3 tier XI landscape (DEV, QAS, PRD) which of the following two scenarios is best? 1. In the SLD define each DEV Business System with a target of the corresponding QAS Business System and define each QAS Business System with a target of the corre

  • Why does DNG converter turn 11 MB files to 40 MB files?

    My DNG converter 6.3 makes DNG files of about 40-41 MB out of the 11-12 MB RW2 raw files from my Panasonic Lumix GF1. Why? It does not increase the size of the raw files from my Canon G11, rather the opposite. How can I cure this problem? Please help

  • ColorSync profiles and image size

    For some reasons, why I apply a colorsync profile to an image and save the image, the file size goes down by about 50%. Does anyone know why this happens or how this can be avoided? Could it have something to do with the fact that when you save an im