How to change heap memory size for general java applications (not applets)

Hi. I made a java class which manipulates images and I sometimes get an out of memory error when the files are large. In these cases I can run it successfully from the command line using:
java -Xms32m -Xmx128m myappbut as I run this class from a firefox extension, I can't use this technique.
Could some one tell me how to set this globally? I've found a lot of info on setting it for applets in the control panel but that's it. I also tried editing my deployment.properties file by adding:
deployment.javapi.jre.1.6.0_11-b03.args=-Xmx128mbut none of these options seem to work.
Thanks for any help.

Also you can use use [JAVA_TOOL_OPTIONS|http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#tooloptions], with more documentation here. JAVA_TOOLS_OPTIONS is available since 1.5. There is no direct documentation on [_JAVA_OPTIONS|http://java.sun.com/j2se/1.5.0/docs/guide/2d/flags.html] but was made available since at least 1.3.
The recent existing forum thread [Java Programming - How to change the default memory limits for java.|http://forums.sun.com/thread.jspa?threadID=5368323&messageID=10615245&start=36] has a long discussion on the issue.
You specified you are not using applets, but if you do, I would also suggest you use the next Generation Plug-in (since 1.6.0_10) that allows you specify the max memory in the applet without having to instruct the user how to make the change. See [JAVA_ARGUMENTS|https://jdk6.dev.java.net/plugin2/#JAVA_ARGUMENTS] for applets. Java Webstart uses resources.

Similar Messages

  • Find heap memory Size for Web Intelligence processing server in BO 4.0

    Hi All ,
    We need to gather data for sizing inputs.For Adaptive processing server , we can find same by going in CMC> Server > APS > Properties & check value for the parameter -Xmx  . Could you please tell how to  find the max heap memory allocated for a Web Intelligence processing server in BO 4.0 as for Webi server this parameter is not maintained. ?
    Regards ,
    Abhinav

    Hi Abhinav,
    The maximum threshold is a value which may reach on peak usage and Webi processing server cannot occupy memory beyond this value at any time.
    In your situation 9 Webi Processing servers with 16 GB of RAM on server is not recommended. This is because consider situation with total 16 GB of host RAM.
    4 GB should left for OS
    Tomcat will need minimum 2 GB for 200 users
    So you are left with 10 GB RAM for all BO services
    Now 9 Webi Processing servers with 6 GB of Threshhost will not work here
    For this configuration you can have 2 Webi Processing servers with default threshold should be running on single host.
    Regards,
    Hrishikesh

  • How to change quality and size for a Nokia 920 cam...

    My Nokia 920 is now 2 weeks old and I'm totally bummed that I cant get a strait answer to this simple question.... How to change the quality-size setting to the camera... The camera is advertised as a 8.7... It's default size is NO way that.... Nor do I want to take default size photos ALL the time.. Any help would be appreciated.
    Solved!
    Go to Solution.

    It takes photos in this modeif your looking at them from skydrive you can change the size by going to Settings, backup, photos.
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • How can I measure memory allocation of a Java Application?

    We built a web application that enables images to be loaded into a database through a servlet running on Tomcat. We have inconsistent behaivor when more than x number of people are loading images simultaneously. No doubt a memory allocation problem, but how can I measure it?
    For example, I'd like to be able to create a graph showing the resources used against the number of people making uploads. I am using Linux and Tomcat/Apache.
    I am hoping for something like Memory counters that are available for measurine Windows applications on MS Windows - comes with the Resource Kit. Does this type of tool exist for the Java/Linux market?

    It is difficult to gauge memory usage from a Java application as the JVM handles garbage collection and even if objects are not referenced they might still be sitting in memory until the next garbage collect.
    Anyhow, a way to query available memory is:
    Runtime.getRuntime().freeMemory()
    You can run this at the begining of a process and at the end and examine the difference. You should call System.gc() before each freeMemory() call in order to try to force garbage collection.
    Another method would be to turn to the underlying OS. On linux you could use 'top' or 'ps'. With ps you could do something like:
    ps -o rss,vsz,%mem <pid>
    Where <pid> is the parent Tomcat process' id. The resulting three columns are:
    - Amount of real memory used.
    - Amount of virtual memory used.
    - Percentage of real memory used.
    'man ps' wil give you more options on how to use ps.
    There are also fancy graphical stuff like 'gtop' as well.
    Hope this helps.

  • How to create a .exe file for a java application

    Hi, I want to create a .exe file for a java application I am developing so that I can schedule it to run at a particular time using Windows Scheduler on WinNT. Is there any way to accomplish this? Or is there any other way in which a Java application can be scheduled to run at a particular time on Windows everyday?

    Create a .bat file and run that. Just have, in the .bat file:
    java YourClassName Alternatively, you can use javaw YourClassName (without *.bat, just put it into Windows Scheduler like suggested above).
    using javaw won't pop up any window...

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

  • How to change the FONT size for a TEXT object?

    Hello
    I am keeping a TEXT element to get a static text (as 'Visitor Info Form'), so i inserted TEXT from palattes, its size is Aerial 10, but i want to have its size as 24, I tried by right clicking on TEXT, then selected FONT, then choosen the 24 from drop-down list, its not working/reflecting!! but, when i change the PARAGRAPH settings, they are reflecting!
    Pls. let me know how to change size from 10 to 24?
    Thank you

    Don't specify the styleclass for the inner panelHeader.
    <af:panelHeader text="panelHeader 1" id="ph1" styleClass="CustomHelpHeader">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    <af:panelHeader text="inner panelHeader" id="ph2">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    </af:panelHeader>
    </af:panelHeader>
    The inner panel header does not get affected and is displayed normally.
    Thanks,
    Navaneeth

  • Changing heap memory paramter  and Additonal Java node configuration

    Hi All,
    Kindly provide me the procedure to change the heap memory parameter and location (in Visual admin). How to install/configure 2nd Java server node in PI system.
    Thanks in advance.

    Hi Ramesh,
    You would have posted this question in Netweaver Administrator forum...
    Well here are the answers.
    Login to Configtool.
    Expand Cluster-Data->instance<xx>->dispatcher. On the right hand side you can change the heap size for the dispatcher
    Follow the same procedure to increase the server heap memory.
    To add the server node click on instance<xx>. Then click Server->Add server.
    Cheers....
    Raghu

  • How to change the memory size of Iphoto to put more pictures??  I don't have no more space!!!

    Hi....
    I wonted to put some more pictures to Iphoto...but I can't do it because it is telling me that I don't have enough space.... I so that memory on the hard disk for Iphoto is only 37gb ... how can I change that?????  I wont to have all my photos in this program!!
    Thank you for your answers...

    I have trued to clean my hard disk --- but this is not the problem!!
    "IPhoto nn può imporate le foto perchè nn c'è abbastanza spazio libero sul VOLUME che contiene la libreria di Iphoto"
    this is the messege how is coming out....
    it means...
    Iphoto can not import the fotos, because there is not enough free space of VOLUME that containse the library of Iphoto
    do you now that could it be???

  • How to change the fetch size for a one-to-many relationship

    With Toplink 10.1.3, since using scrollablecursor is a prerequisites for changing the fetchsize on a query (using the setFetchSize), I am wondering if it would be possible to change the fetchsize of the query which is associated to a one-to-many relationship.
    So, is this possible? How ?

    In TopLink 10.1.3 you can set the fetch-size on any query, it has nothing to do with using a ScrollableCursor.
    Example:
    readQuery.setFetchSize(100);
    To set the fetch size on a mapping query use,
    mapping.getSelectionQuery().setFetchSize(100);
    In 10.1.3 you can only set this in code, not currently through XML or the Mapping Workbench. In 10.1.3.1 you should be able to set the value through XML as well.

  • I am in Thailand and the US version I downloaded has Thai script interface - how to change ? The preference for general agent locale is already set to US Enlish

    I downloaded the US version in Thai and the interface is in Thai script - I checked the general agent locale and it is set to English US. How do I get an interface I can read ?
    == This happened ==
    Every time Firefox opened
    == I downloaded the US version in Thailand

    See:
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file
    *http://kb.mozillazine.org/File_types_and_download_actions
    Current Firefox versions remember the download directory based upon the URL, so if the URL changes then the default folder may be chosen if there hasn't been selected a download folder before for that server.
    You can disable this feature to remember the download directory via the Boolean pref <b>browser.download.lastDir.savePerSite</b> on the <b>about:config</b> page.
    The browser.download.lastDir.savePerSite pref doesn't exist by default (it is a hidden pref), so you need to create it.
    Create a new <b>Boolean</b> pref with the name <b>browser.download.lastDir.savePerSite</b> and set the value to false.
    * http://kb.mozillazine.org/about:config
    You can delete the content-prefs.sqlite file in the Profile Folder to only remove settings stored in this file and keep the exceptions that are stored in permissions.sqlite that would be lost if you clear the "Site Preferences" via Clear Recent History.

  • How to change Default document size for CC Library Graphics (InDesign)

    Good morning --
    I have just discovered the amazing uses of the CC Library setup in InDesign and would love to be able to use it as a tool to collaborate template galleries amongst coworkers.
    I work in an industry that offers many different templates for our Marketing pieces available to the sales team. What we have in place right now is about 50+ different templates in their own packaged files. Now, this isn't all that difficult to maneuver around, but the CC Library has made it so I can "drag and drop" templates into place. This drag & drop feature is easy enough for me to grasp, and with the proper training it should be with the rest of the team (should being the keyword). However, in some cases if you double-click on Library graphic it opens the file in it's own editable file with a custom document size of 8.5x11 Portrait (which I imagine to be the internal InDesign preset).
    My questions therefore are when I double click on the library "Graphics" can the document size be anything other than 8.5x11? Can each Graphic have it's own document preset?
    - If I open a file that is set for landscape, all of the "Graphic" falls off of the spread.
    - Some "eblasts" are much longer than 8.5x11 (sometimes as much as 8.5x20), thus knocking some of the "Graphics" into that weird space area.
    Please let me know if I am not being a clear enough.
    Thank you!
    Steve

    @Steve – you are totally clear what you are doing and what you like to do.
    But I fear an automatic setting that is creating the page size according to an asset's size does not exist right now.
    I can change the size of a new document beforehand, if no document is open and create a new size in the document's properties dialog with the keyboard shortcut alt + cmd + p (in my German InDesign on Mac OSX 10.7.5). But you have to know in advance what size that should be.
    Example: If I chose A3 instead of A4 (my default) when no document is open and double click an asset in a CC Library the asset will be placed in a one page document sized A3.
    1. Changing the size (no document is open) in my German UI of InDesign CC-2014.2:
    2. Double click and the result is according to the settings I made:
    Uwe

  • How to change default memory storage for music in ...

    i want the memory card to be default in the phone, so that i can just put all my music on it and forget about it. at the moment i use ovi player but this just puts it on the mass media memory, therefore filling it up quickly. is there a setting in either the phone or the application to put memory card as default?

    There are some serious flaws in the Nokia software when it comes to saving your music to your phone's memory card instead of the mass storage area.
    I have an N8 with a 32GB MicroSD card and I keep all my music there. It totals over 18GB at the moment so it won't fit on the mass storage area (16GB) no matter how much the Nokia software might want to put it there. This is how I get around the dilemma:
    Nokia Music Player is what I use to handle my music collection. However, I don't use it to transfer the music to my phone because it will only copy it to the mass storage area. You can not configure Nokia Music Player to transfer to the MicroSD card so you can stop trying!
    Nokia Suite on the other hand can be configured to save to your phone's MicroSD card and happily, it reads and respects the music library that Nokia Music Player has prepared. Unfortunately, Nokia Suite has very limited abilities when it comes to managing your music. It can't sort out the album art for example.
    So you will need to use both programs, Nokia Music Player to manager and prepare your music library complete with embedded and optimised album art, and Nokia Suite to tranfer it to the MicroSD card on your phone once it's all ready to go.
    Alternatively, you can connect your phone to you PC and treat it like a disk drive, copying all the MP3 files over manually. That's what a lot of people do because the Nokia software is awkward to say the least.

  • Change sub font size for TV

    hello every body !
    how to change subtitle font size for Tv toshiba 24ps10v !
    thanks !!

    You'll need to contact Toshiba in your region. That doesn't appear to be a US model, and this site only supports the US.
    - Peter

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

Maybe you are looking for

  • Why do I have to pay line rental when I have FTTP?

    I don't understand why am I paying for a phone line when I have FTTP (Fibre to the premisies)? that's over £160 a year and I don't even use the copper wiring, and I certainly don't need or want a phone line.

  • HT204266 "security questions"

    Some app purchases are asking for further verification by setting up "security questions" even though I'm logging in with my Apple id. If I go to the Apple site to edit my account rather than linking from the app I can't see anywhere to create these

  • Finding errors in payroll or FI posting

    Hi, How to read the errors in payroll and FI postings? and from the log how to solve the errors? can any one thro light on this. chandu 09899440976

  • InDesign CS5 crashes when Marks/Bleed turned ON!

    I have an issue that I can not resolved. It's been happening since CS4 InDesign and still continues with CS5.  I have no problems printing to our Canon iR C5180 and/or creating PDFs from InDesign. BUT when I turn on all or some of the "Marks/Bleed" i

  • Management Center for IDS Sensors - version error

    Hi I’m experiencing problems installing an IDS on CiscoWorks2000 Management Center for IDS Sensors. When I add a sensor I get the following error “Error importing configuration files from the sensor - Could not find version in string "Unknown version