Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] How does uDig detect java?

Ok, attached is an nsi file to get you guys started on building a
windows installer for uDig using the Null Soft Installer.  I spent a
good bit of time on doing one for GeoServer, and making one for uDig
was much simpler, as I just modeled it after mine.  I don't mean it as
an ending point, but as a starting one - it should generate a half
decent one right away, and with a few tweaks (like a license.txt file,
instead of the random eclipse common public license html file I
reference now) it should be good for 0.4 I imagine.  Would be nice to
add a few more icons - I just used the one uDig one for install and
uninstall.  The file itself has a number of comments and suggestions to
get it working right.  Feel free to ask me any questions about it. 
You'll need to download the Null Soft installer from
http://nsis.sourceforge.net to do the compilation from the file.

I'm not attaching the sample windows installer, since I'm on dial-up and
it would take me a few hours.  If you want I can probably send it
sometime next week.  But you should get your own going, as there are a
few improvements that I'm not in a position to make.  I'd be more than
happy to walk someone on your team through the process though.  Just
schedule the time a bit in advance, as I'm not always online.

My biggest frustration was that I _still_ have not been able to get uDig
to work with jai.  I really don't know what my problem is, I tried both
your suggestions.  But I think the installer should work just fine even
though I could never get a successful install, assuming the user
installing it was better than I at getting jai on their machine.  I
spent like two or three hours and was unable to figure it out.

> >When starting up uDig 0.3 I get a JAI not found.  Which is nice, but
I
> >have plenty of JRE's with JAI and ImageIO.
> >
> UDIG uses the "current" JRE (as per registry settings in windows, path
> in linux). You can specify one yourself (make a short cut and add in
the
> "-vm C:\Program Files\Javasoft\Java\JRE .....".
First off I don't really understand how to make a short cut in windows
and 'add' a -vm argument.  I hit 'create shortcut' in windows on the
eclipse, and didn't seem to see any place to supply arguments.  I also
tried running from the command line.  I could run the eclipse rcp, but
if I supplied an argument nothing happened.  Same with cygwin.

>
> >would like to keep it that way.  But uDig seems to be choosing my JRE
> >that doesn't have it installed.  How can I change which version it
> >looks for?  It seems to ignore my JAVA_HOME column - is it using the
> >registry or something?  Or am I just doing something silly?
> >
> >
> You can also update what your "current" VM is in the registry:
> Run: regedit
> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
> CurrentVession = 1.5
>
> The childern of this key are the available JREs that you could uses
for
> CurrentVersion
> The last install you did will clobber the existing value - so windows
> usually just points at the last JRE you installed.

So I tried everything with this.  I changed my registry all around, and
I even went so far as to confirm it using my null soft scripts, as they
do such things as detect registry settings.  I uninstalled and
reinstalled jai 1.1.2, and the Image I/O 1.whatever rc.  I copied over
the 0.2 .bat file, to no avail.  I kept at this for over two hours, and
still was not able to get it working.
>
> Right now we are using JRE 1.5 and the latest batch of JAI / ImageIO.
We
> figure that this is what "new" users would end up downloading.
>
> Any suggestions or you have would be very welcome - we are writing up
> documents this week outlining what we plan to do.
I'd probably have a good number of suggestions if I could actually make
a map.  So my only suggestion is improve JAI access.  I mean, I'm a
developer and I couldn't get it going.  Granted I have all sorts of
JRE's, but I was trying pretty hard, and still nothing.  Maybe I was
unlucky, likely I am doing something pretty stupid.  But I went so far
as to get online and actually read all the documentation (shocking!)
that you guys provided, and nothing helped me.  Perhaps I can work
through it with one of you.  I personally really don't like the
registry stuff in windows.  I think the setting of JAVA_HOME
environment variable is the way to go.  I know you guys need the boot
strap class path or whatever, but perhaps you could define it manually
from JAVA_HOME and pass it in?  In the GeoServer windows install I
first look for JAVA_HOME, and if it's not there I go to the registry. 
This code is in the NSI file, but I commented it out, since you guys
don't use JAVA_HOME.  So yeah, if possible, use JAVA_HOME to define
java.  For advanced developers it's nice to be able to switch jvm's
that are running the program, without having to go into the registry.

I know this adds yet another step, for naive users.  But it is just
about standard for open source java apps I feel (with the exception of
eclipse, yes, and a few others).  And I feel you can eliminate the step
for windows installs, using the right installation files.  Indeed,
installing GeoServer doesn't require java home to be set, but it uses
it if it is there (I 'borrowed' this from tomcat).  But you've already
got too many steps for naive users - download java, download jai, ect. 
I would say you should put them all in a complete windows installer. 
This should actually be relatively easy to do, just include the jre
with the appropriate jai windows extensions in the uDig install file,
and have the start menu links point to it.  Advanced developers who
don't want to download yet another jvm should be advanced enough to
download the rcp and the plugins and getting it going that way (I'm
obviously not in the latter category :( ).  I would try this if I could
actually get uDig running...

Chris

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

Attachment: uDig.nsi
Description: Binary data


Back to the top