How can i have a refrence of a java class object instance in my c++ project

Hi!
How can i have a refrence of a java class object instance in my c++ project. Is there a way?

hahaxia wrote:
The second question is the big one. The first question is half of the problem of "c++ to java" invocation and access. But the other half which is "java to c++ " invocation and access is still not solved. jni only provide the "java to c++ " DLL invocation Wrong,
Using JNI your java classes can have methods implemented in C/C++.
Using JNI you can call java classes.
There is no other possible interaction between C++ and java, so it does it all.

Similar Messages

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • How can I get past prob using MQ Java classes on HPUX (CCSID 1051 not sup)

    I am working with MQSeries (Java classes for MQSeries MA-88) in an HP-UX environment.. I am not able to get from a queue using Java because apparently Java does not support code page 1051. Is there a way to get around this? I don't have the option of changing the default CCSID of the queue manager. I have heard something about being able to map CCSIDs using an HP-UX system call thru JNI but no details.. Any info would be appreciated.. What I am getting back from Java is "unsupported character set 1051" this is the default for HP-UX

    Hi All,
    I am facing the same problem.
    Has some one found a solution or work around for this problem.
    Please reply ASAP.
    TIA
    Anup B Darvatkar
    ([email protected])

  • Help! How to read a .txt file into a Java class and make 2D array?

    Hi guys,
    Im a newbie with arrays, just started really using them.. please bear with me if I don't seem to understand much..
    I have a .txt file that contains either a square or rectangle (random width and length).. How can I read each line into a Java class into a 2D array with rows and columns?

    Example :
    import javax.swing.*;
    import java.util.ArrayList;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.File;
    public class ReadInto2DArrayExample {
        public static void main(String[] args) {
            ArrayList array = new ArrayList();
            char [][] twoDimesionArray = null;
            try
                JFileChooser fileChooser = new JFileChooser();
                if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
                    File file = fileChooser.getSelectedFile();
                    BufferedReader reader = new BufferedReader(new FileReader(file));
                    String data;
                    //Read from file
                    while ((data = reader.readLine()) != null)
                        //Convert data to char array and add into array
                        array.add(data.toCharArray());
                    reader.close();
                    //Creating a 2D char array base on the array size
                    twoDimesionArray = new char [array.size()][];
                    //Convert array from ArrayList to 2D array
                    for (int i = 0; i < array.size(); i++)
                        twoDimesionArray[i] = (char [])array.get(i);
                    //Test the 2D Array
                    for (int y = 0; y < twoDimesionArray.length; y++)
                        char [] temp = twoDimesionArray[y];
                        for (int x = 0; x < temp.length; x ++ )
                            System.out.print(temp[x]);
                        System.out.println("");
            catch (Exception ex)
                ex.printStackTrace();
    }

  • How can I have multiple users on iTunes (in order to connect to a shared office iPad)?

    How can I have multiple users on iTunes (in order to connect to a shared office iPad)? Currently each of us has our own iTunes account, so I've made an "all office" Apple ID. However, I can't seem to get two different accounts (my personal and the office) to work on my machine. Even when I login as "the office", my personal library is still showing. Additionally, when I try to setup with a first-time use in iTunes, I get an error that I don't meet the minimum age requirement - no matter what birthdate I enter!

    The library exists regardless of which user is logged in.
    The only way around that is to create different user accounts on the computer.
    There is no way to have 20 unique iTunes users access a shared iTunes under a single login on the computer.

  • I have OSX Maverick on an iMac using Outlook e-mail.  PDF attachments are included in the e-mail  as the whole document rather than just the PDF icon.  How can i have just the PDF icon as an attachment?

    In Outlook my PDF attachments appear as whole documents and not just the PDF icon.  How can I have attachments included as PDF icons and not the documents?

    For your own viewing, you can of course control-click on the attachment and select "View as Icon".
    For others' viewing, it depends upon their email reader.  To ensure that attachments are not displayed expicitly you can put them all in a zip file (via control click and "Compress") then attaching them, or you can use third party stuff like Attachment Tamer.
    charlie

  • On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom new document in order to open one. How can i have directly a new document when i click on pages icon

    On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom < new document> in order to open one. How can i have directly a new document when i click on pages icon

    How to open an existing Pages document?
    Click Pages icon in the Dock to launch Pages.
    When Pages is open, click File menu in the  Pages menu bar.
    Select “Open”.
    When the select document  dialog box opens up, highlight/select the document and click “Open”
    at the bottom right corner of the dialog box.
    s
    https://support.apple.com/kb/PH15304?locale=en_US

  • How can I have two itunes accounts on one computer?

    How can I have two itunes accounts on one computer?

    Not sure what you mean.
    An account is a user name and password.
    Sign into whichever account you want to use for purchasing.
    Authorize the computer for both account to listen to the content.

  • How can I have two different windows up on one screen at the same time?

    How can I have to different windows open on my screen at one time? Kind of like a split or shared screen.

    If you want this split screen thingy for a single app, do like captfred suggests or see if the app itself supports some sort of splitting, like MS Excel.
    If you want to do this system-wide, maybe you can get what you want by activating and using Spaces: http://support.apple.com/kb/PH4313

  • How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    When talking about a specific image posting the image may be useful.
    One can use a Layer Mask and add a white Layer underneath.

  • How can we have two different Itunes libraries on one computer?

    How can we have two Itunes accounts on one computer?  I found info on the itunes help page but I do not know how to follow the steps given because I am not prompted with what it says I should be prompted with? Please help I don't want to delete one of our libraries

    Launch iTunes with the Shift key held down as needed, or use different Windows XP user accounts.
    (74282)

  • How can I have multiple users on one apple id?

    How can I have multiple users on one apple ID?
    ie: I have my apple ID with my own credit, how can I set up credit for my son under the same apple ID, so that he can still access the same apps I've already downloaded and paid for?

    I've been trying to figure out a clean way to do this too. I think you may need more than one Apple ID – one that is shared and used to purchase "sharable" items and then "individual" Apple IDs for you and your son. That's the idea that I'm pursuing for the moment.
    It seems that there must be a way to do this, App Store purchases for the Mac are licensed across multiple machines. iPhone app purchases have "all your devices" licensing. Makes me think that Apple has a process in mind for sharing an account (or associating a device with multiple accounts).
    Other things I've learned:
    - Apparently you can't merge Apple ID accounts. I asked about this once at an Apple Store and was told that there was no way to do it.
    - If you share an Apple ID the Messages app behaves in a somewhat surprising manner. It must use your Apple ID to decide where messages should be sent because all users get all messages. This can make it very hard to organize a surprise party :-)

  • How can I have one "family" Apple ID and two icloud accounts one for me and one for the wife?

    MacVirgin!Just got new Air and iMac (iphones on the way). How can I have one Apple ID but two iCloud accounts (one for me and one for my wife)? I have set up one iCloud account and am attempting to share contacts between iMac, iCloud and Air, however iMac and iCloud are not in sync? I must be missing something very simple.

    ok. I set up the imac and Air with one user account. this was used to activae iCloud on both machines and I have now se up one iCloud account and managed to share calander and contacts between the two. Ultimately both me and my wife will have an iphone and we wish to share calenders and contacts. We both also use the imac and air on one user account. It looks like I need to set another user account then activate iCloud in my wifes Apple ID

  • How can I have 2 devices on one iTunes?

    How can i have 2 devices on one iTunes so that they share the same music but have different apps? Is there a way to do that?

    Each can sync with the same playlists, or different ones, and can have different apps...
    Uncheck the Automatically sync new apps box on the Apps tab after connecting each device and before syncing. Once this box has been unchecked each device should remember the setting and only sync the apps that have already been selected for it, plus any you then decide to manually add to the list or purchase on each respective device.
    tt2

  • Can 2 different users with 2 different Iphones use the same itunes to backup each phone separately? if not how can I have a backup for 2 different iphones on the same laptop?

    can 2 different users with 2 different Iphones use the same itune program to backup each phone separately? if not how can I have a backup for 2 different iphones on the same laptop?

    Here is your answer:
    http://support.apple.com/kb/HT1495

Maybe you are looking for

  • How do you transfer tv shows (or movies) purchased on AppleTV 2 to iTunes

    I recently purchased an entire TV Season via my Apple TV 2.  While I could download it to my iPad or iPhone or stream it on my Apple TV 2, I could not download it through iTunes.  Since I also have an original Apple TV, it would be nice to be able to

  • Generation error during WebDynpro migration from 7.0 to 7.31

    Hello everybody! We are trying to migrate some WebDynpro DCs to NW 7.31. After checking in the old sca file into the new track, synching the DCs in NWDS and creating projects for them, most of the DCs compile ok, but we get a build error in one WebDy

  • BI publisher returning data very slowly

    Hi BI gurus, I have quite afew reports in BI publisher that pulled a huge volume of data ( transactional data from OLTP systems). My clients want these data in excel format. Now the problem I am facing right now is that, when the report query is ran,

  • Java - unix file to windows file

    I have a java program which saves a file to disk in linux which is then attached and emailed. The file is saved and opened in windows, so I want the file to be saved as a windows file. I have tried replacing the LineFeeds(LF) with CRLF with the comma

  • To know the exact timing

    hi all, 1)How can i know that in a oracle 10g table when i modified a row or deleted a row and which row i have inserted when i want to know the particular time. can it is possiable if possiable then tell me how. 2)what is the difference between rais