Saturday, November 12, 2005

jj2000 compiling

jj2000 is partially included in JDK 1.5 (jai_imageio.jar) but not the CmdLnEncoder or CmdLnDecoder. When using the downloaded jar file:

Exception in thread "main" java.lang.SecurityException: sealing violation: package jj2000.j2k.util is sealed

because of collisions in the namespace. (And also weird stuff like substituting java.awt.Point for jj2000.j2k.image.Coord)

To change the namespace:

find . -type f -name '*.java' -exec perl -plwi"" -e 's/jj2000\./jjsipboutland2000./g' '{}' \;

(need to rename the in the jj2000 directory in src/ as well)

Here is a patch to get rid of the enum keyword/identifier problem.

Finally, to compile:
javac -g -encoding ISO8859-1 -cp `pwd` JJ2KEncoder.java

and JJ2KDecoder

Or leach off of AFS:
CLASSPATH=/afs/sipb.mit.edu/project/outland/share/jj2000/jj2000-5.1/src

2 comments :

Anonymous said...

Do you know anything about the truncation point related to this software?

Ken said...

No, I do not know anything about it.