Announcement

Collapse
No announcement yet.

Java Error (Solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Java Error (Solved)

    I keep getting this error while using Java. java.lang.OutOfMemoryError: Java heap space. I Googled it but it says to change my memory settings for Java. How is this done please.
    Oneiric 11.10 KDE Version 4.7.4<br />Duo core 1.8 Intel<br />4 gig ram<br />Nvidia Go 7300 Graphics<br />Dell E1505 Laptop<br /><br />I&#39;m a happy pappy with Linux on my lappy!!!

    #2
    Re: Java Error

    Hi,

    The command:

    java -Xmx512m whatever

    will set the max heap size to 512MB.

    Comment


      #3
      Re: Java Error

      What is the "whatever" supposed to be? The program or something? I think I need to know the initial heap size, which I don't. How do I find that out? Here is what I found out on Google...

      If Java runs out of memory, the following error occurs:

      Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

      This can have two reasons:

      * Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
      * Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:

      java -Xms<initial heap size> -Xmx<maximum heap size>

      Defaults are:

      java -Xms32m -Xmx128m

      You can set this either in the Java Control Panel or on the command line, depending on the environment you run your application.

      This isn't working for me. Is there a control panel for Java?
      Oneiric 11.10 KDE Version 4.7.4<br />Duo core 1.8 Intel<br />4 gig ram<br />Nvidia Go 7300 Graphics<br />Dell E1505 Laptop<br /><br />I&#39;m a happy pappy with Linux on my lappy!!!

      Comment


        #4
        Re: Java Error

        Here is what I got trying to do this.....

        ed@ed-laptop:~$ java -Xms128m -Xmx512m
        Usage: java [-options] class [args...]
        (to execute a class)
        or java [-options] -jar jarfile [args...]
        (to execute a jar file)

        where options include:
        -d32 use a 32-bit data model if available

        -d64 use a 64-bit data model if available
        -client to select the "client" VM
        -server to select the "server" VM
        -hotspot is a synonym for the "client" VM [deprecated]
        The default VM is server,
        because you are running on a server-class machine.

        -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
        A : separated list of directories, JAR archives,
        and ZIP archives to search for class files.
        -D<name>=<value>
        set a system property
        -verbose[:class|gc|jni]
        enable verbose output
        -version print product version and exit
        -version:<value>
        require the specified version to run
        -showversion print product version and continue
        -jre-restrict-search | -jre-no-restrict-search
        include/exclude user private JREs in the version search
        -? -help print this help message
        -X print help on non-standard options
        -ea[:<packagename>...|:<classname>]
        -enableassertions[:<packagename>...|:<classname>]
        enable assertions
        -da[:<packagename>...|:<classname>]
        -disableassertions[:<packagename>...|:<classname>]
        disable assertions
        -esa | -enablesystemassertions
        enable system assertions
        -dsa | -disablesystemassertions
        disable system assertions
        -agentlib:<libname>[=<options>]
        load native agent library <libname>, e.g. -agentlib:hprof
        see also, -agentlib:jdwp=help and -agentlib:hprof=help
        -agentpath:<pathname>[=<options>]
        load native agent library by full pathname
        -javaagent:<jarpath>[=<options>]
        load Java programming language agent, see java.lang.instrument
        -splash:<imagepath>
        show splash screen with specified image
        ed@ed-laptop:~$
        Oneiric 11.10 KDE Version 4.7.4<br />Duo core 1.8 Intel<br />4 gig ram<br />Nvidia Go 7300 Graphics<br />Dell E1505 Laptop<br /><br />I&#39;m a happy pappy with Linux on my lappy!!!

        Comment


          #5
          Re: Java Error

          What exactly are you trying to run that requires Java? Forget about all the options to the Java interpreter and tell us what you are executing. An OutOfMemoryError is pretty unusual. They happen but not often. Is it a third-party tool or something you tried to write yourself?
          linux &amp;&amp; bash = &quot;the future&quot;

          Comment


            #6
            Re: Java Error

            I am trying to run Vity's Freerapid downloader. It ran great when I first installed it. Then an update can through and then this error. I don't remember what the update was. Here is the website address...

            http://wordrider.net/freerapid/
            Oneiric 11.10 KDE Version 4.7.4<br />Duo core 1.8 Intel<br />4 gig ram<br />Nvidia Go 7300 Graphics<br />Dell E1505 Laptop<br /><br />I&#39;m a happy pappy with Linux on my lappy!!!

            Comment


              #7
              Re: Java Error

              I'm not sure what to tell you. I did download the latest version and try it from my machine. It worked without issue. If you type "java -version" in a console window, what is your response? I'm using Sun java 1.6.0_13.

              java version "1.6.0_13"
              Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
              Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
              linux &amp;&amp; bash = &quot;the future&quot;

              Comment


                #8
                Re: Java Error

                I have the same version as you. However, I found the java control panel and cleared the cache and now it is working. Go figure!!! I want to thank you all for your responses. Ed
                Oneiric 11.10 KDE Version 4.7.4<br />Duo core 1.8 Intel<br />4 gig ram<br />Nvidia Go 7300 Graphics<br />Dell E1505 Laptop<br /><br />I&#39;m a happy pappy with Linux on my lappy!!!

                Comment

                Working...
                X