HI ALL,
How to Overcome "OutOfMemoryException"? when I am compiling
source having more than 1000 LOC throwing this exception.
Can any one give correct answer to my question? thx

Answers were Sorted based on User's Feedback



HI ALL, How to Overcome "OutOfMemoryException"? when I am compiling source having more ..

Answer / naseer

To Overcome OutOfMemoryException
there are several things you can do
1.Make unused objects garbage collectable.
2.Avoid excessive object creation.
3.Allocate more memory for the heap.
4.Choose an alternative technique (eg, caching)

Is This Answer Correct ?    6 Yes 0 No

HI ALL, How to Overcome "OutOfMemoryException"? when I am compiling source having more ..

Answer / subbu674

Hi Vasavi,
Thx for your answer, but I did not use any recursion functions in my classes. This exception is raised when I compiled a class that checks/verifies lot of other classes in a packages.
Can you represent what you are thinking in your mind? so that I will move further. Thx

Is This Answer Correct ?    0 Yes 0 No

HI ALL, How to Overcome "OutOfMemoryException"? when I am compiling source having more ..

Answer / sunit panday

actually there are some conditions due to which
OutOfMemoryException caused as follows:-
1. when java virtual machine coudnot create the object as
specified by the programmer
2. when the database so high as respect to system physical
and virtual memory is low
you can use following command to find the free memory:-
Runtime runtime = Runtime.getRuntime();
System.out.println ("Free memory : " - + runtime.freeMemory
() );
as this exception is in java.lang.Object package

Is This Answer Correct ?    0 Yes 0 No

HI ALL, How to Overcome "OutOfMemoryException"? when I am compiling source having more ..

Answer / karthik

Please increase the Heap size. It depends on the Java
version you are using. You can google for that.

Is This Answer Correct ?    0 Yes 0 No

HI ALL, How to Overcome "OutOfMemoryException"? when I am compiling source having more ..

Answer / vasavi

hello.......recursion causes out of memory exception
avoid recursion

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More JDBC Interview Questions

What are the factors that the jdbc driver performance depends upon?

0 Answers  


What do you mean by metadata and why we are using it?

0 Answers  


What is phantom read and which isolation level prevents it?

0 Answers  


What is Apache DBCP API?

0 Answers  


Diff bet.. Function and Trigger?

3 Answers   Logica CMG,


What causes no suitable driver error?

0 Answers  


How to create Connection interface object because it is Interface , Interface is not instansiated?

9 Answers   Aptech, CTS, HCL,


What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.

0 Answers  


Explain the life cycle of jdbc.

0 Answers  


What is the use of getGeneratedKeys() method in Statement?

0 Answers  


Can we use the one instance of Statment to execute more than one query ?

2 Answers   TCS,


Explain jdbc savepoint?

0 Answers  


Categories