Subject: | |
From: | |
Reply To: | Roemer, Rich |
Date: | Mon, 23 Oct 2000 09:25:37 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
try telling Java to use more heap - 32 or more mb:
java -Xmx32m MSGtest
-----Original Message-----
From: daniel [mailto:[log in to unmask]]
Sent: Saturday, October 21, 2000 10:47 PM
To: [log in to unmask]
Subject: Help: OutOfMemoryError
Can someone help me with the OutOfMemory error,please:
shell/iX> java MSGTest
About to Open input file
Opened file # 35
Exception in thread "main" java.lang.OutOfMemoryError
at java.util.jar.Manifest$FastInputStream.<init>(Manifest.java:269)
at java.util.jar.Manifest$FastInputStream.<init>(Manifest.java:264)
at java.util.jar.Manifest.<init>(Manifest.java:55)
at java.util.jar.JarFile.getEntry(Compiled Code)
at com.hp.mpe.Intrinsic.collapseParms(Compiled Code)
at com.hp.mpe.MPEFile.FREAD(MPEFile.java:266)
at com.hp.mpe.MPEFile.HPFOPEN(Compiled Code)
I'm opening an MPE message file using MPE Class file to read in about a byte
steam of 3385 bytes for further processing. My POSIX shell was started as:
run sh.hpbin.sys;info="-L" ;NMSTACK=90000000
Source listing e.g.
........
.........
MPEFile myfile = new MPEFile("DAN1000D");
myfile.setDomain(MPEFile.DOMAIN_OLD);
myfile.setAccess(MPEFile.ACCESS_READ); /* unnecessary; is default */
System.out.println("About to Open input file");
/* Open input file for processing */
try {
myfile.open();
} catch (MPEException e) { e.printStackTrace(); }
if (myfile.getFileNum() == 0) {
MPEStatus status = myfile.getStatus();
System.out.println("HPFOPEN Status: subsys " + status.getSubsys() +"
info " + status.getInfo() );
} else {
System.out.println("Opened file # " + myfile.getFileNum() );
int cnt = 0;
while (true) {
try {
/* set None Destructive read mode on the message file */
setNoneDestructiveRead(myfile.getFileNum());
/* Read Input Stream */
myfile.read(3385);
cnt +=1;
} catch (MPEException e) { e.printStackTrace(); }
if (myfile.eof()) break;
ByteArrayInputStream bais = new
ByteArrayInputStream(myfile.getBuffer());
bais.read(TRANS,0,6);
bais.read(DATE,0,8);
...
....
|
|
|