java.lang.outofmemory exception jvm heap size insufficient
<p>I tried to read a text file which have only one line. File size is over 50Mb. When I tried to read it using the following code it gives </p>

<blockquote>
  <p>java.lang.outofmemory exception jvm
  heap size insufficient</p>
</blockquote>

<p>I change the java heap memory to 1GB . But still it gives the same exception.</p>

<blockquote>
  <p>set JAVA_OPTS=-Xms1024m -Xmx1024m</p>
</blockquote>

<p>I use foollowing code pragment to read the file.</p>

<blockquote>
  <p>BufferedReader Filein1=new
  BufferedReader(new FileReader( new
  File( "C:\ABC\MsgStream.txt" )));
                  s=Filein1.readLine();</p>
</blockquote>

<p>Can some one please tell me how to overcome this problem. Thanks in advance.</p>
