The Artima Developer Community
Sponsored Link

Java Answers Forum
java.lang.OutOfMemoryError

1 reply on 1 page. Most recent reply: Oct 13, 2005 7:39 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
nabakumar

Posts: 23
Nickname: nkmeitei
Registered: Jun, 2005

java.lang.OutOfMemoryError Posted: Oct 13, 2005 7:11 AM
Reply to this message Reply
Advertisement
I am running a java application using this command
java -classpath %CP% -Xmx264m -Xms128m com.MyProg
The program involves operations like copying a large no image files,updating DB etc.

In my desktop , it is running fine .
But in another machine , it shows "Exception in
thread "main" java.lang.OutOfMemoryError"
The RAM size is same in both , virtual memory is also same
Can anybody suggest what may be the possible reason .


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: java.lang.OutOfMemoryError Posted: Oct 13, 2005 7:39 AM
Reply to this message Reply
I had the problem when loading large projects because I allways opened new Statements to the database (and forgot to close them) instead of re-using existing Statements.

It never happened on my machine since for testing purposes I never used large projects.

Make sure to close open Statements once they are not needed anymore.

Flat View: This topic has 1 reply on 1 page
Topic: want to create access db from java using jdbc Previous Topic   Next Topic Topic: Submit a form

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use