简体   繁体   中英

Java heap space outOfMemoryError

To avoid the java.lang.outOfMemoryError I went to Control Panel-->Java-->Java-->View and set the runtime parameters. But it produces no change.

It is a simple program which I'm running via the command prompt. Initially I ran the code using java -Xmx1024m PercolExp(class_name) and it ran. But when I change java runtime parameters settings in the Java control panel and run the code by simply typing java PercolExp it doesn't take the heap size parameter into account.

The Control panel you've found is (I think) this one . If you read the page I linked you, you will find that it is the control panel for the Java plugin used by your web browser. It only affects the embedded JVM that is used to run applets in web pages.

The Java Control Panel controls the settings of the Java Runtime Environment for applets and Java Web Start applications. If you run your application from the command line ( java AppName ) those parameters won't be taken into account: you will need to specify them manually every time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM