Category Archives: Java

StackOverflowException in java.util.ArrayList due to subList()

We have experienced a problem with a StackOverflowException when calling ArrayList.add(). The application added data to the end of a list to find different possible solutions. Attempts that lead to a dead end are then truncated from the list with … Continue reading

Posted in Java, Utveckling | Comments Off on StackOverflowException in java.util.ArrayList due to subList()

Check Java version in class files

Java classes can be compiled for different target platforms. You could e.g. compile with JDK 7 creating class files for Java 6. The target version is encoded in the beginning of the class files. The major version of the different … Continue reading

Posted in Java, Linux/Unix | Tagged , , | Comments Off on Check Java version in class files

Java encoding of source files

I got a problem with some java source files, which javac couldn’t compile, because the file encoding was correct. The source files did include some Swedish UTF-8 characters. unmappable character for encoding ASCII So I checked what my ant environment … Continue reading

Posted in Java, Linux/Unix, Utveckling | Tagged , | Comments Off on Java encoding of source files