Flex call C ? (like java native interface)

If I have some C program......
Can I change these user interface with FLEX?
how to?   can give some document of example??  
thanks!!

Supposedly Merapi maes it possible to connect AIR apps to native applications,
but in Flex apps I don't think this is possible because of the sandbox.
http://merapiproject.net/
If this post answers your question or helps, please mark it as such.
Greg Lafrance
www.ChikaraDev.com
Flex Development and Support Services

Similar Messages

  • HELP : "LINUX BASH COMMANDS" Java Native Interface

    how can i create a program using Java Native Interface that could run or recognize LINUX BASH COMMANDS

    Runtime.getRuntime().exec(<command>); But read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Java Native Interface Exception Access Violation

    Ok i have two programs One that works and one that dosn't
    the one that works is a javaMethod that calls a C method. the C method then uses a callsback on a java method that returns an array of integers. that works fine
    the Second program uses the same c side code and the same Java Methods from the original are implemented into a program i have that runs a Jframe. anyways when i run this program the Native side does all of its tasks but when its done it crashes Evrything
    here is the Native Code
    #include <jni.h>
    #include "MyNativeInterface.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_MyNativeInterface_sayHello(JNIEnv *env, jobject obj)
    printf("Hello world!\n");
    return;
    JNIEXPORT void JNICALL
    Java_MyNativeInterface_nativeMethod(JNIEnv *env, jobject obj)
    jintArray arr;
         jint len;
         int *carr;
         int i;
    jclass cls = (*env)->GetObjectClass(env, obj);
    jmethodID mid =
    (*env)->GetMethodID(env, cls, "callback", "()[I");
    if (mid == NULL) {
    return; /* method not found */
    printf("In C\n");
    arr = (*env)->CallObjectMethod(env, obj, mid);
         len = (*env)->GetArrayLength(env,arr);
         printf("Array Length = %d\n",len);
         carr = (int*)malloc(len);
         (*env)->GetIntArrayRegion(env,arr,0,len,(jint*)carr);
         for (i=0;i<len;i++)
    printf("Array position %d is %d \n",i,carr);
    and here is the java class that deals with the native side
    import java.util.*;
    public class MyNativeInterface extends Object {
    private TextAreaDemo gui ;
    public MyNativeInterface (TextAreaDemo guiRecieved)
    gui = guiRecieved;
    static {
    System.loadLibrary("hello");
    public boolean sendLocoMessage ( byte [] bytesToSend )
    try {
    System.out.println("number Of Tokens ="+bytesToSend [0]);
    } catch (Exception e) {
    System.out.println("didn't even get inside2 ok ");
    return true;
    public void receiveLocoMessage ( byte [] bytesToSend ){
    gui.AddMessage ("WOOOOO HOOOOOO");
    public native static void sayHello ();
    public native void nativeMethod();
    private int [] callback() {
    int cools [] = new int [32] ;
    int i = 0 ;
    for (i=0;i<32;i++)
    cools [i] = i;
    //System.out.println("In Java");
    return cools;
    the Say Hello Method works just fine
    and the array for the C side prints out just fine
    then evrything crashes with the following message
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D3276E4
    Function=ZIP_Open+0x107
    Library=c:\j2sdk1.4.0_01\jre\bin\zip.dll
    and a whole BUNCH of current java thread stuff and a list of dynamic libraries.
    anyways thanks

    Your C code asks for the length of the array, then
    allocates that many BYTES using malloc. This looks
    bogus to me.I agree.
    Maybe something like this would be better:
    carr = (int*)malloc(len * sizeof jint);

  • JAVA NATIVE ACCESS

    hi
    It would be helpfull for me if anybody give good reference/ link related JAVA NATIVE ACCESS
    i have tried through google and sun search but most of all are java native Interface...
    so please
    thanks in advance

    Hello guys,
    I have a problem in JNA to create interface method because i must search functions in DLL which have many structures as argument. So i find JNA is difficult but less than JNI.
    I would like to give you my specification file and traduce this fonction in the interface of JNA. Please help me !!!!
    Here is these C functions :
    typedef disco_err (WINAPIV* win_disco_init)(disco_init_conf_t* conf);
    typedef enum {
    DISCO_ERR_NONE = 0, //!< No error
    DISCO_ERR_IO = -1, //!< IO error
    DISCO_ERR_DB = -2, //!< Database error
    DISCO_ERR_MEM = -3, //!< Memory allocation error
    DISCO_ERR_PAR = -4, //!< Invalid parameters
    DISCO_ERR_ND = -5, //!< Max number of opened descriptors is
    reached
    DISCO_ERR_NS = -6, //!< Service not supported
    DISCO_ERR_ID = -7, //!< Bad id
    DISCO_ERR_FF = -8, //!< Bad file format
    DISCO_ERR_EOF = -9, //!< End of file
    DISCO_ERR_NOE = -10, //!< No such entity
    DISCO_ERR_INT = -11, //!< Database build interrupted
    DISCO_ERR_ACCESS = -12, //!< Access denied
    DISCO_ERR_EMPTY = -13, //!< Empty information
    DISCO_ERR_NO_MORE_RESPONDING_IPOD = -14, //!<no more iPod
    DISCO_ERR_OTHER = -30, //!< Other
    }disco_err;
    typedef struct {
    disco_uart_iap_init iap_via_uart;//! Unused
    int priority; //!< Priority level of Disco threads
    disco_spec_strs_t strs; //!< Special strings configuration
    }disco_init_conf_t;
    typedef struct {
    const char* empty; //!< String for undefined lists elements
    const char* root; //!< Name for virtual 'Root' directories
    }disco_spec_strs_t;
    So it's a real crazy mapping between C and Java. It's too dificult for me. i hope there will be a professional of mapping ? Give me the solution please because i have 20 days to design the modul of my java application.
    thanks in advance,
    Nicolas.

  • On my iPhone 4, people cant hear me when I make and / or receive normal (GSM) phone calls. But when on calls using internet based / native apps like viber or skype, people can hear me just fine. Voice memos work too and have already tried different SIMs

    On my iPhone 4, people cant hear me when I make and / or receive normal (GSM) phone calls. But when I make/receive calls using internet-based / native apps like viber or skype, people can hear me just fine. I have tried recording my voice using voice memos - this works. And have already tried different SIM cards but the problem persists.
    I have taken my phone to an authorized Apple service center, where they restored my phone to factory settings, but still facing the same issue. They service center directed me to Apple Customer Care Hotline, where I have now spent 3+ hours explaining my issue and yet no one can resolve it. The easy answer if to replace the phone - and since it is out of warranty, I am expected to pay for it.
    Additionally, the customer service has been so rude and confrontational that it has completely changed my view of Apple and its customer focus. I am a disappointed and angry customer today - people would be surprised to hear just how rude customer service was including making statements such as "Apple doesnt make infallible products, that's why warranty is needed for our products" and that "every product undergoes a problem at some stage, so do ours!" There goes whatever confidence I had...
    My concern is simple - if no one at Apple and / or its CS hotline is able to address my issue comprhensively and keep telling me that they have never encountered a precedent before, then with what right can they expect me to pay for a replacement?! I am NOT here to fund Apple's research into their product faults and manufacturing.
    And even though a customer is out of warranty, is it too much to expect an Apple product to work well for at least a 'reasonable' period of time. My phone is less than 18 months old and has been facing this issue for the past 2 months - surely the longevity of Apple products is more than 18 months!
    Just a sad sad day for an Apple customer, compounded by unjustifiably rude and aggressive staff. And still no resolution to my problem.

    I am having the same issue - with my last 2 iPhone 4's. My first handset each time I was on a call wether it was up to my ear or on loud speaker, the call would automatically mute even though the mute button wouldn't show up as highlighted. Pressing the mute button on and off during the call doesn't fix it either. I rang Apple and asked what some of their trouble shooting solutions were. I got told that it might be a software issue and to install the latest software update. This failed. I then got told to uninstall the software on the phone and do a complete restore. This also failed. After trying the troubleshooting suggestions, I took the phone into my provider and they sent me out a new phone within a week under warranty claiming it was a hardware issue and probably just a "glitch" with that particular phone. This was not the case....
    After receiving my second iPhone 4, I was hopeful that it would work. For the first couple of days, making/receiving calls was not an issue. Until after about a week, the same problem started again. In one instance I had to hang up and call back 4 times and the call would still automatically mute after about 5 seconds. Also on the second handset, the main camera located on the back of the phone has red and blue lines running through it and can't take a decent picture. So back to the store I go to get another replacement - Again.
    For a phone that is rated highly and as a keen Apple product purchaser, I am a bit disappointed with the experience I have had with the iPhone 4. Let's hope they find a fix sometime soon because this is becoming a bit beyond a joke.....!!

  • Without BPM:Call RFC using JCO in interface mapping using java mapping

    Hi all
    I have a very small scenario where REQUEST from the customer comes via Web Service all i have to do is to read the request using SOAP adapter and call an interface mapping(lets say the name is IM_TEST) inside which there is a JAVA MAPPING program written which will call an RFC in CRM using JCO.
    Now this was really simple and i cud test the Interface mapping successfully, but the problem is when loading the scenario in integration directory i have certain things to do
    1. to set the SENDER AGREEMENT which i did correctly
    2. set the RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT now here i am stuck because there is no receiver in my case as the RFC is called inside the mapping only.
    can i call one more message mapping in IM_TEST which will write file onto the XI directory and then in RECEIVER DETERMINATION, INTERFACE DETERMINATION AND RECEIVER AGREEMENT i can mention the reciever as FTP.
    I tried it but i gives the following error
    Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_TEST_WRITE_FILE: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Parsing an empty source. Root element expected!
    Please help me how to complete the scenario so that customer can run it end to end.
    <REMOVED BY MODERATOR>
    Edited by: Prateek Raj Srivastava on May 12, 2010 1:44 PM

    Stefen
    What do i do then...actually this is the project requirement. They want a very fast response from PI and thats why they wnt us to omit BPM and the Graphical mapping from the scenario.
    I am able to test the interface mapping which calls the the Java mapping inside which there is an RFC call, but i cannot implement it end - to - end as there is no receiver business system in this case. The only business system i have is the SOAP sender.
    I am really troubled now, please help me with a solution.
    Is there any other possible way through which the process can become very fast whic hcan meet their requirement.
    Regards
    Naina

  • Using native interfaces in java

    How can you use a native interface in java?

    1) By reading the JNI api and writing appropriate code or
    2) Stealing some code already done to get you started
    (#2 is VERY popular)
    And, oddly enough, I have posted 2 articles on here about using JNI in the last few weeks. So, do a search for "smg123 JNI" and you'll find my posts.

  • Calling dll in Java using The JACOB Project

    Hi I'm trying to import and read the class and methods from a DotNet API (dll) in java code usind the Jacon Project does anybody know how to do it? (like and example or simple staps to have an idea)
    thanks
    Luca

    afaik you cannot call windows API functions directly, you have to create a 'wrapper' method in C++ in order to access the API functions.
    it will look something like
    // Java code:
    package a.b;
    class Thingie {
      public native int doThatFunkyThingie();
    // c++ code
    jint Java_a_b_Thingie_doThatFunkyThingie(JNIEnv *env, JObject j) {
      // c++ function calls go here
    }I haven't done JNI in over a year, so this is probably not entirely correct.
    I recommend you read the JNI tutorial.
    J

  • Call OSB from java client

    Hi',
    I am trying to call OSB from java client,
    The OSB proxy Service type is "WSDL Web Service", I am able to get response from SOAP UI with below request, Please help me with Java code,
    I have been Googling a lot for this however didnt got enough.
    Thanks
    Yatan
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://core.xxx.com/schema/ServiceHeader/V1.0" xmlns:v11="http://core.xxx.com/schema/Customer/V1.0" xmlns:v12="http://core.xxx.com/schema/Customer/V1.0">
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>weblogic</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome1</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    <v1:GMWSHeader>
    <v1:SourceId>String</v1:SourceId>
    <v1:TransactionId>String</v1:TransactionId>
    <v1:TransactionTimeStamp>1967-08-13</v1:TransactionTimeStamp>
    <v1:ServiceVersion>LATEST</v1:ServiceVersion>
    </v1:GMWSHeader>
    </soapenv:Header>
    <soapenv:Body>
    <v11:GetDetailsRequest>
    <v11:Condition>
    <v12:SellingSource>?</v12:SellingSource>
    <v12:FulfillingFCNNbr>?</v12:FulfillingFCNNbr>
    </v11:Condition>
    </v11:GetDetailsRequest>
    </soapenv:Body>
    </soapenv:Envelope>

    Thanks Guys, I tried the ways you mentioned I am getting below error, this error is coming in both weblogic clientgen and webservice proxy from jdeveloper,
    I understand that this error has something to do with my process however not sure why is it coming, I will really appreciate if you can provide me some pointers.
    error:
    Buildfile: C:\JDeveloper\OSBClient\TestOSBClient\build.xml
    javaFromWSDL:
    [clientgen]
    *********** jax-ws clientgen attribute settings ***************
    wsdlURI: http://localhost:8001/xx/som/contracts/CustomerContract?wsdl
    packageName : com.osb.client
    destDir : C:\OSB
    *********** jax-ws clientgen attribute settings end ***************
    [clientgen] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
    [clientgen] parsing WSDL...
    [clientgen]
    [clientgen]
    [clientgen] [ERROR] A class/interface with the same name "com.osb.client.SOMMessage" is already in use. Use a class customization to resolve this conflict.
    [clientgen] line 89 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Relevant to above error) another "SOMMessage" is generated from here.
    [clientgen] line 51 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] A class/interface with the same name "com.osb.client.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.
    [clientgen] line 82 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Relevant to above error) another "TaskCompletionMessage" is generated from here.
    [clientgen] line 76 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
    [clientgen] line 89 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Related to above error) This is the other declaration.
    [clientgen] line 51 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] Two declarations cause a collision in the ObjectFactory class.
    [clientgen] line 82 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    [clientgen] [ERROR] (Related to above error) This is the other declaration.
    [clientgen] line 76 of http://localhost:8001/xx/som/contracts/CustomerContract?SCHEMA%2FSOMResources%2FXSD%2FSOMCommon
    [clientgen]
    BUILD FAILED
    weblogic.wsee.tools.WsBuildException: Error running JAX-WS clientgen: null
         at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:175)
         at weblogic.wsee.tools.anttasks.ClientGenFacadeTask.execute(ClientGenFacadeTask.java:244)
         at weblogic.wsee.tools.anttasks.ClientGenTask.execute(ClientGenTask.java:365)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatinxxethodAccessorImpl.invoke(DelegatinxxethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.Main.start(Main.java:179)
         at org.apache.tools.ant.Main.main(Main.java:268)
    Caused by: Error starting wsimport:
         at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:757)
         at weblogic.wsee.tools.clientgen.jaxws.ClientGenImpl.execute(ClientGenImpl.java:169)
         ... 19 more
    Caused by: com.sun.tools.ws.wscompile.AbortException
         at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:136)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2255)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:194)
         at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:140)
         at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:261)
         at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:203)
         at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:188)
         at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:738)
         ... 20 more
    Total time: 3 seconds

  • Calling Fortran from Java

    Is it possible to call Fortran code from java??

    You can use Runtime.exec() to run an application written in Fortran.
    If you can write C/C++ code which interacts with something written in fortran then you can use JNI to connect it to java.
    Presumably the fortran app doesn't already have an interface that allows something to interact with it when it runs - like a socket interface.

  • Looks like instantiation of interfaces; what is it?

    Some of the code examples I see look like instantiation of interfaces. But this is not possible. I would like to know what is happening here 'under the hood' and would appreciate it if anyone can shed some light on this.
                jchkBold.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    setNewFont();
            });This looks like an attempt to instantiate an anonymous ActionListener.
    In the following example, which works fine, it appears that AudioClip has been instantiated.
    import java.net.URL;
    import java.applet.Applet;
    import java.applet.AudioClip;
    import javax.swing.JLabel;
    import javax.swing.JApplet;
    import javax.swing.ImageIcon;
    public class DisplayImagePlayAudio extends JApplet {
        private AudioClip audioClip;
        URL urlImage = this.getClass().getResource("./images/denmark.gif");
        URL urlAudio = this.getClass().getResource("./audio/denmark.mid");
        public DisplayImagePlayAudio() {      
        @Override
        public void init() {
            this.add(new JLabel(new ImageIcon(urlImage)));
            audioClip = Applet.newAudioClip(urlAudio);
            audioClip.play();
        @Override
        public void start() {
            if (audioClip != null) {
                audioClip.play();
        @Override
        public void stop() {
            if (audioClip != null) {
                audioClip.stop();
    }

    Equitus wrote:
    Thank you jverd. You explanation is clear. I had guessed that some kind of implicit instantiation of another object must be underneath this construction. I speculated that it might be a copy of its outer class, with the new instance implementing the interface. You have called it object X. Is this an instance of Object? Every instance of every class is an instance of Object. But no, it's not just "plain ol' Object." It's a new class that's defined on the fly that is a direct subclass of Object (in the case of implementing an interface) or a direct subclass of whatever parent class you specified with new (in the case of extending a class).
    Thanks also warnerja. I guess from your answer that there is a new copy of Applet class instantiated. The line here:
    private AudioClip audioClip;seems to declare an object AudioClip.It declares a variable of type "reference to AudioClip."
    Presumably the declarations do not determine if the entity is to become a primitive, object or object that extends or implements something else until the next step,It can't be a primitive unless the type you declare is one of the primitives, none of which have subtypes. If you declare it as a reference type (class or interface), as is done here, then all that say is that it's a reference that will either be null or will point to an object that is a concrete instance of the indicated type or a subtype. That is it will be that class or a subclass, or a class that implements that interface.
    in which the declaration becomes an entity of some kind. Now you're just making up terms. It's just a variable, and the variable has a type. This is true for all variables. There's no "entity of some kind" voodoo.
    Am I correct to conclude that you can cast Applet as AudioClip?Er, no. Why would you think that?

  • Execution of Java Native Process slow in Mac OS X

    Hi,
    I'm having some performance issues when executing an java native process on Mac OS X. I am developping an application in AIR that searches for people in the ldap of our organisation. It has to be usable both on Mac as on Windows. When I execute my app on windows, the search process takes about 2-3 seconds. However, when I try to execute it on mac, the search process takes about 6-8 seconds. This is a bit to long to make it usable.
    Has anybody encountered this problem as well and does anyone know what the problem can be?
    Thanks in advance
    Ronald Kamp
    Junior Flex/Java/LiveCycle Consultant at iDA MediaFoundry

    Hi Ronald,
    Have you tried benchmarking your java process without the inclusion of AIR?  If so, did you find a difference which points to AIR being a culprit for the performance hit?
    I'd be very interested in trying this out.  If you could provide me with a sample project that illustrates the slow down on Mac, I'll take a look right away.  Please feel free to contact me via private message on the forum or at [email protected] if you'd like to take this offline.
    Thanks,
    Chris

  • Calling JVM from C native code

    I'd like to call JVM from C native call.
    I work in W2000 enviroment using GCC Cygnus compiler.
    I followed JNI instructions.
    I read in this forum there was a change in JDK, and instead of attaching javai.dll, jvm.dll must be attached.
    Then I made a test using invoke.c example from JDK.
    I built following .bat file:
    gcc -c invoke.c -Id:\jdk1.3.1\include -Id:\jdk1.3.1\include\win32
    DLLTOOL dllname jvm.dll def libjvm.def --output-lib d:\jdk1.3.1\jre\bin\classic\libjvm.a
    c++ -o invoke.exe invoke.o -Ld:\jdk1.3.1\jre\bin\classic -ljvm
    with libjvm.def :
    EXPORTS
    imp_JNI_GetDefaultJavaVMInitArgs@4
    imp_JNI_CreateJavaVM@12
    All seems to work fine, and invoke.exe is generated. But when trying to run it, I get a windows message telling me :
    invoke.exe doesn't find the entry point to imp_JNI_CreateJavaVM@12 in jvm.dll.
    What am I going wrong ?
    Any calling convention issue ?
    Thanks in advance. Ignasi Villagrasa.

    Have a look at http://www.xraylith.wisc.edu/~khan/software/gnu-win32/. It has examples of how to use gcc, java JNI on cygwin and should work on all versions of Windows. It has the command line options for using dlltool.

  • PL/SQL and Java Swing interface

    Everybody in this forum knows that Oracle is the best database around
    with many functionalities, stability, performance, etc. We also know
    that PL/SQL is a great language to manipulate information directly
    in the database with many built in functions, OOP capability,
    transaction control, among other features. Today an application that
    manipulates information, which needs user interface, requires components
    to be developed using different technologies and normally running in
    different servers or machines. For example, the interface is done using
    a dynamic HTML generator like JSP, PHP, PL/SQL Web Toolkit, etc.
    This page is executed in an application server like Oracle iAS or
    Tomcat, just to name two, which in turn access a database like Oracle to
    build the HTML. Also rich clients like Java applets require an intermediate
    server to access the database (through servlets for example) although
    it is possible to access the database directly but with security issues.
    Another problem with this is that complexity increases a lot, many
    technologies, skills and places to maintain code which leads to a greater
    failure probability. Also, an application is constantly evolving, new
    calculations are added, new tables, changed columns. If you have an
    application with product code for example and you need to increase its
    size, you need to change it in the database, search for all occurrences
    of it in the middle-tier code and perhaps adjust interfaces. Normally
    there is no direct dependency among the tier components. On another
    issue, many application interfaces today are based on HTML which doesn't
    have interactive capabilities like rich-client interfaces. Although it
    is possible to simulate many GUI widgets with JavaScript and DHTML, it is
    far from the interactive level we can accomplish in rich clients like
    Java Swing, Flash MX, Win32, etc. HTML is also a "tag-based" language
    originally created to publish documents so even small pages require
    many bytes to be transmitted, far beyond of what we see on the screen.
    Even in fast networks you have a delay time to wait the page to be
    loaded. Another issue, the database is in general the central location
    for all kinds of data. Most applications relies on it for security,
    transaction and availability. My proposal is to use Oracle as the
    central location for interface, processing and data. With this approach
    we can create not only the data manipulation procedures in the database,
    but procedures that also control and manage user interfaces. Having
    a Oracle database as the central location for all components has many
    advantages:
    - Unique point of maintenance, backup and restore
    - Integrated database security
    - One language for everything, PL/SQL or Java (even both if desired)
    - Inherited database cache, transaction and processing optimizations
    - Direct access to the database dictionary
    - Application runs on Oracle which has support for many platforms.
    - Transparent use of parallel processing, clusters and future
    background technologies
    Regarding the interface, I already created a Java applet renderer
    which receives instructions from the database on how to create GUI
    objects and how to respond to events. The applet is only 8kb and can
    render any Swing or AWT object/event. The communication is done
    through HTTP or HTTPS using Oracles's MOD_PLSQL included in the Apache
    HTTP server which comes with the database or application server (iAS).
    I am also creating a database framework and APIs in PL/SQL to
    create and manipulate the client interface. The applet startup is
    very fast because it is very small, you don't need to download large
    classes with the client interface. Execution is done "on-demand"
    according to instructions received from the database. The instructions
    are very optimized in terms of network bandwidth and based on preliminary
    tests it can be up to 1/10 of a similar HTML screen. Less network usage
    means faster response and means that even low speed connections will
    have a good performance (a future development can be to use this in
    wireless devices like PDAs e even cell phones, just an idea for now).
    The applet can also be executed standalone by using Java Web Start.
    With this approach no business code, except the interface, is executed
    on the client. This means that alterations in the application are
    dynamically reflected in the client, no need to "re-download" the
    application. Events are transmitted when required only so network
    usage is minimized. It is also possible to establish triggering
    events to further reduce network usage. Since the protocol used is
    HTTP (which is stateless), the database framework I am creating will
    be responsible to maintain the state of connections, variables, locks
    and session information, so the developer don't need to worry about it.
    The framework will have many layers, from communication up to
    application so there will be pre-built functions to handle queries,
    pagination, lock, mail, log, etc. The final objective is to have a
    rich client application integrated into the database with minimum
    programming and maintenance requirements, not forgetting customization
    capabilities. Below is a very small example of what can de done. A
    desktop with two windows, each window with two fields, a button with an
    image to switch the values, and events to convert the typed text when
    leaving the field or double-clicking it. The "leave" event also has an
    optimization to only be triggered when the text changes. I am still
    developing the framework and adjusting the renderer but I think that all
    technical barriers were transposed by now. The framework is still in
    the early stages, my guess is that only 5% is done so far. As a future
    development even an IDE can be created so we have a graphical environment
    do develop applications. I am willing to share this with the PL/SQL
    community and listen to ideas and comments.
    Example:
    create or replace procedure demo1 (
    jre_version in varchar2 := '1.4.2_01',
    debug_info in varchar2 := 'false',
    compress_buffer in varchar2 := 'false',
    optimize_buffer in varchar2 := 'true'
    ) as
    begin
    interface.initialize('demo1_init','JGR Demo 1',jre_version,debug_info,compress_buffer,optimize_buffer);
    end;
    create or replace procedure demo1_init as
    begin
    toolkit.initialize;
    toolkit.create_icon('icon',interface.global_root_url||'img/switch.gif');
    toolkit.create_internal_frame('frame1','Frame 1',50,50,300,136);
    toolkit.create_label('frame1label1','frame1',10,10,50,20,'Field 1');
    toolkit.create_label('frame1label2','frame1',10,40,50,20,'Field 2');
    toolkit.create_text_field('frame1field1','frame1',50,10,230,20,'Field 1','Field 1',focus_event=>true,mouse_event=>true);
    toolkit.create_text_field('frame1field2','frame1',50,40,230,20,'Field 2','Field 2',focus_event=>true,mouse_event=>true);
    toolkit.set_text_field_event('frame1field1',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 1','false');
    toolkit.set_text_field_event('frame1field2',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 2','false');
    toolkit.set_text_field_event('frame1field1',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 1','false');
    toolkit.set_text_field_event('frame1field2',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 2','false');
    toolkit.create_button('button1','frame1',10,70,100,25,'Switch','Switch the values of "Field 1" and "Field 2"','S','icon');
    toolkit.set_button_event('button1',toolkit.action_performed_event,'demo1_switch_fields(''frame1field1'',''frame1field2'')','frame1field1:'||toolkit.get_text_method||',frame1field2:'||toolkit.get_text_method);
    toolkit.create_internal_frame('frame2','Frame 2',100,100,300,136);
    toolkit.create_label('frame2label1','frame2',10,10,50,20,'Field 1');
    toolkit.create_label('frame2label2','frame2',10,40,50,20,'Field 2');
    toolkit.create_text_field('frame2field1','frame2',50,10,230,20,'Field 1','Field 1',focus_event=>true,mouse_event=>true);
    toolkit.create_text_field('frame2field2','frame2',50,40,230,20,'Field 2','Field 2',focus_event=>true,mouse_event=>true);
    toolkit.set_text_field_event('frame2field1',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 1','false');
    toolkit.set_text_field_event('frame2field2',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 2','false');
    toolkit.set_text_field_event('frame2field1',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 1','false');
    toolkit.set_text_field_event('frame2field2',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 2','false');
    toolkit.create_button('button2','frame2',10,70,100,25,'Switch','Switch the values of "Field 1" and "Field 2"','S','icon');
    toolkit.set_button_event('button2',toolkit.action_performed_event,'demo1_switch_fields(''frame2field1'',''frame2field2'')','frame2field1:'||toolkit.get_text_method||',frame2field2:'||toolkit.get_text_method);
    end;
    create or replace procedure demo1_set_upper as
    begin
    toolkit.set_string_method(interface.global_object_name,toolkit.set_text_method,upper(interface.array_event_value(1)));
    toolkit.set_text_field_event(interface.global_object_name,toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,upper(interface.array_event_value(1)),'false');
    end;
    create or replace procedure demo1_set_lower as
    begin
    toolkit.set_string_method(interface.global_object_name,toolkit.set_text_method,lower(interface.array_event_value(1)));
    toolkit.set_text_field_event(interface.global_object_name,toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,lower(interface.array_event_value(1)),'false');
    end;
    create or replace procedure demo1_switch_fields (
    field1 in varchar2,
    field2 in varchar2
    ) as
    begin
    toolkit.set_string_method(field1,toolkit.set_text_method,interface.array_event_value(2));
    toolkit.set_string_method(field2,toolkit.set_text_method,interface.array_event_value(1));
    toolkit.set_text_field_event(field1,toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,upper(interface.array_event_value(2)),'false');
    toolkit.set_text_field_event(field2,toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,upper(interface.array_event_value(1)),'false');
    toolkit.set_text_field_event(field1,toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,lower(interface.array_event_value(2)),'false');
    toolkit.set_text_field_event(field2,toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,lower(interface.array_event_value(1)),'false');
    end;

    Is it sound like Oracle Portal?
    But you want to save a layer 9iAS.
    Basically, that was the WebDB.(Oracle changed the name to Portal when version 3.0)
    Over all, I agree with you.
    &gt;&gt;Having a Oracle database as the central location for all components has many
    &gt;&gt;advantages:
    &gt;&gt;
    &gt;&gt;- Unique point of maintenance, backup and restore
    &gt;&gt;- Integrated database security
    &gt;&gt;- One language for everything, PL/SQL or Java (even both if desired)
    &gt;&gt;- Inherited database cache, transaction and processing optimizations
    &gt;&gt;- Direct access to the database dictionary
    &gt;&gt;- Application runs on Oracle which has support for many platforms.
    &gt;&gt;- Transparent use of parallel processing, clusters and future
    &gt;&gt;background technologies
    I would like to build 'ZOPE' inside Oracle DB as a back-end
    Using Flash MX as front-end.
    Thomas Ku.

  • "ReferenceError: "myIpAddr"  is not defined, when call JavaScript from java

    Hi developers,
    My java application was trying to issue a http request via proxy auto-config. So, I did below jobs
    1. Read URL of *.pac from registry
    2. Call FindProxyForURL from java, the code is like below
                   ScriptEngineManager factory = new ScriptEngineManager();
                   ScriptEngine engine = factory.getEngineByName("JavaScript");
                   engine.eval(autoProxyScript);
                   Invocable inv = (Invocable) engine;
                   Object obj = inv.invokeFunction("FindProxyForURL",
                             "http://java.sun.com/",
                             "java.sun.com");
    However, I got "ReferenceError: "myIpAddress" is not defined
    I can not change the script on server to add a function like "myIpAddress", I am wordering why IE or mozilla can call it successfully and get proxy server, while Java failed to do that.
    I got a ugly solution by calling "pacparser" by jni. But I really hope I can get a better solution.

    A .pac file is a JavaScript, but it requires some functions to be defined in the executing context to work (i.e. you must define those).
    From the example on the Wikipedia page there's at least "shExpMatch" and "isInNet". "myIpAddress" seems to be another such candidate.

Maybe you are looking for

  • Dual Monitor setup for Mac Mini???

    I just bought a VGA Y-cable and split my monitor signal to two monitors. Unfortunatley the same thing is displayed on both screens where as I was looking for an extension to my desktop. I found this http://www.national-tech.com/catalog/dvisplitter.ht

  • Custom Persona does not display after updating Firefox!

    == Issue == I have another kind of problem with Firefox == Description == I just updated Firefox, and my custom persona is no longer displaying properly. If I change to another persona from Mozilla it will display it just fine, and I can even see my

  • Third-Party Purchase Orders

    When not performing a goods receipt on third-party purchase orders, how does the PO get closed?  We currently issue third-party POs, the goods ordered are delivered to our customer and the vendor invoices us.  When the vendor invoice is entered, the

  • Run a batch file from java

    Hi, is there any chance to run a file , with the ending .bat. I was able to run run one with the ending .exe. Are there any limitations. Greetings tom

  • Script works in Script Debugger, but not a folder action - can u help?

    Hi I have written the following script to run as as folder action and it works fine when running it through in debug mode in Script Debugger, but as a folder action nothing happens. I wonder if someone could have a look and spot what the problem is.