JVM Signature

Hi all,
The company I'm working for would like to have an inventory of all JVM installed on client desktop.
For this we do have an asset management tool to detect the programs installed on desktop machines.
In ordre to detect programs, this asset management tools need some information about the programs (what we could call a signature).
So, in order to have this JVM inventory, I need to have the list of all JVM versions and their signature.
For instance signature could be a filename + the size of this file.
Where can I find this list of JVM versions with their signature.
Ideally, it would be great to have all the versions from all editors (MS, Oracle, Sun, ...) but only Sun would be already a great step for me
PS: Please note that I have no way to execute something on the desktop so I can't use something like Java -version for instance
Many thanks in advance for your help
Xavier

After investigation, I could do a search on rt.jar and the size of this files. What I'm looking of rnow is to have a list of all rt.jar available with the associated version

Similar Messages

  • Error signature ModName: jvm.dll

    Hello,
    I have a Java application that ran fine on my desktop PC (Windows), where I coded and compiled my program.
    But when I copied my program to another PC and ran it, I got this error message :
    "MyApp.exe has encountered a problem and needs to close. We are sorry for the inconvenience."
    When I clicked on "click here" to see the error report, I saw :
    Error signature
    AppName: MyApp.exe AppVer: 0.0.0.0 ModName: jvm.dll
    ModVer: 14.0.0.16 Offset: 000fee15
    I wonder if someone could please tell me how to fix this problem?
    Thank you and Best Regards,
    Akino

    user8708553 wrote:
    I have a Java application that ran fine on my desktop PC (Windows), where I coded and compiled my program.
    But when I copied my program to another PC and ran it, I got this error message :I also notice that the app is an exe. Java apps are usually distributed as jars, so it's possible that whatever utility you used to "execify" your app is incompatible with the new machine.
    Winston

  • JVM Compatibility

    (new thread please!) Grant Ronald - Forms Product Management.
    At your request Grant.
    Compatibility ( Jinit vs Ms JVM vs Sun JVM ) - Not sure what you mean, we certify Jinit, we certify native JVMs we certify the Sun plug in, we certify IE, we certify NS, we certify Mac browsers - whats the issue
    Oracle Certainly doe support many different environments, the problem is that forms deployment on the internet is still a problem. As we have started our deployment we are seeing failures in 10-20% of clients, with jvm problems and we specify IE only. These clients have either no JVM or the wrong JVM for forms.
    We do not have this problem with the menu applet that we use.
    The solution to this is to force a download of a JVM as part of the initial process. As we examined this we found:
    1. Jinitiator -
    8 megabyte download
    No Feedback on download when triggered from the form until the download is complete.
    No usable Oracle source for the plug-in. Try wading through the download to get the right Jinitiator.
    No Web Install for Jinitiator. ( user gets F.U.D. when faced with exe download pop up).
    2. Microsoft JVM
    5 megabyte download if you can find it.
    No longer supported by Microsoft, but available on other sites.
    Limited functionallity. 800k Cab file must be downloaded for each form session.
    3. Sun Java Plug-in
    14 megabyte download
    This downloads and installs as J2ME not as a simple plug in.
    The only doc on setup for this is a White paper, which is not specific enough for most developers.
    The current download 1.4.2_1 also has warnings on the download that the file does not match the certificate.
    Also, the signature of the applet with JDK is downright hokey.
    Distributing an applet signed by "Developer" whose authenticity is verified by "Oracle" who is not trusted.
    Come on. This is your "Oracle's" applet not and you can afford to buy a certificate from Verisign.
    As we developers and our customers struggle, we see Microsoft pushing .Net where the promise is 95% compatibility with no download required ( since the hide it in the base OS).
    Grant you are caught in the middle but there are things that you can do.
    1. Fix the jar signature now
    2. Continue to work with Sun on a light-weight browser plug-in. The "Java Get it now" should be as simple as the Acrobat reader process without the extra baggage.
    These are the things to do if you are serious and we are watching you.
    Kevin

    Kevin,
    sure Forms very much depends on the JVM it is executed in. But saying "Continue to work with Sun on a light-weight browser plug-in. The "Java Get it now" should be as simple as the Acrobat reader process without the extra baggage." is not fair as it ignores the fact that Adobe is a meta data definition while Java is a J2SE platform for real application programming.
    Native Java Swing apps, even those using Java Webstart", all require VMs for execution. However, it is not only the VM that you download when installing JInitiator or the Java plugIn, its the full Java platform stack you get too. With each Java release the Java language grows and becomes more complex, the VM needs to know how to handle this.
    JInitiator basically is an Oracle patched version of SUNs Java PlugIn and therefore doesn't differ much in the way you install and deploy it.
    I agree that we all want it easier and smaller. Microsoft and Netscape terribly failed in integrating a solid and up to date VM to their Browsers and Opera didn't even try.
    Simply remove pieces from the JVM or the Java platform to reduce size gets you into more trouble due to broken functionality and you don't really want to deal with this.
    Partial - on demand - loading of the Java platform code does not work either for security reason.
    Though its hard to live with a PlugIn it basically works and beside of that is all we have.
    Fran

  • Why does Xalan's XPath fail on 1.4 JVMs?

    Background: I am developing a web services server using JAXP and JAXM. The server has several filters for checking incoming SOAP messages, one of which checks the validity of XML signatures. This filter uses Xalan's XPath engine to locate XML signature elements in the SOAP message and to pinpoint those elements in the message that must be signed.
    Problem: The XML signature filter works very well on a 1.3.0 or 1.3.1 JVM, but fails on 1.4.* when the server is under stress (20+ concurrent requests). I am using the same version of Xalan on 1.3.* and 1.4.* (using the endorsed mechanism of 1.4). This leads me to believe that the XPath implementation uses a class that somehow is not 100% thread safe on 1.4. Are there any classes that have lost their thread-safe-ness from 1.3 to 1.4?
    I am a commiter to the Xalan project at Apache, and I'd like to come up with a patch/workaround for Xalan's XPath engine.

    we also have a server application that processes XML files in multiple concurrent files and don't have problems with the XPath of Xalan. we migrated to 1.4 several months ago and didn't have such a "signature filter" error. what's the exact error message? exception? stack trace?

  • Digital Signature validation issue in Adapter Module

    Hi guys,
    we have developed an adapter module for digital signature validation, unfortunately, it simetimes work, sometimes doesnt. Strange is, that the same adapter module works for one customer, while for another one doesn't.
    We have sent through some "invalid" messages, which should have been valid at the client, where the module works and theu were flagged as valid. It seems the problem is caused by "special" spanish characters, because validation works for the messages where are only standard chars.
    Any idea, what to check? Java version, system encoding?
    Any help appreciated,
    Olian

    Hi,
    Not really sure about what causes such issues, but if your module coding uses String and byte[] manipulation, are you using explicite encoding when declaring such types ? I remember facing strange issues with XML field values, and "forcing" encoding to "UTF-8" when appropriate, it solved all my errors (string typed object, when converted internally by the JVM, were not always represented by the same bytes object)
    Hope this helps
    Chris

  • Peformance of setting JVM attribute or callback.

    I have a program that receives feeds in the native world and then calls the JVM through JNI with a callback like receivedFeed(attr1, attr2 ....attr20). There are a large number of attributes being passed back for each callback.
    The question I have has to do with performance.
    Is it faster to use this callback approach where the attributes are put in the signature and then reassembled on the java side into an object? Compared to directly setting each attribute on the Java object from within the native world and then prompting the JVM with a callback like updated();

    Very true. I would normally agree. Wrap the parameters in an object to minimize the number of arguments and make it flexible.
    Specifically, I am thinking about performance and I am willing to compromise a bit on the beauty of the solution, if it is faster.
    I have receiving a feed that has about 20 data items. Mostly ints and longs, and maybe a string. This format is relatively fixed and is not likely to change any time soon. If it does, it is all of my own code so the changes are easy.
    In the parameter passing approach, my assumption is that I would have a callback into the JVM with a long signature like
    receiveFeedCallback(jint1,jint2,jint3,...jint20);
    For the object wrapping approach, I would first have to construct an object. and then do the callback:
    jvalue args[4];
         args[0].i=(int) 0;
         args[1].i=(int) val1;
         args[2].i=(int) val2;
         args[3].i=(int) val3;
    jobject trans = jniENV_->NewObjectA(clazz,"<init>",args);
    jniENV_->CallStaticVoidMethod(jObj,_method_JNITEST_callback,feedTransaction);
    In the end, I probably need to know what the overhead of creating a class in Java vs. C++ is compared to the parameter passing approach.
    I may be doing this callback about 20(or more) times per millisecond. About 85% of the time in my program is on this one step so I would like to try the fastest approach possible.
    In the end, I am trying to write a test case to test the performance....which leads me to another questions and likely another thread in the JNI world....to be posted soon.
    Thanks for the help.

  • JVM Parameters in Applets

    Hi,
    I need to set the jvm parameter in an applet for instance "file.encoding" and
    System.setProperty("file.encoding","UTF8") doesnt work, is there any other way to set the parameters?
    Thanks in advance...

    System.setProperty("file.encoding","UTF8")
    Will throw an exception because the applet is not allowed to do that
    java.security.AccessControlException: access denied (java.util.PropertyPermission file.encoding write)
    You need to sign the applet and the consumer of your applet needs to trust the signature
    or the consumer of your applet needs to set up a policy for your applet.
    Or
    The consumer of your applet sets up runtime parameters.
    Here is something I copied and pasted to pass parameters that will force the jre to
    generate a full trace everytime.
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    I think the main question is why do you need to set this property? If you want to write
    something to the local filesystem you should sign or set up policy for the applet
    anyway so I would go with that sollution. Or better yet use an URL object and send the
    data that needs to be saved to a server that does something with it (store it in
    a database).

  • How to specify for JVM the stack for ONE specific thread that invokes JNI

    Hello all!
    I'm 2 days now looking for a solution in several forums but even in Sun Java Forums nobody was able to come up with a solution. If you know a better forum to place it, please let me know.
    Description:
    I have an application that launches several threads of different types. One of them is quite specific and run a critical JNI C++ process. The remaining ones are just for controling of other stuff... When I call the application by the command line
    java -classpath ... -Xss20m -Djava.library.path ... pack.subpack.myApp
    the application usually crashes: My computer has 256MB RAM of memory that vanish in seconds and causes an OutOfMemoryException
    Sometimes the application works properly, but sometimes the memory usage goes up fast until a general crash.
    What I believe that is going on:
    When we declare -Xss20m, I undestand that for each thread the JVM will attemp to allocate more 20MB, and if I have 10 threads, it goes up to 200MB and so on; however I'd like to have 20MB just for my critical process (that is called in one specific thread) and not for any thread.
    If I try to reduce -Xss parameter to, let's say 10MB, my C++ process overflow the JVM stack for the thread.
    So, does any body have know how to solve it? Please... I need experts help!
    Thanks a lot,
    Calegari

    There we go...
    I have this class:
    package calegari.automata;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author Aur�lio Calegari
    * @version 1.0
    public class Native {
    * Parameters:
    * individuals --> All binary individual (AC rule)
    * indivLength --> number of infividuals
    * numEval --> number of RIs
    * generateUniform --> Uniform distribution of density
    * seed --> seed for current generation
    public native double[] AutomataIterator(int[][] individuals,
    int indvLength,
    int numEval,
    boolean generateUniform,
    long seed
    static {
    System.loadLibrary("Native");
    public Native() {
    Then, running
    javah -classpath ... calegari.automata.Native
    I'll get the following .h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include "jni.h"
    /* Header for class calegari_automata_Native */
    #ifndef Includedcalegari_automata_Native
    #define Includedcalegari_automata_Native
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: calegari_automata_Native
    * Method: AutomataIterator
    * Signature: ([[IIIZJ)[D
    JNIEXPORT jdoubleArray JNICALL
    Java_calegari_automata_Native_AutomataIterator___3_3IIIZJ
    (JNIEnv *, jobject, jobjectArray, jint, jint, jboolean, jlong);
    #ifdef __cplusplus
    #endif
    #endif
    Next, I built my cpp file which is right bellow
    #include <stdio.h>
    #include <stdlib.h>
    #include <conio.h>
    #include "jni.h"
    #include "calegari_automata_Native.h"
    #include "util.h"
    double IndividualEvaluator(long rule[], int automataCells[][149], int numInit1s[],
    int numOfACs, int numEvaluations);
    char getNext(char simb);
    JNIEXPORT jdoubleArray JNICALL
    Java_calegari_automata_Native_AutomataIterator___3_3IIIZJ
    (JNIEnv *env, jobject jobj, jobjectArray indiv, jint length, jint numEval,
         jboolean isUniform, jlong seed)
    printf("Native JVM call for C++ critical block: Started \a[-]");
    int ACs[10000][149]; //Will be filled with 100000 Initial states of a cellular automata
    int numIndiv = length;
    int numOfACs = numEval;
    //Dencity of each Initial state of cellular automata
    int num1sRIs[10000];
    //response
    double resp[1000];
    //set seed
    srand((unsigned int) seed);
    //generate Cellular automata states
    //Uniform generation
    if(isUniform)
    for(int i=0;i<numEval;i++)
    int num1s;
    num1s=0;
    for(int j=0;j<149;j++)
    ACs[i][j] = ((rand()%numEval)<i+1?0:1);
    if(ACs[i][j]==1) num1s++;
    num1sRIs[i] = num1s;
    printf(" %d ",num1s);
    else //not uniform generation
    for(int i=0;i<numEval;i++)
    int num1s;
    num1s=0;
    for(int j=0;j<149;j++)
    ACs[i][j] = rand()%2;
    if(ACs[i][j]==1) num1s++;
    num1sRIs[i] = num1s;
    //load individuals and start the critical method
    char simb = '-';
    for(int i=0;i<numIndiv;i++)
    jintArray oneDim = (jintArray) env->GetObjectArrayElement(indiv, i);
    jint *indiv=env->GetIntArrayElements(oneDim, 0);
    simb = getNext(simb);
    printf("\b\b%c]",simb);
    resp[i] = IndividualEvaluator(indiv,ACs,num1sRIs,numOfACs,300);
    jdoubleArray retApts;
    retApts = env->NewDoubleArray(numIndiv);
    env->SetDoubleArrayRegion((jdoubleArray)retApts,(jsize)0,numIndiv,(jdouble *)resp);
    printf("\nReturning to Java plataform: Completed\a\a\n");
    return retApts;
    char getNext(char simb)
    if(simb=='-') simb = '\\';
    else if(simb=='\\') simb = '|';
    else if(simb=='|') simb = '/';
    else if(simb=='/') simb = '-';
    return simb;
    Then it works fine since we declare the size of the stack to JVM, however, if we don't... We get a crash!
    Any idea?
    Thanks

  • How to calling JVM in java code

    Hello!
    I continued my homework -- a java IDE written in java. I've asked how to compile the java code in my IDE here. Thanks to Franck_Lefevre, he showed me this:
    import com.sun.tools.javac.Main;
    public static boolean compileSource(String filename) {
    String[] javac_args = { filename };
    int result = Main.compile(javac_args);
    return (result == 0);
    now the problem is how to RUN the .class file on the JVM. Is there a method corresponding to this, ie also using java tools? or some better ways? I've tried a few ones but they don't work well.
    I really appreciate you who helped me so much.

    Planetar, remember to read the API docs for the
    complete method signature for Class.getMethod.Good point, take my code example as just a rough guide of what to look at in the API docs. Namly,Class, ClassLoader and Method.

  • Lauching a JVM from C and providing interface to C++

    Hi
    I'm work on a project that launch a JVM using JNI.
    I need to provide a interface to a C++ class through JNI in order to allow the launched JVM to access it. The code of this class is in the program that launch the JVM
    The problem is that java does not find the given function and fails with:
    java.lang.UnsatisfiedLinkError: altitude
    The function is present in the database (checked with "nm" against the name given by javah).
    I supposed that there is some kind of addressing or kind of "namespace", but don't know how to avoid it.

    From a program in a JVM call a routine which has a JNI that launches a new JVM using
    C? Why would you want to do this?No it's not what I am doing.
    From a C++ program that follows I launch a JVM (that's working, the code have been simplified a bit) and retrieve methods id to store them in attributes (variables names starting with underscore):
          // Create the JVM oine time only
          if (NULL == _env)
            JavaVMInitArgs  vm_args;
            JavaVMOption*   options = NULL;
            char*           char_options = NULL;
            list<string>    user_options;
            _database.getPropertyList("simu.locals.java", "option", &user_options);
            if (0 != user_options.size())
              unsigned long index = 0;
              options = new JavaVMOption[user_options.size()];         
              for (list<string>::iterator   it = user_options.begin();
                   user_options.end() != it; it++)
                char_options = strdup(it->c_str());
                options[index++].optionString = char_options;
              vm_args.nOptions = user_options.size();
            vm_args.version = JNI_VERSION_1_4;
            vm_args.options = options;
            vm_args.ignoreUnrecognized = JNI_TRUE;     
            JNI_CreateJavaVM(&_jvm, (void**)&_env, &vm_args);    
          // Retrieve the class and method that will allow to create the
          // planner
          _cls = _env->FindClass(class_name->c_str());
          string*   method =
            _database.getProperty("simu.locals.java.methods.init.name");
          string*   sig =
            _database.getProperty("simu.locals.java.methods.init.signature");
          string*   port =
            _database.getProperty("simu.locals.java.methods.init.argument");
          string            nid = str(format("%d") % id);
          jmethodID         mid =
            _env->GetStaticMethodID(_cls, method->c_str(), sig->c_str());
          jint              arg1 = lexical_cast<unsigned int>(*port);
          jstring           arg2 = _env->NewStringUTF(nid.c_str());
          _planner = _env->CallStaticObjectMethod(_cls, mid, arg1, arg2);
          // Save the method ID we'll need later     
          method =
            _database.getProperty("simu.locals.java.methods.incoming.name");
          sig =
            _database.getProperty("simu.locals.java.methods.incoming.signature");
          _incoming = _env->GetStaticMethodID(_cls, method->c_str(), sig->c_str());
          method =
            _database.getProperty("simu.locals.java.methods.outgoing.name");
          sig =
            _database.getProperty("simu.locals.java.methods.outgoing.signature");
          _outgoing = _env->GetStaticMethodID(_cls, method->c_str(), sig->c_str());Then I call the retrieved static method of the class when needed.
    This work perfectly, as far as i have tested.
    But now, the java part will need to access some algorithm and datas already existing in the C part. So i made a very simple interface:
    ** Interface to the environement C++ class
    package provided;
    public class Environment
        ** Methods implemented in Environment.cc
        public static native double altitude(double lat, double lon);
    }I generate the interface with javah and implement it quicly (doing nothing):
    #include <iostream>
    using namespace std;
    ** This file implement the interface betwen the C++ class Environment
    ** (from Environment.h) and the Java class provided.Environment whose
    ** native method are described in provided_Environment.h.
    ** It uses jni.h
    #include "provided_Environment.h"
    #include "Environment.h"
    #include "jni.h"
    * Class:     provided_Environment
    * Method:    altitude
    * Signature: (DD)V
    extern "C" JNIEXPORT
    jdouble JNICALL Java_provided_Environment_altitude(JNIEnv*      env,
                                                       jclass     c,
                                                       jdouble      lat,
                                                       jdouble      lon)
      cout << ARTEMIS::Environment::altitude(lat, lon) << endl; 
      return (ARTEMIS::Environment::altitude(lat, lon));
    }nm returns:
    nm mms | grep altitude
    080aa94c t _GLOBAL__I_Java_provided_Environment_altitude
    080aa6e4 T Java_provided_Environment_altitude
    080a8778 T _ZN7ARTEMIS11Environment8altitudeEddSo there is no .so . I've tried to have one but there is the same kind of problem as when I load the .so, I have a error because the .so can find the required symbols that are in the program (here the ARTEMIS::Environment::altitude function)
    Is it clearer ??

  • How to increase JVM Heap Size

    Hi all,
    Our Environment
    ===============
    OS - Windows XP Service Pack 3
    Oracle Developer Suite - 10.1.2.3.0
    Oracle Forms & Reports Service 10.1.2.3.0
    Oracle Database 10.2.0.1.0
    JDK 1.5
    Jinitiator 1.3.1.30
    Apache POI 3.5
    From forms we are writing to excel files after copying XL template using Apache POI 3.5 and JDK 1.5. This XL template file has got lot of macros.
    We have imported the Java class files into form as pl/sql library. We are able to write upto 7Mb size of XL file. Beyond that size it comes with the error Ora-105101.
    We tried to increase the JVM Heap Size to 640M by setting values -Xmx640M everywhere in OC4J_BI_FORMS/Server Properties/Java Options, Home/Server Properties/Java Options through Enterprise Manager console. Also manually set the values in OPMN.XML and reloaded the same. Also set -Xmx640M in Jinitiator 1.3.1.30 Java Runtime Parameters. Also set in Java console. All settings have no effect.
    We have written a small program to display the run time memory from forms, which displays only maximum memory 63M all the time.
    PACKAGE BODY HeapSize IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('HeapSize', '()V', args));
    END;
    -- Method: getTotalMemory ()D
    FUNCTION getTotalMemory(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getTotalMemory', '()D', args);
    END;
    -- Method: getMaxMemory ()D
    FUNCTION getMaxMemory(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getMaxMemory', '()D', args);
    END;
    BEGIN
    NULL;
    END;
    declare
    obj ORA_JAVA.JOBJECT;
    BEGIN
    obj:=HeapSize.new;
    message('Total memory '||HeapSize.getTotalMemory(obj));
    message('Max memory '||HeapSize.getMaxMemory(obj));
    END;
    Below procedure is for writing to Excel file.
    ============================================
    PACKAGE BODY UWWriteExcel IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('UWWriteExcel', '()V', args));
    END;
    -- Method: copyExcel (Ljava/lang/String;Ljava/lang/String;)V
    PROCEDURE copyExcel(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'copyExcel', '(Ljava/lang/String;Ljava/lang/String;)V', args);
    END;
    -- Method: getSpreadSheetPara (Ljava/lang/String;)V
    PROCEDURE getSpreadSheetPara(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getSpreadSheetPara', '(Ljava/lang/String;)V', args);
    END;
    -- Method: openSheet (I)V
    PROCEDURE openSheet(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_INT_ARG(args, a0);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'openSheet', '(I)V', args);
    END;
    -- Method: getCellValues (IID)V
    PROCEDURE getCellValues(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER,
    a1 NUMBER,
    a2 NUMBER) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(3);
    JNI.ADD_INT_ARG(args, a0);
    JNI.ADD_INT_ARG(args, a1);
    JNI.ADD_DOUBLE_ARG(args, a2);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IID)V', args);
    END;
    -- Method: getCellValues (IILjava/lang/String;)V
    PROCEDURE getCellValues(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER,
    a1 NUMBER,
    a2 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(3);
    JNI.ADD_INT_ARG(args, a0);
    JNI.ADD_INT_ARG(args, a1);
    JNI.ADD_STRING_ARG(args, a2);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IILjava/lang/String;)V', args);
    END;
    -- Method: exportExcel ()V
    PROCEDURE exportExcel(
    obj ORA_JAVA.JOBJECT) IS
    BEGIN
    args := NULL;
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'exportExcel', '()V', args);
    END;
    -- Method: copy (Ljava/lang/String;Ljava/lang/String;)V
    PROCEDURE copy(
    a0 VARCHAR2,
    a1 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    JNI.CALL_VOID_METHOD(TRUE, NULL, 'UWWriteExcel', 'copy', '(Ljava/lang/String;Ljava/lang/String;)V', args);
    END;
    BEGIN
    NULL;
    END;
    declare
    obj ORA_JAVA.JOBJECT;
    BEGIN
    message('-1');pause;
    obj:=UWWriteExcel.new;
    message('0');pause;
    UWWriteExcel.copyExcel(obj,'C:\\excel\\CAT2009WS.XLS','C:\\excel\\CAT2009WS.XLS');
    message('1');pause;
    UWWriteExcel.openSheet(obj,0);
    message('2');pause;
    UWWriteExcel.getCellValues(obj,6,2,900);
    message('3');pause;
    UWWriteExcel.getCellValues(obj,7,2,911);
    message('4');pause;
    UWWriteExcel.exportExcel(obj);
    END;
    When the size of XL is more than 7Mb, after message(0) it will be display oracle error.
    From command prompt if we run the same java class file by passing -Xmx256m parameter we are able to write to big XL file.
    Can anyone tell me where I am wrong... Can we increase the JVM Heap Size from forms...

    I have a simular problem.
    Via Forms I call a Java class (import Java class -> PL/SQL class java method).
    For this specific process I need to set the Xmx java option...
    How do I do this ?
    Changing the java option for the Forms-OC4J in the EM doesn't help.
    Is there an other level where I can modify this ?
    Does the java process of the forms is the single process that exists ? How does he handles such java calls?
    Are that separed java processes ? threads ? ....
    Thanks !!!

  • SAPCAR: can not set permissions for /EPS/in/SIGNATURE.SMF

    We are running SUM 1.0 SP10 on IBM i with V7R1 to put EHP6 and SP's on an ERP 6.0 system.  Phase PREP_PRE_CHECK/SCANDIR_EPS0 repeatedly ends with multiple errors that SAPCAR: can not set permissions for /EPS/in/SIGNATURE.SMF file.  We tried increasing the sidADM and R3GROUP authority to the file, but it changes them back and ends with a different number of errors each time, see example:
    SAPup> Starting subprocess with PID 4295601 in phase 'SCANDIR_EPS0' at 20140319101619
        ENV: DIR_LIBRARY=/usr/sap/Y60/SUM/abap/bin
        ENV: ILE_PATH=/usr/sap/Y60/SUM/abap/bin:/usr/sap/Y60/SYS/exe/run:/usr/bin:.
        ENV: LIBPATH=/usr/sap/Y60/SUM/abap/bin:/usr/sap/Y60/SUM/jvm/jre/lib/ppc64/server:/usr/sap/Y60/SUM/jvm/jre/lib/ppc64:/usr/sap/Y60/SUM/jvm/jre/../lib/ppc64:/usr/sap/Y60/SUM/jvm/jre/lib/ppc64/jli:/usr/sap/Y60/SUM/jvm/jre/../lib/ppc64/jli:/usr/sap/Y60/SYS/exe/run:/usr/sap/Y60/hdbclient:/sapdb/clients/Y60/lib/lib64:/sapdb/clients/Y60/lib:/sapdb/programs/lib/lib64:/sapdb/programs/lib
        ENV: PASE_LANG=en_US
        ENV: PASE_LC__FASTMSG=true
        ENV: PASE_LIBPATH=/usr/sap/Y60/SUM/abap/bin:/usr/sap/Y60/SYS/exe/run:/usr/sap/Y60/hdbclient:/sapdb/clients/Y60/lib/lib64:/sapdb/clients/Y60/lib:/sapdb/programs/lib/lib64:/sapdb/programs/lib
        ENV: PASE_LOCPATH=/usr/lib/nls/loc
        ENV: PASE_NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/en_US/%N:/usr/lib/nls/msg/en_US/%N.cat
        ENV: PASE_PATH=/usr/sap/Y60/SUM/abap/bin:/usr/sap/Y60/SYS/exe/run:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:/usr/bin:.:/usr/sap/Y60/hdbclient:/sapdb/clients/Y60/bin:/sapdb/programs/bin
        ENV: PASE_STDIO_ISATTY=N
        ENV: PASE_THREAD_ATTACH=Y
        ENV: PASE_TZ=<EST>5<EDT>,M3.2.0,M11.1.0
        ENV: PASE_USRGRP_LIMITED=
        ENV: PATH=/usr/sap/Y60/SUM/abap/bin:/usr/sap/Y60/SYS/exe/run:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:/usr/bin:.:/usr/sap/Y60/hdbclient:/sapdb/clients/Y60/bin:/sapdb/programs/bin
        ENV: SAPSYSTEMNAME=Y60
        ENV: dbms_type=db4
        ENV: dbs_db4_schema=R3Y60DATA
        ENV: ILE_DIR_LIBRARY=/usr/sap/Y60/SUM/abap/bin
        ENV: PASE_DIR_LIBRARY=/usr/sap/Y60/SUM/abap/bin
        ENV: DIR_LIBRARY_RMT=/usr/sap/Y60/SUM/abap/bin
        ENV: ILE_DIR_LIBRARY_RMT=/usr/sap/Y60/SUM/abap/bin
        ENV: PASE_DIR_LIBRARY_RMT=/usr/sap/Y60/SUM/abap/bin
        ENV: ILE_LIBPATH=/usr/sap/Y60/SUM/abap/bin
    EXECUTING /usr/sap/Y60/SUM/abap/bin/SAPCAR -flat -R /usr/sap/transD60/EPS/in -xvf /tmp/NO_SAVE/ERP_EHP6_Download/K-60609INECCDIMP.SAR
    SAPCAR: processing archive /tmp/NO_SAVE/ERP_EHP6_Download/K-60609INECCDIMP.SAR (version 2.01)
    x CSR0120031469_0080800.PAT
    x SIGNATURE.SMF
    SAPCAR: can not set permissions for /usr/sap/transD60/EPS/in/SIGNATURE.SMF (error 13). No such file or directory
    SAPup> Process with PID 4295601 terminated with status 13 at 20140319101623!
    Has anyone lse exprienced this and can share a fix?
    Thank you,
    -Margie

    Hi,
    We had the same issue, and in my opinion it is caused by the parallelisation of sapcar during SUM phase PREP_PRE_CHECK/SCANDIR_EPS0
    I did see several parallel SAPCAR jobs running during this phase.
    So what happens when one job extracts SIGNATURE.SMF at the same time another job tries to finalize its extraction by setting the permissions for /usr/sap/trans/EPS/in/SIGNATURE.SMF?
    It can happen that permissions are being set at the same time another sapcar yust deletes this file to begin extracting.
    Since we had 146 SAR archives that needed to be extracted, a retry allways ended up in 4 to 12 conflicts.
    What did do the trick was adding
    /sapcar/extrcact_parallel = 0
    to the file
    ../SUM/abap/bin/SAPup.par
    Just as Christoph Langer suggested.
    We had to restart the whole phase, a repeat was not enough to solve the problem.

  • JVM fails

    I'm writing JNI application for some C++ code. I don't have implementations of any functions but I'm pass values of parameters through my java program. e.g. in following OpenDevice function I can pass parallel port parameter(defined in C++) through Java. The implementation is just calling the function. It works.
    OpenDevice(DWORD port);
    GetImage(BYTE* buffer);
    ........DWORD and BYTE are defined as unsigned long and unsigned char respectively.
    now I want to read 'buffer' but when I try to read the buffer, the JVM fails.
    Would any1 help me in above?

    The C function takes BYTE*, then the problem can be that you are not handling the Java native stuff correctly. Generally, you must have more C warpper code to create a jbyteArray using NewByteArray() in jni.h and copy data from BYTE buffer to it.
    Can you show your Java native method signature?

  • 64 bit JVM Crash  when loading shared library

    I wrote a simple code to test loading of 64 bit shared library in linux. My JVM crashes on System.loadLibrary method.
    JAVA CODE
    import java.awt.Dimension;
    import javax.swing.JFrame;
    public class TestJNI extends JFrame{
            public native void init();
            static{
                    System.loadLibrary("testJNI");
            public static void main(String ...args){
                    TestJNI test = new TestJNI();
                    test.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    test.setSize(new Dimension(500,500));
                    test.setVisible(true);
                    System.out.println("Before init");
                    //test.init();
                    System.out.println("After init");
    } Header file created using javah
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class TestJNI */
    #ifndef _Included_TestJNI
    #define _Included_TestJNI
    #ifdef __cplusplus
    extern "C" {
    #endif
    #undef TestJNI_FOCUS_TRAVERSABLE_UNKNOWN
    #define TestJNI_FOCUS_TRAVERSABLE_UNKNOWN 0L
    #undef TestJNI_FOCUS_TRAVERSABLE_DEFAULT
    #define TestJNI_FOCUS_TRAVERSABLE_DEFAULT 1L
    #undef TestJNI_FOCUS_TRAVERSABLE_SET
    #define TestJNI_FOCUS_TRAVERSABLE_SET 2L
    #undef TestJNI_TOP_ALIGNMENT
    #define TestJNI_TOP_ALIGNMENT 0.0f
    #undef TestJNI_CENTER_ALIGNMENT
    #define TestJNI_CENTER_ALIGNMENT 0.5f
    #undef TestJNI_BOTTOM_ALIGNMENT
    #define TestJNI_BOTTOM_ALIGNMENT 1.0f
    #undef TestJNI_LEFT_ALIGNMENT
    #define TestJNI_LEFT_ALIGNMENT 0.0f
    #undef TestJNI_RIGHT_ALIGNMENT
    #define TestJNI_RIGHT_ALIGNMENT 1.0f
    #undef TestJNI_serialVersionUID
    #define TestJNI_serialVersionUID -7644114512714619750LL
    #undef TestJNI_serialVersionUID
    #define TestJNI_serialVersionUID 4613797578919906343LL
    #undef TestJNI_INCLUDE_SELF
    #define TestJNI_INCLUDE_SELF 1L
    #undef TestJNI_SEARCH_HEAVYWEIGHTS
    #define TestJNI_SEARCH_HEAVYWEIGHTS 1L
    #undef TestJNI_OPENED
    #define TestJNI_OPENED 1L
    #undef TestJNI_serialVersionUID
    #define TestJNI_serialVersionUID 4497834738069338734LL
    #undef TestJNI_DEFAULT_CURSOR
    #define TestJNI_DEFAULT_CURSOR 0L
    #undef TestJNI_CROSSHAIR_CURSOR
    #define TestJNI_CROSSHAIR_CURSOR 1L
    #undef TestJNI_TEXT_CURSOR
    #define TestJNI_TEXT_CURSOR 2L
    #undef TestJNI_WAIT_CURSOR
    #define TestJNI_WAIT_CURSOR 3L
    #undef TestJNI_SW_RESIZE_CURSOR
    #define TestJNI_SW_RESIZE_CURSOR 4L
    #undef TestJNI_SE_RESIZE_CURSOR
    #define TestJNI_SE_RESIZE_CURSOR 5L
    #undef TestJNI_NW_RESIZE_CURSOR
    #define TestJNI_NW_RESIZE_CURSOR 6L
    #undef TestJNI_NE_RESIZE_CURSOR
    #define TestJNI_NE_RESIZE_CURSOR 7L
    #undef TestJNI_N_RESIZE_CURSOR
    #define TestJNI_N_RESIZE_CURSOR 8L
    #undef TestJNI_S_RESIZE_CURSOR
    #define TestJNI_S_RESIZE_CURSOR 9L
    #undef TestJNI_W_RESIZE_CURSOR
    #define TestJNI_W_RESIZE_CURSOR 10L
    #undef TestJNI_E_RESIZE_CURSOR
    #define TestJNI_E_RESIZE_CURSOR 11L
    #undef TestJNI_HAND_CURSOR
    #define TestJNI_HAND_CURSOR 12L
    #undef TestJNI_MOVE_CURSOR
    #define TestJNI_MOVE_CURSOR 13L
    #undef TestJNI_NORMAL
    #define TestJNI_NORMAL 0L
    #undef TestJNI_ICONIFIED
    #define TestJNI_ICONIFIED 1L
    #undef TestJNI_MAXIMIZED_HORIZ
    #define TestJNI_MAXIMIZED_HORIZ 2L
    #undef TestJNI_MAXIMIZED_VERT
    #define TestJNI_MAXIMIZED_VERT 4L
    #undef TestJNI_MAXIMIZED_BOTH
    #define TestJNI_MAXIMIZED_BOTH 6L
    #undef TestJNI_serialVersionUID
    #define TestJNI_serialVersionUID 2673458971256075116LL
    #undef TestJNI_EXIT_ON_CLOSE
    #define TestJNI_EXIT_ON_CLOSE 3L
    * Class:     TestJNI
    * Method:    init
    * Signature: ()V
    JNIEXPORT void JNICALL Java_TestJNI_init
      (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endifC code TestJNI.c
    #include "TestJNI.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_TestJNI_init
      (JNIEnv *env, jobject ob){
      printf("TESTING JNI CALL");
    }gcc options are as follows to get the shared library:
    gcc -fPIC -pthread -g -Wall -D_REENTRANT -I/vobs/3p/jdk1.6.0_10/linux/include/linux -I/vobs/3p/jdk1.6.0_10/linux/include/ -c TestJNI.c -o TestJNI.o
    gcc -z defs -pthread -D_REENTRANT -Wl,-soname,libnative.so -shared -o libtestJNI.so TestJNI.o -lcAny help is appreciated. I am not sure what i am doing wrong here.
    Running the same code on a 32 bit jvm with a 32 bit shared library works.

    Hi,
    I was also having a problem under 64 bit, Now I am certain that if ur Java code makes a call to the DLL, make sure that DLL is compiled under 64 bit compiler and not 32 bit compiler. This is the mistake I made and the JVM was throwing unsatisfied link error. Now this DLL (compiled under 64 bit) could call a 32 bit dll, I dont think that should be a problem.
    Hope it helps.
    Subu

  • [b]Two Interfaces with same method signature[/b]

    Hi,
    I am having 2 interfaces which does have same method signature and
    return type. In such case a class that implements these intefaces and overide
    the method . In such case which method will execute . The method of class A or
    class B otherwise one will be ignored by the JVM and other will be executed or
    not???
    For eg,
    interface A
    public void getData();
    interface B
    public void getData();
    class InterfaceTest implements A,B
    public void getData()
    System.out.println("Inside the getData()");
    public static void main(String args[])
    InterfaceTest interTest=new InterfaceTest();
    interTest.getData(); // Which method will execute Class A or B.
    Please do provide an answer for this. I will be waiting for ur reply...
    Thanks,
    M.Ananthu

    there is but one implementation, so why bother ?
    what's more, you're talking about "class A" and "class B" when you defined A and B as interfaces
    seems blurry in your mind...

Maybe you are looking for