0

When I work with JAI from the Eclipse (all the classes specified) it works very fine, but when I bundle everything in a jar and make a shell script file from that and try to run that script I have a problem with javax.media.jai.OperationRegistry looking for a initialization file.

Has anyone else seen this problem?

Exception:

java.lang.RuntimeException: Registry initialization file not found.
at
javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:365)
at javax.media.jai.JAI.(JAI.java:566)

There is something on this page but I was not able to understand.

Any Help?

code_fish
  • 3,381
  • 5
  • 47
  • 90
  • Please specify the version of `JAI` you using – Mukul Goel Jun 27 '13 at 09:07
  • 1
    Do you have the registry file mentioned on that page, in your `META-INF`folder in the bundled JAR? – Harald K Jun 27 '13 at 09:10
  • @MukulGoel I am using sun-jai_core and sun-jai_codec.jar – code_fish Jun 27 '13 at 09:12
  • Yup. you should have the registry file in the META-INF .. do you ? – Mukul Goel Jun 27 '13 at 09:15
  • @haraldK Yes I have file in META-INF in bundled jar. But I could not understand updateRegistry part. How to get OperationRegistry instance passed to updateRegistry – code_fish Jun 27 '13 at 09:15
  • @MukulGoel I have the file in bundled jar. But now I am creating a shell script file from bundled jar using JARSPLICE tool and I get error on running that script file. – code_fish Jun 27 '13 at 09:17
  • @arun I don't think you need that unless you are creating your own Spis. – Harald K Jun 27 '13 at 09:32
  • @haraldK Thanks. I think if file is present in META-INF than there should be problem with the creation of shell script from JARSPLICE. Could you suggest any other tool for shell scripting scripting creation from jar file? – code_fish Jun 27 '13 at 09:36

1 Answers1

0

So the problem is that the JAI jar exported with the Java application do not work on the Linux. We have to explicitly install JAI on the Linux machine for the installed Java application to use.

The one solution that we found out is we exported our Java Application into a jar file and created a installation script, which when run on the Linux machine install the JAI first and after that it install our application.

So this is a one time installation process while installing the application on any fresh Linux machine.

code_fish
  • 3,381
  • 5
  • 47
  • 90