Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 4 General Forum
Date: Tue Oct 2 2001 10:13 pm
Author: Bortz, Andrew S. <abortz@andrew.cmu.edu>
Subject: So much for platform-independence

Well, I ran into a strange situation. My code for Part 1 gets the following Exception and stack trace on the Linux boxen:

java My211Zip c h test.txt test.hc
Exception in thread "main" java.lang.StackOverflowError
at java.lang.Integer.compareTo(Integer.java, Compiled Code)
at java.lang.Integer.compareTo(Integer.java, Compiled Code)
at java.util.TreeMap.compare(TreeMap.java, Compiled Code)
at java.util.TreeMap.getEntry(TreeMap.java, Compiled Code)
at java.util.TreeMap.get(TreeMap.java, Compiled Code)
at HuffmanTreeGenerator.writeChar(HuffmanTreeGenerator.java, Compiled Code)
at Huffman.compress(Huffman.java, Compiled Code)
at My211Zip.main(My211Zip.java, Compiled Code)

I also tried it with a -mx128m, no difference. The code works perfectly on both my machine and the Sun boxen, even without the extra memory, which suggests that maybe a newer version of the Java VM may be necessary on the Linux box. Because I like to work on Linux, this only took me a frustrating hour to figure out. So heads up to Linux users...
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
So much for platform-independence      Bortz, Andrew S.      Tue Oct 2 2001 10:13 pm       
Re: So much for platform-independence      Cipriani, Jason A.      Thu Oct 4 2001 12:06 am       
Re: So much for platform-indepen...      Bortz, Andrew S.      Thu Oct 4 2001 2:02 am       
Re: So much for platform-inde...      Cipriani, Jason A.      Thu Oct 4 2001 10:20 am       

Back to previous screen