Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ImageIO installer

 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
My applet requires imageio to be installed. I have added the location of the jar file of imageio to the manifest file of the jar so that it would auto-download and install it. This works fine when the user has no java before (since the applet also checks for this and installs jre) or has one installation of jre. But there are issues that arise especially in situations like this:
user has old jre installed -> imageio installed over this jre -> user installs newer jre -> user tries to run my applet -> applet runs with latest jre -> applet does not find imageio with the new jre (remember imageio is installed to the old jre) -> applet downloads imageio and tries installing it over new jre -> applet finds imageio with an old jre (since it looks in the system and finds it) -> instead of installing, removes imageio
Under such a situation, and now that imageio is removed, the user will have to rerun the applet once more so that it detects again that no imageio is installed, and this time install it.
Is there some way around this ? it's ugly to have the user run the applet twice
Is there a way for example to force the imageio installer to install no matter if there is an old installation or not ?
thanks,
Mohammad
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does ImageIO actually need to be "installed"? Might adding the jar files to your archive attribute suffice instead?
 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you are suggesting i simply bundle imageio api to my applet jar file?
and i guess that would increase the size of my applet by at least one additional MB...
you think that is feasible? and that is the best solution?
thanks Ulf..
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you think that is feasible?

Absolutely. Unless your main target group uses a 56K/ISDN dialup.

and that is the best solution?

To me as a user it would seem better than the installer process you describe. It is an option; whether it is best in any menaingful sense depends on your circumstances, which I can't begin to guess at.
[ December 19, 2005: Message edited by: Ulf Dittmer ]
 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
i have taken your advice to the next level (implementing )
instead of bundling imageio into my jar file and killing the user with the download time , i wanted to place the jars required by imageio into the same folder in which my jar file resides, and point to them in the archive entry in the applet tag,
so now i have
<applet
archive = "viewer.jar,dcm4che.jar,jai_imageio.jar,clibwrapper_jiio.jar"...>

since jai_imageio.jar and clibwrapper_jiio.jar are the two jar files that i found are relevant to imageio. Yet still the applet is not recognizing their presence, since it says it cannot find any jpeg2000 decoders (which are already supported by imageio)
Thanks a lot man
really appreciate it
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImageIO is a JDK 1.4 feature. Could it be that the client has an earlier JVM?
 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a chance,
since i am testing this on my own environment, which has jdk1.4.2_08
besides, my applet does an auto-check for jdk to be at least 1.4
One thing to mention though, imageio docs mention something about a dll (clib_jiio.dll) wouldn't that be the cause of our misery? (the lack of it ofcourse) but this would mean that we won't be able to simply put the jars in our path!!(that would be a bummer)
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had no idea that ImageIO relies on DLLs as well as jar files. That indeed rules out a download by the applet.
 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
thanks for the time, i know i've taken much of your time...
but where can i ask for a solution to this? can you redirect this somewhere ?
coz i need this to be fixed
thanks a lot
Mohammad
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general, there's probably little you do about users upgrading their software, so if that clobbers something your software needs - tough luck. But this shouldn't be a very common occurrence, right? If you give the user appropriate feedback as to what is happening, the experience shouldn't be too bad.

You can slso file a bug with Sun that they should design their software installations more robustly. Don't know if that's feasible in this case, though.
[ December 20, 2005: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic