How to increase the Java Heap Space for a main method

Hello all,
after a given number of calculations inside a class with main-method, I get an OutOfMemoryError (Java Heap Size).
So I'm just trying to increase the Heap Size Creator uses, but it won't work.
After reading a lot of posts and online-articles, I tried the following:
1) I changed the -Xms and -Xmx options (to 512m) both in
$CREATOR/SunAppServer8/domains/creator/config/domain.xml and
$CREATOR/etc/creator.conf (this file also points to the Creator built-in JDK)
2) additionally I tried to start Creator from the console with the respective option:
./creator -J-Xmx512m
The memory toolbar shows the right value, but when I use
System.out.println("JVM maximum memory:\t"+Runtime.getRuntime().maxMemory()/1024+" KB\n");it always says 64 MB, no matter which option I chose in the config-files.
So how can I increase this value?
Regards,
Felix
Message was edited by:
Felice
Message was edited by:
Felice

Thank you very much,
this was an important hint. Additionally I had to create a new "Java Class Library" project with a copy of the needed files (those that are not dependent on the Application Server). Then I could use the option you mentioned.
Unfortunately, when I try to run the file with
java -jar FILENAME.jarit won't work, because the archive is not complete: MANIFEST.MF lacks the main-class and all involved libraries.
I managed to add the main-class attribute manually, but adding all library references seems to be very error-prone.
So does anyone know if I did something wrong or if this is a bug of Creator?
Regards,
Felix

Similar Messages

  • How to increase the Java Heap size ?

    Hi
    I am new to java. I have created a java application and i configured in Eclipse. While running my application it throws an error that
    "Exception in thread "Thread-21" java.lang.OutOfMemoryError: Java heap space"
    i have used threads in my application. Then i searched some forums regarding this. The answer i got is "Increase the java heap size" using
    "java -Xms64m -Xmx256m prog" in command prompt. while running.
    But i am not running my application in command prompt. I used Eclipse to run my application. Here my ultimate question is how to set the heap size while running the application in Eclipse and where to set in Eclipse.
    Kindly help me.
    Regards
    Ramesh E

    i have used 20 threads to extract the datas
    Then parallel i am starting one more thread to process the data. Means that i am starting 21st thread. In thread is throwing the error.
    20 threads:
    for (int i = 0; i < 20; i++) {
    try{
    extrThreads[i] = new Thread(this);
    extrThreads.start();
    }catch (Exception e) {
    System.out.println(e);
    21st Thread:
    public void processdata()throws Exception{
    Thread t = new Thread(this);
    t.start();
    if(t!= null)
    t.join();
    funtion();
    This thread is throwing the error

  • Is there any way to increase the amount of space for all day events?

    I have iCal on my ipad and my phone, and when I look at the daily view or weekly view, only 1 1/2 lines are shown. If I have a few events that are all day (I keep several calendars) then I have to scroll through them one at a time. And with my fingers, sometimes they go by too fast. Does anyone know how to increase the amount of space? I am using an iPad3, and an iPhone 5, both with ios 7.
    Thank you!

    With Mac OS X, there is no way for you to alter the amount of real memory a program is allocated. This is all done dynamically by the OS. OS X's virtual memory management is far better than 'ole OS 9's.
    What are saying about a memory leak? I take it that Safari is continually using more and more memory. How much memory is it usually taking up after a few hours? Perhaps you should just quit and restart Safari every few hours before it begins failing to respond.

  • Any way to increase the default Heap size for all Java VMs in Solaris 8

    Hello,
    I have a java product that deals with large databases under Solaris 8. It is a jar file, started by a cron job every night. Some nights it will fail because it runs out of Heap memory depending on the amount of records it has to deal with. I know that I could increase the java VM heap size with "java -jar -mx YY JARFILE" command but I have other java products that are showing the same behavior, and I would like to correct them all in one shot if possible.
    What I would like to do is find a system or configuration parameter that forces all Java VMs to use a larger MAX Heap size than the default 16M specified in the Man page for Java. Is there a way to accomplish that?
    TIA
    Maizo

    You could always download the source and modify it.

  • JEdit, and the java heap space!

    Guys, I use JEdit...and to run it, the icon's target is:
    c:\Program Files\jEdit 4.3pre2\jedit.jar"
    The problem I have is that the java heap is only 64MB. How do I run JEdit and make the java heap 96MB or more at the same time??? I know how to make the heap bigger every time I run a program in cmd:
    java -Xmx##m classfile
    but how do I change it for when I run JEdit as above???
    Thanks.

    change the shortcut to be
    java -Xmx512m -jar "c:\Program Files\jEdit 4.3pre2\jedit.jar"

  • How to increase the decimals in RPD for some field?

    Hello gurus,
    We have 1 filed in DW name as "EXCHANGE_RATE" when i query it DW it's showing me values with 4 decimal points.
    and same column when i m using in OBIEE frontend, it's giving me values with 2 decimals.
    So how to increase the decimals for that field in RPD?
    we have 10.1.3.4.1 version.
    Thanking You.

    Hello Svee,
    Thanks for ur help, But I found one different way that will make change only to that particular filed.
    Bcz if I will change the database properties that will change the configuration globally to all the fields.
    So what I did is, I went to column properties and change the Data Format to 4 decimals and saved it as System-wide default for that field.
    So, the change that i want will be their only for that filed...
    Though I really appreciate ur help.
    Thanking you.

  • How can I detect Java Heap Space Error?

    Is it possible to detect "Java Heap Space" error logged by Report Viewer Bean?
    It's displayed on screen and Console - but what about API?
    Can I catch it somewhere? Any isError() method? I tried isBusy(), but it does not work - after Heap Space Error, isBusy() still returns true...
    Edit:
    Sometimes, there is NullPointerException logged after Heap Space Error - in this case isBusy() is set to false after five minutes timeout.
    Edited by: mr. regis on Jan 17, 2011 10:27 AM

    Can you show me the link of the bug report?
    A.A.
    This type of functionality is supposed to exist via
    the dom,
    but I don't think it works as advertised in 1.4.x (bug
    reports).

  • How to make the java files compile for a project created outside of Eclipse

    Hi^^,
    I have created a project outside of Eclipse. It has the following folders
    1. config
    2. source
    3. WEB-INF
    I want to execute the project on remote server. Will it compile automatically creating a new folder for .class files corresponding to the source folder or do i need to include a build.xml to enable the project to create a new folder for .class files. Also pls tell me how do I write this build.xml
    Please advise.

    Hi^^,
    Actually I have created a project without using eclipse.
    My source files are inside WEB-INF/source
    Now I want to compile the files using build.xml so that I can create class files. I am using the following build.xml
    <project name="jsp" default="all" basedir="./">
      <property environment="env"/>
      <property file="ArmorJSP.properties"/>
      <!-- set global properties for this build -->
      <property name="source" value="."/>
      <target name="all" depends="copy, jspc, testservlet"/>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled jsp classes into it -->
      <target name="jspc">
        <!-- Run ejbc to create the deployable jar file -->
        <java classname="weblogic.jspc" fork="yes">
          <arg line="-webapp ${APPLICATION_HOME} -compileAll -d ${APPLICATION_WEB_CLASSES} ${source}/*.jsp"/>
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </java>
      </target>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled Servlets classes into it -->
      <target name="testservlet">
        <!-- Run ejbc to create the deployable jar file -->
        <javac destdir="${APPLICATION_WEB_CLASSES}" srcdir="${source}" includes="*.java">
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </javac>
      </target>
      <target name="copy">
        <copy todir="${APPLICATION_HOME}">
          <fileset dir="${source}">
            <include name="*.jsp"/>
          </fileset>
        </copy>
      </target>
    </project>I do not know how to compile the project using this build.xml
    The motive of doing all this is to understand how is Eclipse doing the build project step. I simply cannot find any build.xml inside any of my projects created in Eclipse however when right click on the project and choose build project, it compiles excellently. ???
    Edited by: pksingh79 on Nov 24, 2008 1:19 PM

  • How to change the java cup icon for all the JFrames?

    Hi,
    I would like to know if I can change the Java cup defult icon that appears in the upper left corner of the JFrames in one time, instead of setting the JFrame's icon in every created JFrame.
    Regards,
    Gabriel

    Then don't set the parent to null. If you don't want a parent, just set it to
    JOptionPane.showMessage(new IconFrame(), ...
    [\code]
    where IconFrame extends JFrame and sets the icon in it's constructor.  The optionpane will then use the icon from it's parent frame.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to increase the number of rows for Entry via Excel in SSM ?

    hello
    we are facing a scenario where we need to enter the target data for more than 14000 fields.So when we open the excel ad in and trying to upload, it is accepting data for only 500 fields and the rest are not getting displayed.
    The condition is that we have to enter data via Entry and Approval and not using a procedure and multiple metric sets is not a feasible option since the number of records is large. How can the number of rows in excel be increased ?
    Vijay

    Hi Bob
    I am facing another problem....
    we have designed our model in such a way that we built it using normal procedures but the target values have to be entered using entry and Approval via Excel ad-in..
    the problem we are facing is that if we select both the actual and the target measures to load the data via Excel login then the column TARGET is getting greyed out. When we build the same model using cube builder , the column TARGET is not getting greyed out and we are able to enter data there.
    Is there any setting changes we need to make inorder to make the Entry and Approval process via Excel behave the same way when the model is built using the Cube builder ? Are there any new notes or a newer version of Excel ad in to resolve this ?
    Vijay

  • How to increase the horizon (in days) for a resource

    Hi experts,
    I'm trying to update my resources registered in the APO Master Data so that its bucket capacity list (which currently is valid from 06.2010 to 12.2010) to become valid until 2012. However, regardless of the value registered at the field Days + the range stays from 06.2010 to 12.2010. Could anyone tell me how should I proceed?
    Below is an example of a registered resource:
    tab: Bucket
    Resource: R
    Category (Cat): P - Production
    Location: L
    Time Zone: BRAZIL
    Bucket Dimensn: Time
    Factory Calendar: 99 - International
    Bucket Capacity: 1
    Unit: D - Days
    Number of Periods: 1
    Period Type: Day
    Days -: 0
    Days +: 1000
    Moreover, after some research I found in the forum recommendations about the usage of the /SAPAPO/CRES_CAPACITY_LENGTHEN report. However, I was not able to run it (I simply typed /SAPAPO/CRES_CAPACITY_LENGTHEN in field on the upper right of the main screen and press the Enter button. As a result, the message "This function is not possible" was available at the bottom of the screen).
    I am using the version 5.0 of the APO.
    Thanks in advance for help.
    Edited by: Francisco Fonseca on Jul 6, 2010 6:02 PM
    Edited by: Francisco Fonseca on Jul 6, 2010 6:10 PM
    Edited by: Francisco Fonseca on Jul 6, 2010 6:12 PM

    Hi Francisco
    If you are trying extend the validity of the resource, then as you said that you tried extending the resource by extending the General data tab, and the validity of the resource still remains till 12.2010.
    The validity of the resource if governed by a couple of things :
    Validity as defined in R/3 Work center under capacity tab in the APO resource tab
    In CFC9, you can define what should the validity of the resource be, when you are CIFing the resource.
    Moreover, as you have righlty read in various posts across the forums, you can use the report /SAPAPO/CRES_CAPACITY_LENGTHEN to extend the validity of the resource. But I am not sure how are using this report. Please type in se38, enter this report and execute. In the next screen, enter the version, the resource and the location at which the resource exists. Click on execute and validity of the resource should increase.
    Let me know if it helps.
    Rgds, Sandeep

  • How to increase the dhcp IP range for sunray server

    Hello,
    We need help on how to reconfigure DHCP on sunray server. The current configuration is range of 150 DHCP addresses has been configured for the 10.218.0.0 network, which is exhausted now.
    Yes with utadm -a will add new and -d will delete, here do we have any option to reconfigure and add additional 10 more addresses.
    OR any thing that how to backup existing network configuration and then delete->and add new configuration.
    Appreciate help on this.
    Thanks,
    Dattatray.

    Hi Francisco
    If you are trying extend the validity of the resource, then as you said that you tried extending the resource by extending the General data tab, and the validity of the resource still remains till 12.2010.
    The validity of the resource if governed by a couple of things :
    Validity as defined in R/3 Work center under capacity tab in the APO resource tab
    In CFC9, you can define what should the validity of the resource be, when you are CIFing the resource.
    Moreover, as you have righlty read in various posts across the forums, you can use the report /SAPAPO/CRES_CAPACITY_LENGTHEN to extend the validity of the resource. But I am not sure how are using this report. Please type in se38, enter this report and execute. In the next screen, enter the version, the resource and the location at which the resource exists. Click on execute and validity of the resource should increase.
    Let me know if it helps.
    Rgds, Sandeep

  • Can you alter the JVM heap space size for all Windows users?

    Hi,
    I have used the "-Xmx" option to increase the Java Heap space for my Java application. This works fine, but all other users on my system still have the default heap space setting and I want them to have use an increased heap space as well. I cannot alter the JVM heap space at the command line since our Java application is started via an ActiveX bridge from a Windows application.
    So far I have found one potential, but not really good solution; I have figured out that I can copy the deployment.properties file containing the altered JVM heap setting from the "Application Data\Sun\Java\Deployment" folder in my own Windows "Documents and Settings" folder to the same folder of another user. However, this is not a really good solution since we are running a system with about 60 users and often new user accounts are created and sometimes people forget to copy the deployment.properties file.
    Does anyone know a better solution. I've tried to search the Windows registry or the JRE files for a default JVM heap space setting but I can't find it anywhere. Still on some systems the default is 64Mb and on others 96Mb, so I guess there must be a setting somewhere?

    The following is my eclipse.ini:
    -vmargs
    -Xms256m
    -Xmx512m
    -Dfuego.fstudio=true
    -DprodMode=preProduction
    -Dbea.home=C:\bea\albpm6.0\studio\..
    -Djava.endorsed.dirs=""
    -XX:PermSize=256M
    -XX:MaxNewSize=256M
    -XX:MaxPermSize=1024M
    but i think this configuration just effect the eclipse, not embed bpm engine. I also change the engine preference, increase the heap size, but engine crash as before.
    I want to change the jvm from jdk to jrockit, i hope any suggest.

  • How to increase Memory and Java Heap Size for Content Server

    Hi,
    My content server is processing requests very slowly. Over performance is not good. I have 2 GB of RAM any idea what files I can modify to increase the Java Heap Size for the Content Server. If I increase the RAM to 4 or 6 GB where do I need to make changes for the Java Heap Size and what are the recommended values. I just have Content Server Running on the linux box. Or how do I assign more memory to the user that owns the content server install.
    Thanks

    You might find these interesting:
    http://blogs.oracle.com/fusionecm/2008/10/how_to_-javatuning.html
    http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/admin/performance_tuning_10en.pdf
    Do you have access to metalink? This has about everything you could want:
    https://metalink2.oracle.com/metalink/plsql/f?p=130:14:9940589543422282072::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,788210.1,1,1,1,helvetica
    Or search for "788210.1" in metalink knowledgebase if that link doesn't work and look for the FAQ on configuring Java for Content Servers

  • Analyzer for Excel-Java heap space error

    When I click on Analyzer for Excel for a report I get the error java.lang.outOfMemoryError:java heap space.
    Does anyone know how to increase the JVM heap space?
    Thanks,
    Krishna.

    When I click on Analyzer for Excel for a report I get the error java.lang.outOfMemoryError:java heap space.
    Does anyone know how to increase the JVM heap space?
    Thanks,
    Krishna.

Maybe you are looking for

  • GL account to Rebates

    Hi Gurus, How to do this?. GL account determination in the Invoice document. PK 01 - Customer 50 - GL account (by example: ActKy= ERL). again in the same Invoice document. PK 01 - Customer 40 - GL account rebates (by example: ActKy=ERB). With best re

  • PDF TO WORD ONLINE CONVERTING

    I HAVE SPENT THE LAST SEVERAL WEEKS FIGHTING WITH ADOBE OVER THIS PROBLEM; THEIR SOLUTION WAS TO CHANGE TO IE, I HATE IE, BUT TRIED IT WAS A TOTAL FAILURE, IT ALSO CREATED A WHOLE NEW SET OF PROBLEMS WITH EVERYTHING THAT IE WANTED TO PUT ON MY HOMEPA

  • Hi guys please give me sample code for call transaction that handles error

    hi guys, please give me sample code for call transaction that handles error, please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code. please do help me as it is urge

  • IMovie crashes when I try to share with iTunes.

    iMovie crashes when I try to share with iTunes.  I want to view it on Apple TV.

  • Lumia 730 review

    Hi there,           Its been 15days i have used my lumia 730. I had found some minor issues that can been resolved. Lumia 730 rocks.... 1. Amazing camera quality (front and rear). 2. After installing 86apps (76 in my SD card) in my lumia 730, it just