You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by broken connection <br...@gmail.com> on 2007/07/18 17:38:03 UTC

Tomcat and JRE redistribution

Hi Friends,
I am trying to make an installer for  a small Tomcat web application and so
i am planning to include Tomcat in the cd itself. I have read the license
agreement for both Tomcat and JRE and I guess I can do that as long as I
distribute the appropriate license files.I have two doubts:

1. I was thinking to make it as easy for the end-user by just copying the
whole Tomcat folder into his drive and then automatically start the
tomcat6.exe and taking him to the webapp's index page.So, this won't prompt
the user for Tomcat Installer and would be like installing Tomcat from a zip
file.Would this work???

2. Tomcat needs JRE and since I am tyring to do a silent install, can i
throw the JRE jar under TOMCAT/lib or under my webapp's WEB-INF/lib and do
you think it will work,instead of making him go through the JRE installation
steps??

I would really appreciate if someone can shed some light on this...

Thanks

RE: Tomcat and JRE redistribution

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: broken connection [mailto:brokenconnection@gmail.com] 
> Subject: Re: Tomcat and JRE redistribution
> 
> If I am not wrong, it use to be in catalina.bat but Tomcat6 
> does not ships that file anymore...

The .bat files are in the .zip download, not the .exe.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat and JRE redistribution

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Broken,

broken connection wrote:
> At the end, the only thing that should matter to TOMCAT or ANT is that they
> should be able to find the classes in the JRE...

Tomcat and Ant don't need to be able to fine JRE classes. When the JRE
starts up, it will provide that information to whatever Java program is
running.

> so I don't understand, why you guys don't recommend this?

Since ant requires the presence of a JRE to run, ant should already know
where the JRE is installed (java.home system property). If you can run
ant without knowing where the JRE is located, then you will also be able
to run Tomcat without knowing where the JRE is. Are you sure that you
even have a problem?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGnlfK9CaO5/Lv0PARAo2QAJ941sU+30PbySqebSA7clMo4xCj7gCfU82V
QfHOb1QoQ/orfjGd7T8QGAk=
=wlKX
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat and JRE redistribution

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: broken connection [mailto:brokenconnection@gmail.com] 
> Subject: Re: Tomcat and JRE redistribution
> 
> At the end, the only thing that should matter to TOMCAT or 
> ANT is that they should be able to find the classes in the
> JRE....so I don't understand, why you guys don't recommend
> this????

You're missing the catch-22: performing any ANT operation requires the
existence of a previously installed and functional JRE.  An ANT script
can't install the JRE it needs to run with...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat and JRE redistribution

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Broken,

broken connection wrote:
> As I told before,its a simple web app for the BA's just for some proof of
> concept and if I try to get too techie.

If this is a POC, why not just walk over to their computers and install
the JRE and Tomcat manually, then deploy the WAR right there. A POC
should be relatively no-frills, so ... why worry about the frills?!

> Anyways, so [right] now i am trying to check if the user machine has JAVA
> installed or not using this batch script:
> 
> @echo off
> ::Find the current (most recent) Java version
> start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java
> Runtime Environment"
> type reg1.txt | find "CurrentVersion" > reg2.txt
> if errorlevel 1 goto nojava
> for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
> if errorlevel 1 goto nojava
> echo Java Version = %JavaTemp%
> del reg1.txt
> del reg2.txt
> 
> But its not running ... so the [fight] is still on....

Well... if you want help with this, then you should tell us what it's
doing (or not doing). I might just have run "java.exe -version" and seen
if you got output. If you do, and you don't care about the version
number, then you're done: no searching necessary. Just blindly run
"java.exe" when you need the runtime ;)

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGn7uz9CaO5/Lv0PARAr//AKCLb3/JgUSbw+gzMpvy6xRqNGyGrQCgpXio
F8jkNUxGrtOLyTywhccKZ5Y=
=U4tc
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat and JRE redistribution

Posted by broken connection <br...@gmail.com>.
>>Are you sure that you even have a problem?
Yes, certainly i do ....... :(

Thanks a lot Mark...that was some excellent stuff there...but see there's
some difference between making a installer for a production level software
or making one for demo purpose...

As I told before,its a simple web app for the BA's just for some proof of
concept and if I try to get too techie..they will be pissed. They don't want
to perform so many steps for a proof of concept stuff....they just want to
click 2 or 3 times and want that the Installer should be smart enough to do
everything for them....

I wholly understand, that the each and every step you mentioned above are
absolute necessity for a production level installer.

Anyways, so rite now i am trying to check if the user machine has JAVA
installed or not using this batch script:

@echo off
::Find the current (most recent) Java version
start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java
Runtime Environment"
type reg1.txt | find "CurrentVersion" > reg2.txt
if errorlevel 1 goto nojava
for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x
if errorlevel 1 goto nojava
echo Java Version = %JavaTemp%
del reg1.txt
del reg2.txt

But its not running ... so the fite is still on....

Cheers


On 7/19/07, Mark H. Wood <mw...@iupui.edu> wrote:
>
> On Wed, Jul 18, 2007 at 01:06:04PM -0400, broken connection wrote:
> > At the end, the only thing that should matter to TOMCAT or ANT is that
> they
> > should be able to find the classes in the JRE....so I don't understand,
> why
> > you guys don't recommend this????
>
> Because if everybody did it that way, customers' machines would be
> littered with dozens of copies of the JRE, each a different version,
> and the customers would descend into the Java annex of DLL Hell.  Not
> good customer relations.  Remember: you are not the only software
> vendor in the universe, and your product is not the only product.
>
> Oh, wait...everybody *does* do it that way. :-{
>
> Wearing my sysadmin. hat:  I would say that it is perfectly okay for
> your install package to *use* its own copy of JRE to run its own copy of
> Ant to install your product.  It is NOT OKAY to leave these behind
> like muddy footprints on the carpet after the work is done.  A proper
> installer should:
>
> 1.  check the PATH and JAVA_HOME to see if there is already a JRE, and
>     not install another one if so;
>
> 2.  never install Ant;
>
> 3.  check CATALINA_HOME to see if there's already a Tomcat installed,
>     and not install another one if so;
>
> 4.  ask the person running it for corrections to all of these paths,
>     and for permission to install *anything* other than the product
>     itself;
>
> 5.  (a bit offtopic) accept all of this information on the commandline
>     so that it can be scripted.
>
> A good installer never installs anything that the customer has already
> provided.  A good installer never behaves as though it thinks it is
> smarter than the customer, even if it is.
>
> A polite installer might simply report that it cannot find X, version
> M.N is available on the CD for the sysadmin.s convenience, and would
> he be pleased to install that, to install an equal or better version
> while this installer waits, or to abort the installation of this
> product.  To be frank, most days I'd be satisfied if an installer just
> told me *exactly* what it wanted and then quit.  That's a lot better
> than many installers that have afflicted me over the years.
>
> Yes, it's a lot of work.  The first time.  After that, if you built
> your installer well, you only need to tweak it a bit for the next
> product.  Your customers will remember that your product told them
> what they needed to know, did what you said it would do, and didn't
> cause any trouble.  That is so rare that they will think of you first
> the next time they need software.
>
> --
> Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
> Typically when a software vendor says that a product is "intuitive" he
> means the exact opposite.
>
>
>

Re: Tomcat and JRE redistribution

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

Mark H. Wood wrote:
> Wearing my sysadmin. hat:  I would say that it is perfectly okay for
> your install package to *use* its own copy of JRE to run its own copy of
> Ant to install your product.  It is NOT OKAY to leave these behind
> like muddy footprints on the carpet after the work is done.  A proper
> installer should:

[snip]

I would say that if you are installing "your application" onto a
customer's computer, it's okay to install support software, as long as
it's all in one place.

Take the example of an application that requires a particular JRE
version or a particular Tomcat version (more likely). If you install
everything all at once, but don't interfere with other installs, you
should be okay.

That means that, for instance, you can't truly "install" the JRE,
because that puts all kinds of stuff into the registry, etc. Instead,
you'll have to do the equivalent of unzipping the JRE into a
subdirectory of your own application, and invoking it directly.

This way, you get the version you want (a requirement) and you don't
interfere with the customer's operating environment (always a nice thing
to avoid).

Consider creating an unzipppable-style JRE and Tomcat, and then install
everything all at once, preferable into the same directory. For instance:

%ProgramFiles%\ReallyCoolApp
%ProgramFiles%\ReallyCoolApp\Java
%ProgramFiles%\ReallyCoolApp\Tomcat

Then, you'll always know that the JRE you want can be invoked like this:

%ProgramFiles%\ReallyCoolApp\Java\bin\javaw.exe

Or, if you want to use Tomcat's startup scripts (which is probably a
good idea), you can do this:

set JAVA_HOME=%ProgramFiles%\ReallyCoolApp\Java
set TOMCAT_HOME=%ProgramFiles%\ReallyCoolApp\Tomcat
%TOMCAT_HOME%\bin\startup.bat

Now, Tomcat can use the JRE you wanted to use, but you aren't stomping
on any JRE that has been installed by the customer.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGn7g49CaO5/Lv0PARAsAPAJ9L2Qz0hw/KPpGVS20GkdiGgFbeIgCfcMIk
IKEVFh7q5EIay042eESuw8A=
=J5JT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat and JRE redistribution

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
On Wed, Jul 18, 2007 at 01:06:04PM -0400, broken connection wrote:
> At the end, the only thing that should matter to TOMCAT or ANT is that they
> should be able to find the classes in the JRE....so I don't understand, why
> you guys don't recommend this????

Because if everybody did it that way, customers' machines would be
littered with dozens of copies of the JRE, each a different version,
and the customers would descend into the Java annex of DLL Hell.  Not
good customer relations.  Remember: you are not the only software
vendor in the universe, and your product is not the only product.

Oh, wait...everybody *does* do it that way. :-{

Wearing my sysadmin. hat:  I would say that it is perfectly okay for
your install package to *use* its own copy of JRE to run its own copy of
Ant to install your product.  It is NOT OKAY to leave these behind
like muddy footprints on the carpet after the work is done.  A proper
installer should:

1.  check the PATH and JAVA_HOME to see if there is already a JRE, and
    not install another one if so;

2.  never install Ant;

3.  check CATALINA_HOME to see if there's already a Tomcat installed,
    and not install another one if so;

4.  ask the person running it for corrections to all of these paths,
    and for permission to install *anything* other than the product
    itself;

5.  (a bit offtopic) accept all of this information on the commandline
    so that it can be scripted.

A good installer never installs anything that the customer has already
provided.  A good installer never behaves as though it thinks it is
smarter than the customer, even if it is.

A polite installer might simply report that it cannot find X, version
M.N is available on the CD for the sysadmin.s convenience, and would
he be pleased to install that, to install an equal or better version
while this installer waits, or to abort the installation of this
product.  To be frank, most days I'd be satisfied if an installer just
told me *exactly* what it wanted and then quit.  That's a lot better
than many installers that have afflicted me over the years.

Yes, it's a lot of work.  The first time.  After that, if you built
your installer well, you only need to tweak it a bit for the next
product.  Your customers will remember that your product told them
what they needed to know, did what you said it would do, and didn't
cause any trouble.  That is so rare that they will think of you first
the next time they need software.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


Re: Tomcat and JRE redistribution

Posted by broken connection <br...@gmail.com>.
Thanks a lot Chris, Steve and Charles,
I really appreciate your help....

>Heh. How are you running ant if you don't know where the JRE is located?
>I'm guessing that the JRE is already on the PATH so you might be
>good-to-go already.

Thats the point .. see actually this is where it started... i have a ANT
based installer and it needed ANT in the path or ANT_HOME to be set....so to
remove those dependencies, i copied the ant.jar directly under the "lib"
folder of the installer and during startup point the classpath to it...so
all dependencies to ANT got resolved...

Now ANT's dependentant on JAVA_HOME or the path and even TOMCAT is dependent
on it.....so that's why I started this thread and asked can I put the "JRE"
jar file under the "lib" folder of my installer or Tomcat/lib etc ... so
that I can make the paths relative to my base directory...

At the end, the only thing that should matter to TOMCAT or ANT is that they
should be able to find the classes in the JRE....so I don't understand, why
you guys don't recommend this????

Thanks



On 7/18/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Broken,
>
> broken connection wrote:
> > My installer is totally ant-based
>
> Heh. How are you running ant if you don't know where the JRE is located?
> I'm guessing that the JRE is already on the PATH so you might be
> good-to-go already.
>
> > and it does not have the capability to
> > search the registry and locate the entries...
>
> If you are desperate, you could write a plug-in for ant and then use it
> to obtain registry values. There's nothing stopping you from reading
> registry values from Java.
>
> > instead if you could tell me
> > which location in the Tomcat points to this JRE, I could over-write that
> > value instead...i think that would be much easier.
>
> startup.bat and friends will use the PATH environment variable to locate
> java.exe (or javaw.exe) if necessary. You can also set JAVA_HOME if you
> want. JAVA_HOME should point to the directory containing the "bin"
> directory which contains java.exe and javaw.exe.
>
> Check out CATALINA.BAT in the "bin" directory of your Tomcat
> installation. It contains comments at the top which explain all the
> different environment variables that you can use to affect Tomcat.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGnkKX9CaO5/Lv0PARAnEaAKCoqJHBYFVBn9ekFoecNIkIyXXM8QCgmrPR
> nbpHw3BUhWtOL6ga2pvX0LU=
> =pTP5
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat and JRE redistribution

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Broken,

broken connection wrote:
> My installer is totally ant-based

Heh. How are you running ant if you don't know where the JRE is located?
I'm guessing that the JRE is already on the PATH so you might be
good-to-go already.

> and it does not have the capability to
> search the registry and locate the entries...

If you are desperate, you could write a plug-in for ant and then use it
to obtain registry values. There's nothing stopping you from reading
registry values from Java.

> instead if you could tell me
> which location in the Tomcat points to this JRE, I could over-write that
> value instead...i think that would be much easier.

startup.bat and friends will use the PATH environment variable to locate
java.exe (or javaw.exe) if necessary. You can also set JAVA_HOME if you
want. JAVA_HOME should point to the directory containing the "bin"
directory which contains java.exe and javaw.exe.

Check out CATALINA.BAT in the "bin" directory of your Tomcat
installation. It contains comments at the top which explain all the
different environment variables that you can use to affect Tomcat.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGnkKX9CaO5/Lv0PARAnEaAKCoqJHBYFVBn9ekFoecNIkIyXXM8QCgmrPR
nbpHw3BUhWtOL6ga2pvX0LU=
=pTP5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat and JRE redistribution

Posted by broken connection <br...@gmail.com>.
Thanks Steve,
My installer is totally ant-based and it does not have the capability to
search the registry and locate the entries...instead if you could tell me
which location in the Tomcat points to this JRE, I could over-write that
value instead...i think that would be much easier.

If I am not wrong, it use to be in catalina.bat but Tomcat6 does not ships
that file anymore...

any clues???

Broken

On 7/18/07, Steve Ochani <oc...@ncc.edu> wrote:
>
> > Thanks Chris,
> > But if I make the users run the JRE installer and install it anywhere
> > they want to.....then how would the Tomcat silent install locate the
> > JRE.
>
> I don't know the details about the installer you are making but if you can
> access the registry
> then have the installer look in this key
>
> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
>
> under that key there is a string value called
>
> CurrentVersion
>
> The value of which is a key name under
>
> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
>
> Which will then have another string value called
> JavaHome
> which has the full path of the jre
>
>
> -Steve O.
>
>
>
> >The whole purpose of why I was suggesting to include JRE inside
> > Tomcat was to resolve this path issue to JRE.
> >
> > The end-users of the app would be business analysts and I don't think
> > they would know how to set up the JAVA_HOME variable, so that I can
> > use that in Tomcat to locate JRE.
> >
> > any clues????
> >
> > Broken
> >
> >
> >
> > On 7/18/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> > > > Broken, > > broken connection wrote: > > I have read the license >
> > > agreement for both Tomcat and JRE and I guess I can do that as long
> > as I > > distribute the appropriate license files. > > You might want
> > to re-read the JRE license agreement. It used to be that > you needed
> > to force your users to separately download Sun's Java > products. This
> > may not be the case any more, but since you are not a > native English
> > speaker (the word "doubt" in place of "question" gave you > away ;) ),
> > you may want to get some real legal advice if you are reading > it in
> > English. > > > 1. I was thinking to make it as easy for the end-user
> > by just copying > the > > whole Tomcat folder into his drive and then
> > automatically start the > > tomcat6.exe and taking him to the webapp's
> > index page.So, this won't > prompt > > the user for Tomcat Installer
> > and would be like installing Tomcat from a > > zip file.Would this
> > work??? > > It should. Of course, you won't be automatically starting
> > the > application as a service in this situation. > > > 2. Tomcat
> > needs JRE and since I am trying to do a silent install, can i > >
> > throw the JRE jar under TOMCAT/lib or under my webapp's WEB-INF/lib
> > and > do > > you think it will work,instead of making him go through
> > the JRE > > installation steps?? > > You can install the JRE anywhere
> > you'd like. I wouldn't install it into > the Tomcat directory at all.
> > Using the Tomcat directory won't make it > any easier... just pick
> > something that makes sense, like Sun's default > of (something like)
> > %ProgramFiles%\Java\jre1.6.0_02 (or whatever version > number is
> > appropriate). > > Unless you require a certain version of Java, you
> > might want to check to > see if Java is already installed somewhere
> > and use the existing version. > > -chris > > >
> >
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat and JRE redistribution

Posted by Steve Ochani <oc...@ncc.edu>.
> Thanks Chris,
> But if I make the users run the JRE installer and install it anywhere
> they want to.....then how would the Tomcat silent install locate the
> JRE. 

I don't know the details about the installer you are making but if you can access the registry 
then have the installer look in this key

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

under that key there is a string value called

CurrentVersion

The value of which is a key name under

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

Which will then have another string value called
JavaHome
which has the full path of the jre


-Steve O.



>The whole purpose of why I was suggesting to include JRE inside
> Tomcat was to resolve this path issue to JRE.
> 
> The end-users of the app would be business analysts and I don't think
> they would know how to set up the JAVA_HOME variable, so that I can
> use that in Tomcat to locate JRE.
> 
> any clues????
> 
> Broken
> 
> 
> 
> On 7/18/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> > > Broken, > > broken connection wrote: > > I have read the license >
> > agreement for both Tomcat and JRE and I guess I can do that as long
> as I > > distribute the appropriate license files. > > You might want
> to re-read the JRE license agreement. It used to be that > you needed
> to force your users to separately download Sun's Java > products. This
> may not be the case any more, but since you are not a > native English
> speaker (the word "doubt" in place of "question" gave you > away ;) ),
> you may want to get some real legal advice if you are reading > it in
> English. > > > 1. I was thinking to make it as easy for the end-user
> by just copying > the > > whole Tomcat folder into his drive and then
> automatically start the > > tomcat6.exe and taking him to the webapp's
> index page.So, this won't > prompt > > the user for Tomcat Installer
> and would be like installing Tomcat from a > > zip file.Would this
> work??? > > It should. Of course, you won't be automatically starting
> the > application as a service in this situation. > > > 2. Tomcat
> needs JRE and since I am trying to do a silent install, can i > >
> throw the JRE jar under TOMCAT/lib or under my webapp's WEB-INF/lib
> and > do > > you think it will work,instead of making him go through
> the JRE > > installation steps?? > > You can install the JRE anywhere
> you'd like. I wouldn't install it into > the Tomcat directory at all.
> Using the Tomcat directory won't make it > any easier... just pick
> something that makes sense, like Sun's default > of (something like)
> %ProgramFiles%\Java\jre1.6.0_02 (or whatever version > number is
> appropriate). > > Unless you require a certain version of Java, you
> might want to check to > see if Java is already installed somewhere
> and use the existing version. > > -chris > > >
> 



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat and JRE redistribution

Posted by broken connection <br...@gmail.com>.
Thanks Chris,
But if I make the users run the JRE installer and install it anywhere they
want to.....then how would the Tomcat silent install locate the JRE. The
whole purpose of why I was suggesting to include JRE inside Tomcat was to
resolve this path issue to JRE.

The end-users of the app would be business analysts and I don't think they
would know how to set up the JAVA_HOME variable, so that I can use that in
Tomcat to locate JRE.

any clues????

Broken



On 7/18/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> Broken,
>
> broken connection wrote:
> > I have read the license
> > agreement for both Tomcat and JRE and I guess I can do that as long as I
> > distribute the appropriate license files.
>
> You might want to re-read the JRE license agreement. It used to be that
> you needed to force your users to separately download Sun's Java
> products. This may not be the case any more, but since you are not a
> native English speaker (the word "doubt" in place of "question" gave you
> away ;) ), you may want to get some real legal advice if you are reading
> it in English.
>
> > 1. I was thinking to make it as easy for the end-user by just copying
> the
> > whole Tomcat folder into his drive and then automatically start the
> > tomcat6.exe and taking him to the webapp's index page.So, this won't
> prompt
> > the user for Tomcat Installer and would be like installing Tomcat from a
> > zip file.Would this work???
>
> It should. Of course, you won't be automatically starting the
> application as a service in this situation.
>
> > 2. Tomcat needs JRE and since I am trying to do a silent install, can i
> > throw the JRE jar under TOMCAT/lib or under my webapp's WEB-INF/lib and
> do
> > you think it will work,instead of making him go through the JRE
> > installation steps??
>
> You can install the JRE anywhere you'd like. I wouldn't install it into
> the Tomcat directory at all. Using the Tomcat directory won't make it
> any easier... just pick something that makes sense, like Sun's default
> of (something like) %ProgramFiles%\Java\jre1.6.0_02 (or whatever version
> number is appropriate).
>
> Unless you require a certain version of Java, you might want to check to
> see if Java is already installed somewhere and use the existing version.
>
> -chris
>
>
>

Re: Tomcat and JRE redistribution

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Broken,

broken connection wrote:
> I have read the license
> agreement for both Tomcat and JRE and I guess I can do that as long as I
> distribute the appropriate license files.

You might want to re-read the JRE license agreement. It used to be that
you needed to force your users to separately download Sun's Java
products. This may not be the case any more, but since you are not a
native English speaker (the word "doubt" in place of "question" gave you
away ;) ), you may want to get some real legal advice if you are reading
it in English.

> 1. I was thinking to make it as easy for the end-user by just copying the
> whole Tomcat folder into his drive and then automatically start the
> tomcat6.exe and taking him to the webapp's index page.So, this won't prompt
> the user for Tomcat Installer and would be like installing Tomcat from a
> zip file.Would this work???

It should. Of course, you won't be automatically starting the
application as a service in this situation.

> 2. Tomcat needs JRE and since I am trying to do a silent install, can i
> throw the JRE jar under TOMCAT/lib or under my webapp's WEB-INF/lib and do
> you think it will work,instead of making him go through the JRE
> installation steps??

You can install the JRE anywhere you'd like. I wouldn't install it into
the Tomcat directory at all. Using the Tomcat directory won't make it
any easier... just pick something that makes sense, like Sun's default
of (something like) %ProgramFiles%\Java\jre1.6.0_02 (or whatever version
number is appropriate).

Unless you require a certain version of Java, you might want to check to
see if Java is already installed somewhere and use the existing version.

-chris