JDeli can read and write images as JPG2000 files, providing a complete JPG2000 converter between JPG2000 and lots of other image file formats. It supports both .px and .j2 formats.
You can do this in A SINGLE step with the convert method or separately read and write the image if you want to process the image in Java.
Convert images to JPG2000 from Command Line or another language
java -jar jdeli.jar --convert jpx "inputFileOrDir" "outputDir"
Converting to or from a JPG2000 image in Java
JDeli.convert(File inFile, File outFile);
JDeli.convert(InputStream inFile, OutputStream outfile, String format);
byte outputData=JDeli.convert(byte inputData, String format);
An additional set of methods allow values to be passed in which can give more control over conversion, depending on the image formats being converted (ie different image compression options).
Multiple steps method to change from a JPG or into a JPG2000 image
2. Process image