> Hi all,
>
[quoted text clipped - 7 lines]
> The program needs to know it's working directory and have a location where
> it can temporarily save an image file for use by the report.
This doesn't seem to be the responsibility of the installer. The
application should be able to get a temporary file File.createTempFile(). As
for the current working directory, I think that depends mainly on how the
user invokes the program.
> The program requires several third party jar files.
> The program requires MySQL to be installed.
[quoted text clipped - 4 lines]
> installed, if not, install them, preferably automatically although license
> agreements may not allow this . . . I will follow that one up.
I think install Java and/or MySQL is significantly different between
Linux and Windows (and probably on MacOS too, to some degree). It might be
that the easiest solution is to actually ship multiple installers with your
product, and have the user select the one that's appropriate for them.
> I'm prepared to do the research and reading to figure out the best
> approach, but I need a kick start as to what I should be looking at. Any
> tips etc. would be great. Things like should I use a scripting language
> and so on.
If you do find a way, be sure to post your solution to let us all know.
- Oliver
Lionel - 15 Jun 2006 22:38 GMT
>> Hi all,
>>
[quoted text clipped - 12 lines]
> File.createTempFile(). As for the current working directory, I think
> that depends mainly on how the user invokes the program.
Yeah, you're right. I don't know why I included that :).
>> The program requires several third party jar files.
>> The program requires MySQL to be installed.
[quoted text clipped - 11 lines]
> with your product, and have the user select the one that's appropriate
> for them.
They certainly are different for Linux and Windows, I haven't used a Mac
so I'm not sure about that. You may be right about using multiple
installers. I probably don't mind too much about letting the user have
to install Java, but MySQL is a whole lot less straight forward.
>> I'm prepared to do the research and reading to figure out the best
>> approach, but I need a kick start as to what I should be looking at.
>> Any tips etc. would be great. Things like should I use a scripting
>> language and so on.
>
> If you do find a way, be sure to post your solution to let us all know.
Will do. Thanks for your comments.
Lionel.
Oliver Wong - 15 Jun 2006 22:51 GMT
>>> The installer must be cross platform, supporting at the very least Linux
>>> and Windows. I would like to check to see if there is valid JRE and
[quoted text clipped - 11 lines]
> installers. I probably don't mind too much about letting the user have to
> install Java, but MySQL is a whole lot less straight forward.
You could use an embedded SQL server instead of MySQL, e.g. Derby or
HSQLDB. http://db.apache.org/derby/ http://hsqldb.org/
You could write some code so that you could easily swap between DB
implementations without modifying the rest of your Java code. When the app
installs, by default, it'd use your internal DB (e.g. HSQLDB). You'll
provide a README file that explains how to edit XML configuration files to
disable your internal DB and use an external one such as MySQL instead.
So users who don't want to bother with setting up a DB will have an
application that "just works right out the box", while power users who want
a higher performance DB can switch to MySQL, ProgreSQL Oracle, or whatever
they've already got installed on their system.
- Oliver
Lionel - 15 Jun 2006 23:29 GMT
>>>> The installer must be cross platform, supporting at the very least
>>>> Linux and Windows. I would like to check to see if there is valid
[quoted text clipped - 27 lines]
> want a higher performance DB can switch to MySQL, ProgreSQL Oracle, or
> whatever they've already got installed on their system.
That's an interesting point. Currently supported is MySQL and Postgres,
possibly some others will work too.
One point to make is that this application is for use in hospitals. So
it's not the sort of thing that is going to be downloaded 100 times a
day and installed. Once installed it should stay there for a long time.
I'll have a look into your suggestion to see if it is suitable.
Lionel.
...
> I'm nearing on completion of my first major Java project. Now it's time
> to start thinking about an installer.
...
> Single jar file contains the program.
> The program uses a compiled jasper report file.
> The program needs to know it's working directory and have a location
> where it can temporarily save an image file for use by the report.
Oliver addressed that point, but if you need to write and
access more permanent files, it is better to store them
relative to user.home than the application directory.
> The program requires several third party jar files.
> The program requires MySQL to be installed.
> The program requires java 1.5 or later.
Assuming Java 1.3+ is on the PC, JWS is a good
option for this deployment.
Once it upgrades the user to 1.5 (if needed) it can
even run an installer for the database on first invocation -
specific to the platform, of course.
> The installer must be cross platform, supporting at the very least Linux
> and Windows. I would like to check to see if there is valid JRE
Assuming the user already has a 1.3+ JRE, that is not a problem.
HTH
Andrew T.
Lionel - 18 Jun 2006 22:57 GMT
> ...
>> I'm nearing on completion of my first major Java project. Now it's time
[quoted text clipped - 19 lines]
> even run an installer for the database on first invocation -
> specific to the platform, of course.
Ok, I'm checking out what Java Web Start can do for me. I'm not sure if
it is a fair assumption that it is installed though?
Lionel.
Andrew T. - 20 Jun 2006 19:00 GMT
> > ...
> >> I'm nearing on completion of my first major Java project. Now it's time
> >> to start thinking about an installer.
.....
> > Assuming Java 1.3+ is on the PC, JWS is a good
> > option for this deployment.
...
> Ok, I'm checking out what Java Web Start can do for me.
Everything on your requirements list.
>..I'm not sure if
> it is a fair assumption that it is installed though?
Are you asking me what your users will be using?
I do not know.
If it is not installed, that is trickier at the start.
There are a variety of possibilities to get the user to basic
1.3+ Java, one of which is to put some links
'You need the Java plug-In for this, download <here>'
and perhaps a little JavasScript (for a nicer user experience)
in a web page.
You could provide the web page off the net, or off the
installer disk.
HTH
Andrew T.