Skip to main content

Deploy Swing application that need JAI?

4 replies [Last post]
ekin_00
Offline
Joined: 2006-01-10

I did a search in the forum but only found answer to "How do you deploy JAI in an Applet?" or the use of Webstart.

My deployment base on batch script that copy the latest jar onto user's desktop.

Example:
xcopy myapp.jar C:\myapp\
java -jar myapp.jar

Sometimes user will run update to the latest jre, which will not have the JAI in the correct \lib\ext folder (\java\j2re1.4.2_06\ is differ from java\jre1.5.0_02\).
Is there any way to check/ensure user has the JAI installed in the current jre when myapp start to run? Or prompt user to install?

Message was edited by: ekin_00

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ekin_00
Offline
Joined: 2006-01-10

thank you Mike for fast reply. I was hoping there is a way similar to applet or webstart that it'll download the latest JAI. If it need to be I'll give your suggest a try.

is it "legal" for me to include the two JAI jars inside of my myapp.jar? this way I can ensure I have the library when deploy.

ekin_00
Offline
Joined: 2006-01-10

thank you Mike for fast reply. I was hoping there is a way similar to applet or webstart that it'll download the latest JAI. If it need to be I'll give your suggest a try.

is it "legal" for me to include the two JAI jars inside of my myapp.jar? this way I can ensure I have the library when deploy.

Nidel, Mike

You should be able to detect if JAI is present by doing a

Class.forName("javax.media.jai.JAI");

and catching a ClassDefNotFoundException.
If you get the exception, pop up a dialog with a URL to the
JAI download page and exit your application when the user
presses OK.

It's not elegant but it should work.

> -----Original Message-----
> From: jai-interest@javadesktop.org
> [mailto:jai-interest@javadesktop.org]
> Sent: Thursday, January 19, 2006 4:01 PM
> To: interest@jai.dev.java.net
> Subject: [JAI] Deploy Swing application that need JAI?
>
>
> I did a search in the forum but only found answer to "How do
> you deploy JAI in an Applet?" or the use of Webstart.
>
> My deployment base on batch script that copy the latest jar
> onto user's desktop.
>
> Example:
> xcopy myapp.jar C:\myapp\
> java -jar myapp.jar
>
> Sometimes user will run update to the latest jre, which will
> not have the JAI in the correct \lib\ext folder. Is there any
> way to check/ensure user has the JAI installed in the current
> jre when myapp start to run? Or prompt user to install?
> ---
> [Message sent by forum member 'ekin_00' (ekin_00)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=138827&#138827
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

ekin_00
Offline
Joined: 2006-01-10

thank you Mike for fast reply. I was hoping there is a way similar to applet or webstart that it'll download the latest JAI. If it need to be I'll give your suggest a try.

is it "legal" for me to include the two JAI jars inside of my myapp.jar? this way I can ensure I have the library when deploy.