Increase JVM memory size in build.xml?

Hi,
I want to know if it is possible to increase the JVM memory size in the "build.xml" file of my java fx project itself?If so,how to go about it?
Thanks a lot.

I think you can achieve that by specifying <fx:jvmarg>.
For example:
<fx:deploy width="${applet.width}"
               height="${applet.height}"   
               embedJNLP="true"
               nativeBundles="all"
                  outdir="${dist.dir}" 
               outfile="${application.title}"
               verbose="true">
     <!--
     Increase JVM memory size.
     http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm#CIAGFFIF
     -->
     <fx:platform javafx="2.2+" j2se="7.0">
          <fx:jvmarg value="-Xms64M"/>
          <fx:jvmarg value="-Xmx512M"/>
     </fx:platform>
</fx:deploy>Hope that helps!
Edited by: ytw on Nov 16, 2012 12:30 PM

Similar Messages

  • Increasing JVM memory size at runtime

    I want to increase the JVM memory size at runtime.
    I found out that I can do this with oracle.aurora.vm.OracleRuntime.setMaxMemorySize(...)
    Which JAR do I have to put on the classpath to be able to acces OracleRuntime???
    What would be the proper implementation to incerase the memory size?

    aurora.zip

  • How to Increase the memory size of a File in the Application Server

    Hello Abaper's
    I have generated a XML file for the data of  internal table (with 10 Records). When i download , i can see the XML file for the Entire 10 Records.
    But , while transferring the XML file to Applicationserver , it's  transferring only upto max 4 Records.I     assume that the memory is insufficient to  allocate 10  Records. Can we Increase the Memory size of the File on Application server. OR,  is there any error in My Source Code.
    Code i used to Transfer the XML File to Application server.
    OPEN DATASET FNAME FOR OUTPUT IN BINARY MODE.
    IF sy-subrc EQ 0.
       LOOP AT it_xmltab INTO wa_xmltab.
           TRANSFER wa_xmltab TO FNAME.
       ENDLOOP.
    ELSE.
      MESSAGE e004(zmsg5) WITH 'File FNAME not opened'.
    ENDIF.
    CLOSE DATASET FNAME.
    Regards
    Jv

    Hi,
    DATA : filename TYPE rlgrap-filename.
    DATA : doc_name TYPE char30.
    DATA : bin_size TYPE i.
    SELECT matnr matkl meins
           FROM mara INTO TABLE it_mara
           UP TO 10 ROWS.
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
      EXPORTING
        i_filename           = filename
        i_xml_doc_name       = doc_name
      IMPORTING
        pe_bin_filesize      = bin_size
      TABLES
        i_tab_sap_data       = it_mara         "  contains  10 Records
      CHANGING
        i_tab_converted_data = it_xmltab.
    placing XML File in Appl. Server
    DATA : FNAME(60) VALUE 'xyz_File'.
    DATA : num TYPE i.
    DATA : xmldata(256) TYPE x.
      For Writing The data in Application Server
    OPEN DATASET FNAME FOR OUTPUT IN BINARY MODE. " ENCODING DEFAULT.
    IF sy-subrc EQ 0.
      LOOP AT it_xmltab INTO wa_xmltab.
        TRANSFER wa_xmltab TO FNAME.
      ENDLOOP.
    ELSE.
      MESSAGE e004(zmsg5) WITH 'File FNAME not opened'.
    ENDIF.
    CLOSE DATASET FNAME.
      For Reading The data in Application Server
    OPEN DATASET FNAME FOR INPUT IN BINARY MODE. " ENCODING DEFAULT.
    DO.
      IF sy-subrc EQ 0.
        READ DATASET fname INTO xmldata.
        WRITE :/ xmldata.
        Clear xmldata.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    CLOSE DATASET FNAME.
    at runtime i can see   
    it_mara  --> contain 10 records
    it_xmltab --> contain 7 lines (Each line size is 255 char). This table have XML format data,  (unknow format , with all numeric 
                        digits)
    it_xmltab is trasferred to application server , but the xml format is generated upto 4 records, and for the remaining records
    the XML format is not generated.
    the XML data in application server file is
    <?xml version="1.0"?><TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY1</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">PC
    </MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY2</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">
    PC </MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000001</MATNR><MEINS Datatype="C" Length="6">EA</MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000002</MATNR
    Regards
    JV

  • Increase JVM memory using Java Code

    Hi Friends
    I am in a critical situtation and not able get the solution. My application is huge and need of increase in JVM memory. I am able to increase JVM memory in command prompt
    java -Xmx500m classname
    Simarly I am able to run jar file also
    java -Xmx500m -jar sample.jar
    I need to know how to set JVM memory for executable JAR. When I just double-click the JAR application load and i am getting Out Of Memory. I dont what ti use command prompt to execute. Please help me with this program. Thanks in advance

    I gone through the code of ImageJ software. ImageJ is
    a freeware and wrtten in Java. They are setting jvm
    memory in code, getting the description of the code
    was difficult.
    long memoryBytes =
    s = Runtime.getRuntime().maxMemory();
         long memoryMB = memoryBytes/1024/1024;
         long memoryDiff = memoryMB - 64;
    String s = "Runtime.maxMemory: " + memoryMB +
    B + "MB\n";
         s = s + "Difference: " + memoryDiff + "MB";
         System.out.println("s..." + s);
    The above code will give you the memory allocated for JVM. Yes.
    When there is a way to find the memory space,
    there should be some way to set it. No.
    I am still trying to set the memory in code r using external resource.Read reply 4.
    I want to just give the executable jar to users. They
    are not satisified with the bat file and hidding
    command prompt in background.You may be able to use Runtime.exec() to launch another instance of java, with whatever heap setting you desire.

  • How to increase JVM memory for Web Logic 10.3.3 - OSB 11g

    Hello folks,
    I am running OSB 11g on WebLogic 10.3.3 to call some services passing large XMLs requests. These XMLs are something around 10mb each. Unfortunately, I got errors regarding memory.
    I am using Eclipse with OSB plugin to develop, and I have configured the weblogic server to start up it from the eclipse, thus I don't need to start up through command line.
    I would like to know where I can change the memory arguments to start up the JVM which runs the WebLogic server. As I am starting up the server from eclipse, I can't change the memory size args from command line.
    Is there a file where those arguments are stored? or some configuration on WebLogic console which I can increase the Xms and Xmx ?
    The JVM is jrockit_160_17_R28.0.0-679
    This is the eclipse console output when the server is starting up:
    JAVA Memory arguments: -Xms256m -Xmx512m
    WLS Start Mode=Development
    CLASSPATH=C:\Davi\osb\mw_1033\WLSERV~1.3\server\ext\jdbc\oracle\11g\ojdbc6dms.jar;;C:\Davi\osb\mw_1033\OSB_OR~1\modules\features\osb.server.modules_11.1.1.3.jar;C:\Davi\osb\mw_1033\patch_wls1033\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Davi\osb\mw_1033\patch_oepe1033\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Davi\osb\mw_1033\JROCKI~1.0-6\lib\tools.jar;C:\Davi\osb\mw_1033\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Davi\osb\mw_1033\WLSERV~1.3\server\lib\weblogic.jar;C:\Davi\osb\mw_1033\modules\features\weblogic.server.modules_10.3.3.0.jar;C:\Davi\osb\mw_1033\WLSERV~1.3\server\lib\webservices.jar;C:\Davi\osb\mw_1033\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Davi\osb\mw_1033\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Davi\osb\mw_1033\osb_ora11g\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\Davi\osb\mw_1033\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\Davi\osb\mw_1033\OSB_OR~1\lib\version.jar;C:\Davi\osb\mw_1033\OSB_OR~1\lib\alsb.jar;C:\Davi\osb\mw_1033\OSB_OR~1\3rdparty\lib\j2ssh-ant.jar;C:\Davi\osb\mw_1033\OSB_OR~1\3rdparty\lib\j2ssh-common.jar;C:\Davi\osb\mw_1033\OSB_OR~1\3rdparty\lib\j2ssh-core.jar;C:\Davi\osb\mw_1033\OSB_OR~1\3rdparty\lib\j2ssh-dameon.jar;C:\Davi\osb\mw_1033\OSB_OR~1\3rdparty\classes;C:\Davi\osb\mw_1033\OSB_OR~1\lib\external\log4j_1.2.8.jar;C:\Davi\osb\domains\INFOLE~1\config\osb;C:\Davi\osb\mw_1033\WLSERV~1.3\common\derby\lib\derbynet.jar;C:\Davi\osb\mw_1033\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\Davi\osb\mw_1033\WLSERV~1.3\server\lib\xqrl.jar
    PATH=C:\Davi\osb\mw_1033\patch_wls1033\profiles\default\native;C:\Davi\osb\mw_1033\patch_oepe1033\profiles\default\native;C:\Davi\osb\mw_1033\WLSERV~1.3\server\native\win\32;C:\Davi\osb\mw_1033\WLSERV~1.3\server\bin;C:\Davi\osb\mw_1033\modules\ORGAPA~1.1\bin;C:\Davi\osb\mw_1033\JROCKI~1.0-6\jre\bin;C:\Davi\osb\mw_1033\JROCKI~1.0-6\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Application Virtualization Client;C:\Program Files\Attachmate\Reflection\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Davi\osb\mw_1033\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Oracle JRockit(R) (build R28.0.0-679-130297-1.6.0_17-20100312-2123-windows-ia32, compiled mode)
    Starting WLS with line:
    C:\Davi\osb\mw_1033\JROCKI~1.0-6\bin\java -jrockit -Xms256m -Xmx512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\Davi\osb\mw_1033\WLSERV~1.3\server\lib\weblogic.policy -Xverify:none -da -Dplatform.home=C:\Davi\osb\mw_1033\WLSERV~1.3 -Dwls.home=C:\Davi\osb\mw_1033\WLSERV~1.3\server -Dweblogic.home=C:\Davi\osb\mw_1033\WLSERV~1.3\server -Ddomain.home=C:\Davi\osb\domains\INFOLE~1 -Dcommon.components.home=C:\Davi\osb\mw_1033\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=C:\Davi\osb\mw_1033\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=C:\Davi\osb\domains\INFOLE~1\config\FMWCON~1 -Doracle.server.config.dir=C:\Davi\osb\domains\INFOLE~1\config\FMWCON~1\servers\AdminServer -Doracle.security.jps.config=C:\Davi\osb\domains\INFOLE~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=C:\Davi\osb\domains\INFOLE~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Davi\osb\domains\INFOLE~1\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=C:\Davi\osb\mw_1033\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Davi\osb\mw_1033\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Davi\osb\mw_1033\patch_wls1033\profiles\default\sysext_manifest_classpath;C:\Davi\osb\mw_1033\patch_oepe1033\profiles\default\sysext_manifest_classpath weblogic.Server
    Thanks in advance,
    Davinod
    Edited by: user13631313 on Jan 10, 2011 10:07 AM

    Hi Davinod,
    Yes, the correct place is to change the memory arguments in the "setDomainEnv.cmd", however can you confirm if the changed memory arguments were reflected in the logs or not.
    If yes then you need to try to increase the memory arguments again and test which is the best working memory argument suitable for your environment, this would take some trials.
    However if the memory arguments are still not reflected then try to set it properly as shown below:
    set MEM_ARGS=-Xms1024m -Xmx1024m
    Regards,
    Ravish Mody
    http://middlewaremagic.com/weblogic/
    Come, Join Us and Experience The Magic…

  • 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 !!!

  • How to increase JVM Process size for WebLogic running SOA Applications.

    Hi,
    I believe 32 Bit OS can address up to 4GB memory so theoretically 32 Bit JVM can use 4GB but practical convention is 2GB as other 2GB is used by OS itself and also this default JVM Process size is set somewhere and I also believe that if JVM is 32 bit on 64Bit OS even though JVM will run on 32Bit Virtual Machine so JVM does not know that it is 64Bit OS in that case again it can use max Process default size up to 2GB.
    And for 64Bit JVM, I can allocate more than 4GB depend on my available RAM size to Xmx, MaxPermSize parameters in java.exe file and after that I can set the same value in “setSOADomainEnv.cmd” or to “setDomainEnv.cmd” file.
    But I am 99% sure by just assigning more memory value to Xmx, MaxPermSize in “setSOADomainEnv.cmd” file only won’t work (not setting Xmx in java.exe), if it would have worked then in my case when I was assigning 1536 to Xmx in “setSOADomainEnv.cmd” file then why it was showing out of memory error. I think that is because it was only taking default 2GB for my 32 Bit JVM not considering 3GB or 4GB. So i think i have to change default memory size what JVM can use (<http://www.wikihow.com/Increase-Java-Memory-in-Windows-7> but i am using windows 8 so for that I don’t know the option to change this default Process Size)
    I also believe that first JVM start and before start it check how much memory it can use from it’s own –Xmx parameter in some ware configuration or java.exe file and after that it allocate that much size of JVM Process Memory in RAM then after it loads Weblogic or Java Applications in its (Heap + Non-heap + Native Area) which are parts of JVM Process memory
    I read post on :< http://stackoverflow.com/questions/3143579/how-can-jvm-use-more-than-4gb-of-memory > and < http://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control >
    All used  : 
    java -Xmx64m -classpath ".:${THE_CLASSPATH}" ${PROGRAM_NAME}
    java –Xmx6g     //command which will call java/JVM interpreter which will hold –Xmx parameter to set Heap size for JVM
                                    before JVM comes in memory (JVM process memory)
    now my question is can I manually open any configuration file or java.exe same like “setSOADomainEnv.cmd” or “setDomainEnv.cmd” (I know since java.exe is exe I can’t open simply but I want similar work around)
    so that I don’t need to type java –Xmx6g every time when I run weblogic (and then later I can change weblogic “setDomainEnv.cmd” Xmx and PermSize to more than default size 4GB to 5GB or 6GB in the case of 64Bit OS)
    Please correct me if I am wrong in my understanding.
    Thanks.

    These days the VM will detect a "server" machine and set up the memory appropriate for that.
    You can create a simple java console application and have it print the memory settings (find the appropriate java class fort that.)
    There is of course the possibility that your application is running out of memory because it is doing something wrong and not because the VM doesn't have enough memory.  You can force that in a test setup by LOWERING the maximum amount of memory and thus making it more likely that an out of memory exception will occur.

  • Increase JVM heap size when calling it from C++

    I have a program that loads images and only works properly increasing heap.
    java McVImg
    gives me an Out of memory error.
    java -Xmx120M McVImg
    works fine.
    If I want to call JVM from a C++ program using Java native interface,
    How should I increase JVM heap ?
    Thanks in advance. Ignasi Villagrasa.

    I'm trying to do what you told me and it doesn't work.
    I show the C++ code I'm using:
    void JavaParam::LoadJVM()
         JavaVMInitArgs vm_args;
         JavaVMOption options[2];
    jint res;
         vm_args.version = JNI_VERSION_1_2;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
         if (res < 0)
    fprintf(stderr, " Requested version is not supported\n");
              fputs ("Requested version is not supported\n",traza);
              fflush(traza);
    exit(-1);
         //Establecemos classpath
         //Atencion el classpath ser� el jar
         //options[0].optionString = "-Djava.class.path=..";
         options[0].optionString = "-Djava.class.path=..\\mcjava.jar";
         options[1].optionString = "-Xmx120M";
         //Nuevos argumentos
    vm_args.options=options;
         vm_args.nOptions = 2;
         vm_args.ignoreUnrecognized = JNI_FALSE;
         //Creamos Maquina Virtual Java
    res = JNI_CreateJavaVM(&jvm,(void **)&env,&vm_args);
    if (res < 0)
    fprintf(stderr, "Can't create Java VM: %d\n",(int)res);
              fprintf(traza, "Can't create Java VM RES: %d \n",(int)res);
              fflush(traza);
    exit(1);
         jvm_creada = 1;
    Is that right ?
    Thanks in advance. Ignasi Villagrasa.

  • Tomcat 6 increase JVM memory ?

    How can I increase the memory of Apache Tomcat 6. Earlier i used to do it in catalina.bat. Now am not sure how to do them, as I have tomcat exe services in bin folder (OS:Windows). It would be great if any one could help me resolve this issue.
    Thanks in advance.

    hope that by now, you have the answer. If not, you can try the following:
    Run \bin\tomcat6w.exe.
    In the new window that is displayed, select the Java tab and change the following as per your requirements:
    Initial memory pool
    Maximum memory pool

  • What would make a JVM memory size 1.9GB ?

    This is on Solaris 2.6, JDK 1.2.2_05a, JDK1.2.2_07, possibly JDK 1.3 (it crashed).
    WLS 5.1, SP8. With inline_instrs_jit=0.
    This is the [heap] segment shown by /usr/proc/bin/pmap. This is native heap, it is
    NOT the Java Heap.
    I know it could be the Type 2 db drivers - but I doubt it.
    With JDK1.3 we set -XX:MaxPermSize=128m - it crashes after an hour.
    One part of the application creates its own threads for some parallel processing.
    Is this a known
    problem with the JVMs?
    Any help is much appreciated.
    Mike Reiche

    What is the 'Break difference' that the debug JVM shows? Is that the Java Heap? Or
    is memory in the C Heap that is wasted by fragmentation?
    ============== C Heap Report ========================
    mmap space 300515328
    Committed space 95690752
    Allocated space 34049316
    Break difference 66060288
    Breakdown by type:
    ClassSpace 15252128
    JITCompiledStackMaps 5277188
    StackMap 1892672
    Dependency 1856760
    utf8_space 1854838
    untagged 1783520
    basicBlocksState 1664992
    utf8_table 1055903
    Class 811520
    JITPrestub 610480
    NearClass 531360
    CardObjectTable 386048
    JavaStack 257024
    CheckingDone 200367
    SummaryCardTable 193024
    name_loader_cache_entry 65976
    ScratchRecord 65548
    basic_block_t 50896
    IntfMethodTable 48960
    stringTableOverflowRecord 46480
    BitVectorElem 32768
    ObjectMap 30724
    ClassName 28407
    Clinit 18752
    Table_mem 18628
    LoaderConstraintsTableEntry 11668
    JITInlineByteCode 1928
    LoaderConstraintsTableLoaderEntry 520
    stateVecBuf 237
    =====================================================
    Total GC time: 2987981 ms
    - Mike
    "[email protected]" Mike wrote:
    >
    >
    Aslo - GC[1] are taking way long (Debug JVM) - I'm used to seeing them taking
    500
    ms with the regular JVM. With -ms32m -m256m - I wanted GC[1] to run often
    because
    that has helped with other memory problems in the past - it doesn't work
    so hot here.
    GC[1] in 5514 ms: (38Mb, 0% free) -> (38Mb, 69% free)
    GC[1] in 6300 ms: (38Mb, 0% free) -> (38Mb, 65% free)
    GC[1] in 7130 ms: (38Mb, 0% free) -> (38Mb, 64% free)
    GC[1] in 6158 ms: (38Mb, 2% free) -> (38Mb, 62% free)
    GC[1] in 6171 ms: (38Mb, 0% free) -> (38Mb, 65% free)
    GC[1] in 6885 ms: (38Mb, 0% free) -> (38Mb, 64% free)
    GC[1] in 7403 ms: (38Mb, 0% free) -> (38Mb, 61% free)
    GC[1] in 689101:25:49 PM PST {218} - Evaluation is: true
    GC[1] in 6545 ms: (38Mb, 1% free) -> (38Mb, 61% free)
    GC[1] in 7459 ms: (38Mb, 0% free) -> (38Mb, 62% free)
    GC[1] in 6861 ms: (38Mb, 2% free) -> (38Mb, 58% free)
    GC[1] in 6090 ms: (38Mb, 0% free) -> (38Mb, 56% free)
    GC[1] in 6413 ms: (38Mb, 0% free) -> (38Mb, 60% free)
    GC[1] in 8230 ms: (38Mb, 1% free) -> (38Mb, 58% free)
    GC[1] in 7649 ms: (38Mb, 0% free) -> (38Mb, 54% free)
    GC[1] in 7912 ms: (38Mb, 0% free) -> (38Mb, 55% free)
    GC[1] in 7696 ms: (38Mb, 1% free) -> (38Mb, 57% free)
    GC[1] in 6543 ms: (38Mb, 1% free) -> (38Mb, 60% free)
    GC[1] in 7036 ms: (38Mb, 1% free) -> (38Mb, 59% free)
    GC[1] in 7483 ms: (38Mb, 0% free) -> (38Mb, 56% free)
    GC[1] in 5132 ms: (38Mb, 1% free) -> (38Mb, 59% free)
    GC[1] in 8186 ms: (38Mb, 0% free) -> (38Mb, 53% free)
    GC[1] in 5691 ms: (38Mb, 0% free) -> (38Mb, 58% free)
    GC[1]01:35:49 PM PST {575} - Evaluation is: true
    GC[1] in 8176 ms: (38Mb, 0% free) -> (38Mb, 46% free)
    GC[1] in 8463 ms: (38Mb, 0% free) -> (38Mb, 47% free)
    GC[1] in 7342 ms: (38Mb, 0% free) -> (42Mb, 41% free)
    GC[1] in 6920 ms: (42Mb, 0% free) -> (49Mb, 41% free)
    GC[1] in 8610 ms: (49Mb, 1% free) -> (60Mb, 40% free)
    GC[1] in 9581 ms: (60Mb, 1% free) -> (60Mb, 50% free)
    GC[1] in 10514 ms: (60Mb, 0% free) -> (60Mb, 59% free)
    GC[1] in 9865 ms: (60Mb, 0% free) -> (60Mb, 60% free)
    GC[1] in 11323 ms: (60Mb, 0% free) -> (60Mb, 57% free)
    GC[1] in 18768 ms: (60Mb, 0% free) -> (60Mb, 60% free)
    GC[1] in 11147 ms: (60Mb, 0% free) -> (60Mb, 55% free)
    GC[1] in 7293 ms: (60Mb, 0% free) -> (60Mb, 42% free)
    GC[1] in 9372 ms: (60Mb, 0% free) -> (60Mb, 53% free)
    GC[1] in 8814 ms: (60Mb, 0% free) -> (60Mb, 55% free)
    GC[1] in 9695 ms: (60Mb, 1% free) -> (60Mb, 54% free)
    GC[1] in 7309 ms: (60Mb, 0% free) -> (60Mb, 53% free)
    GC[1] in 8713 ms: (60Mb, 0% free) -> (60Mb, 54% free)
    GC[1] in 11955 ms: (60Mb, 0% free) -> (60Mb, 55% free)
    GC[1] in 12685 ms: (60Mb, 1% free) -> (60Mb, 55% free)
    GC[1] in 18906 ms: (60Mb, 0% free) -> (60Mb, 58% free)
    GC[1] in 13333 ms: (60Mb, 0% free) -> (60Mb, 51% free)
    "[email protected]" <[email protected]> wrote:
    Rob -
    Thanks for your attention -
    We create lots of threads - up to five threads for each DB hit (i didn't
    design it).
    The multi-threading will be disabled/removed and tested later on today.
    Both 'top'
    and pstack show around 85 threads.
    I've read articles on the bea newsgroups about WL hanging on to threadreferences
    so that the threads could not be GC'ed, but it sounded more like a customer's
    impression
    of what might be going on than something from BEA engineering.
    Right now we are running with the 1.2.2_05a 'Debug' JVM with -verbose:gc
    -verbose:gc
    -verbose:gc
    JVMARGS=verbose_c_heap,inline_instrs_jit=0
    Unfortunately, some of the code being tested is now broken and not being
    excercised
    today. I will keep you posted.
    - Mike
    Rob Woollen <[email protected]> wrote:
    How many threads are you creating?
    Each thread uses some memory (stack etc.), but 1.9GB would be a lot of
    thread creation.
    -- Rob
    Mike Reiche wrote:
    This is on Solaris 2.6, JDK 1.2.2_05a, JDK1.2.2_07, possibly JDK 1.3
    (it
    crashed).
    WLS 5.1, SP8. With inline_instrs_jit=0.
    This is the [heap] segment shown by /usr/proc/bin/pmap. This is nativeheap, it is
    NOT the Java Heap.
    I know it could be the Type 2 db drivers - but I doubt it.
    With JDK1.3 we set -XX:MaxPermSize=128m - it crashes after an hour.
    One part of the application creates its own threads for some parallelprocessing.
    Is this a known
    problem with the JVMs?
    Any help is much appreciated.
    Mike Reiche--
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • Can I set JVM memory size when running applets?

    Hi,
    I have downloaded an applet that renders panoramic images and
    I have a problem with Java memory. I remember that default maximum
    size that applet can use is 70MB, and the problem is 70MB is
    not enough when rendering big images. It is OK when I add
    "-Xmx -Xms" parameters in the Java Control but I cannot tell
    everyone who wants to see my images to go control panel, add
    parameters etc..
    So my question is...
    Is it possible add "-Xmx -Xms" parameters inside the applet file
    so that these parameters run automatically when executing applet?
    Thanks in advance for your reply!
    Hyung

    Hi,
    I have downloaded an applet that renders panoramic
    images and
    I have a problem with Java memory. I remember that
    default maximum
    size that applet can use is 70MB, and the problem is
    70MB is
    not enough when rendering big images. It is OK when I
    add
    "-Xmx -Xms" parameters in the Java Control but I
    cannot tell
    everyone who wants to see my images to go control
    panel, add
    parameters etc..
    So my question is...
    Is it possible add "-Xmx -Xms" parameters inside the
    applet file
    so that these parameters run automatically when
    executing applet?
    Thanks in advance for your reply!
    HyungA potential workaround I would try is is use ByteBuffers
    (T)

  • Increase the memory

    Hi,
    how to increase the memory size of a jvm.
    could u plz. help me.
    regards
    AMJ

    command line arg -Xms128m to get 128 megs

  • Maximum Memory Size & Memory Size

    Will a server's memory automatically increase from Memory Size to Maximum Memory Size as the VM requires it? Or is this only valid for adding memory to the Memory Size value manually?

    keithrust wrote:
    Will a server's memory automatically increase from Memory Size to Maximum Memory Size as the VM requires it? Or is this only valid for adding memory to the Memory Size value manually?No, there is no automatic increase in memory. The max memory size just specifies the maximum amount to which you can manually adjust the memory of a running VM. I've now taken to setting the max memory size to the total available memory on my Oracle VM Servers, with memory size set to something reasonable. This way, I can adjust right up to the limit of physical memory without rebooting.

  • Hi,URGENT--Memory size of binary Increasing due to multithreading in Pro*C

    I got stuck in Multhithreading in PRO*C.
    Memory size of my binary keeps on increasing.
    Flow is like this.
    My main thread spawns multiple threads of two types of threads. Both types of threads connect to different dbs.
    In other words, i need to have multiple connections with to different db's i.e. configure multiple threads for same.
    For this i take sql context variable in each thread and pass it to connect_to_db func. for connection. Then that thread use corresponding sql context variable for pl/sql function( CHANGE_INPUT) call.
    This keeps of memory size of my binary inceasing.
    In above code T_ABILLITY_INPUT is of object type whose ott converted header and out type file is already included.
    CHANGE_INPUT is pls/sql function
    Can any help me out in using multithreading in pro*c.
    It's very-very URGENT, This is creating problem in live site.
    Thaks in Advance
    Code for process and connect_to_db function is same for both types of threads different is in object types to get process
    sample code of connect_to_db
    int connect_to_db(char username, char password, char dbname,sql_context ctx,char *ErrorMessage)
    int ret;
    char ConnString[50] = {0,};
    sprintf(ConnString, "%s@%s", username, dbname);
    EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error--", ErrorMessage);
    EXEC SQL ENABLE THREADS;
    EXEC SQL CONTEXT ALLOCATE :*ctx;
    EXEC SQL CONTEXT USE :*ctx;
    EXEC SQL CONNECT :ConnString IDENTIFIED BY :password;
    if(sqlca.sqlcode < 0)
    return -1;
    return 0;
    sample code for pl/sql function call
    int process(double num,char Flag,char dbName,char dbExtApp,char dbExtUname,char *
    dbExtRef,sql_context ctx, char *err)
    T_ABILLITY_INPUT *typAbilityInputObj;
    T_ABILLITY_INPUT_ind *typAbilityInputObj_ind;
    T_ABILLITY_INPUT *typAbilityInputObj2;
    T_ABILLITY_INPUT_ind *typAbilityInputObj2_ind;
    //declaration of some host variables
    int iretVal=0;
    char extUser[255];
    char extApp[255];
    char extRef[30];
    char us[ABREF_LENGTH];
    char app[ABREF_LENGTH];
    char ref[ABREF_LENGTH];
    memset(extUser,'\0',sizeof(extUser));
    memset(extApp,'\0',sizeof(extApp));
    memset(extRef,'\0',sizeof(extRef));
    memset(us,'\0',ABREF_LENGTH);
    memset(app,'\0',ABREF_LENGTH);
    memset(ref,'\0',ABREF_LENGTH);
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL OBJECT CREATE :typAbilityInputObj:typAbilityInputObj_ind;
    EXEC SQL OBJECT CREATE :typAbilityInputObj2:typAbilityInputObj2_ind;
    EXEC SQL OBJECT SET EXTERNAL_USER,EXTERNAL_APPLICATION,EXTERNAL_REFERENCE OF : typAbili
    tyInputObj TO :extUser, :extApp, :extRef;
    EXEC SQL CALL CHANGE_INPUT(:typAbilityInputObj,:typAbilityInputObj2) into iretVal;
    EXEC SQL OBJECT GET EXTERNAL_USER,EXTERNAL_APPLICATION,EXTERNAL_REFERENCE FROM :typAbil
    ityInputObj2 INTO :us, :app, :ref;
    EXEC SQL OBJECT UPDATE :typAbilityInputObj;
    EXEC SQL OBJECT UPDATE :typAbilityInputObj2;
    EXEC SQL OBJECT RELEASE :typAbilityInputObj;
    EXEC SQL OBJECT RELEASE :typAbilityInputObj2;
    EXEC SQL OBJECT DELETE :typAbilityInputObj;
    EXEC SQL OBJECT DELETE :typAbilityInputObj2;
    EXEC SQL COMMIT;
    EXEC SQL OBJECT CACHE FREE ALL;
    }

    This must be my last last thing.  AHT was on an iMac I bought in 2009.  It was included on my "disk 2" along with several other applications.  When I wiped and installed the full Lion, AHT was gone.  Same is true for the full Mountain Lion installation media.  It does not have AHT.  I'm not at all sure how to get it back from Apple.
    I was able to find it on my SL disc 2 and extract it again from that.  Disc 2 won't install on Mountain Lion (the packages are too out of date) but the AHT pkg does.
    Since you have it, consider packing it up and keeping it safe.  Maybe someone who knows AHT better than I can elaborate on AHT.  From what I've seen, you get it when your mac ships but if you ever wipe and reinstall the OS, you lose it.

  • Epson Print CD - "Increase memory size"

    Bit of a long shot I guess, but I'm trying to print onto a CD using Epson Print CD... However, when I go to print, it comes up with a message that says "Please increase memory size for print CD", and won't go any further. I'm guessing that has something to do with setting preferences in OSX, but I have no idea what to do...
    Any ideas?

    Greg,
    Actually the versions are newer. I just visited the Epson website and found this info. Thank you for the pointer.
    Here's the PowerPC version for your iMac iSight 2.5aAas for 10.2 to 10.4, and Intel version, if you got any Intel Macs 3.0aAs for 10.4.4 and above on the U.S. website. The U.K. links for the same printer are here: PowerPC version 2.5, and Intel version 3.0. Not sure if there is a difference, but you might want to try the U.S. version of the drivers. Realize we here in the U.S. spell colour, color!

Maybe you are looking for

  • Using Custom Datasource to load Cube

    Hi Guys, Ok the scenario, I have created a custom datasource that is pulling data from R/3. The datasource is working correctly because the the number of records in R/3 matches those that are being pulled into my PSA table for my Datasource....so all

  • Problem with append table

    Hi, i want to insert a line into a internal table ; the type of table is a type of table for example Z_MYSTRUCT. Z_MYSTRUCT is a type of line so to insert a new line into my table i can't do this : data : l_new type Z_MYSTRUCT. l_new-field1 = 'value'

  • Can't open attachments or links from my email

    Visiting grandchild set up Foxfire from me on my MAC Leopard. Now neither attachments, photos or links will open in my email which is Charter. == This happened == Every time Firefox opened == since recent installation

  • Asset:load

    Hi, for asset:load from database which table will be queried for retriving the data. Thanks in advance

  • Wired guest lan authentication through NGS

    Hello Guys, We have 5508 controller running ver 7.2.110.0.We have configured wireless guest and wired guest WLAN profiles and assosicated necessary dynamic interfaces to it. The authentication for both wireless and wired guest is through Cisco NGS[NA