You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Rainer Jung <ra...@kippdata.de> on 2011/06/20 14:50:38 UTC

Overhauling setclasspath.(bat|sh)?

1) Renaming

Since quite some time now the setclasspath script doesn't have anything
to do with setting a class path. It only searches for JRE / JDK and sets
up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.

So it would be more correct to call it checkjava.sh or setupjava.sh or
whatever.

Do you think it's too late for TC 7 to rename the script?

Good ideas for a new name?

2) Removing BASEDIR

In addition it contains a validity check for BASEDIR. This is bogus:
whereever setclasspath is sources, we directly before set BASEDIR to the
path from which we source setclasspath. In addition, apart from the
validity check, BASEDIR is never ever used.

I'd say we can safely remove BASEDIR (not setting it in catalina.* and
not checking it in setclasspath.*). Makes the scripts a bit simpler.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Overhauling setclasspath.(bat|sh)?

Posted by Leon Rosenberg <ro...@gmail.com>.
now when you say it, it does really make sense ;-)
thanx
leon

On Mon, Jun 20, 2011 at 3:15 PM, Rainer Jung <ra...@kippdata.de> wrote:
> On 20.06.2011 14:54, Leon Rosenberg wrote:
>> On Mon, Jun 20, 2011 at 2:50 PM, Rainer Jung <ra...@kippdata.de> wrote:
>>> 1) Renaming
>>>
>>> Since quite some time now the setclasspath script doesn't have anything
>>> to do with setting a class path. It only searches for JRE / JDK and sets
>>> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>>>
>>> So it would be more correct to call it checkjava.sh or setupjava.sh or
>>> whatever.
>>>
>>> Do you think it's too late for TC 7 to rename the script?
>>>
>>> Good ideas for a new name?
>>>
>> <2cents>
>> Hello Rainer,
>>
>> the last and only time I used setclasspath.sh I was using it to set
>> custom classpath (adding a folder with config to the classpath).
>> For me setclasspath as name made perfectly sense till now ;-)
>>
>> regards
>> Leon
>> </2cents>
>
> The "right" place for this and any other customization of the startup
> variables is setenv.sh. Another reason for renaming ;)
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Overhauling setclasspath.(bat|sh)?

Posted by Rainer Jung <ra...@kippdata.de>.
On 20.06.2011 14:54, Leon Rosenberg wrote:
> On Mon, Jun 20, 2011 at 2:50 PM, Rainer Jung <ra...@kippdata.de> wrote:
>> 1) Renaming
>>
>> Since quite some time now the setclasspath script doesn't have anything
>> to do with setting a class path. It only searches for JRE / JDK and sets
>> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>>
>> So it would be more correct to call it checkjava.sh or setupjava.sh or
>> whatever.
>>
>> Do you think it's too late for TC 7 to rename the script?
>>
>> Good ideas for a new name?
>>
> <2cents>
> Hello Rainer,
> 
> the last and only time I used setclasspath.sh I was using it to set
> custom classpath (adding a folder with config to the classpath).
> For me setclasspath as name made perfectly sense till now ;-)
> 
> regards
> Leon
> </2cents>

The "right" place for this and any other customization of the startup
variables is setenv.sh. Another reason for renaming ;)

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Overhauling setclasspath.(bat|sh)?

Posted by Leon Rosenberg <ro...@gmail.com>.
On Mon, Jun 20, 2011 at 2:50 PM, Rainer Jung <ra...@kippdata.de> wrote:
> 1) Renaming
>
> Since quite some time now the setclasspath script doesn't have anything
> to do with setting a class path. It only searches for JRE / JDK and sets
> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>
> So it would be more correct to call it checkjava.sh or setupjava.sh or
> whatever.
>
> Do you think it's too late for TC 7 to rename the script?
>
> Good ideas for a new name?
>
<2cents>
Hello Rainer,

the last and only time I used setclasspath.sh I was using it to set
custom classpath (adding a folder with config to the classpath).
For me setclasspath as name made perfectly sense till now ;-)

regards
Leon
</2cents>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Overhauling setclasspath.(bat|sh)?

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Chris,

On 23.06.2011 16:29, Christopher Schultz wrote:
> Rainer,
> 
> On 6/23/2011 7:33 AM, Rainer Jung wrote:
>> On 21.06.2011 11:40, Konstantin Kolinko wrote:
>>> 2011/6/20 Rainer Jung <ra...@kippdata.de>:
>>>> 1) Renaming
>>>>
>>>> Since quite some time now the setclasspath script doesn't have anything
>>>> to do with setting a class path. It only searches for JRE / JDK and sets
>>>> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>>>>
>>>> So it would be more correct to call it checkjava.sh or setupjava.sh or
>>>> whatever.
>>>>
>>>> Do you think it's too late for TC 7 to rename the script?
>>>>
>>>> Good ideas for a new name?
>>>>
>>>
>>> The name may be mentioned in mailing list archives or elsewhere.
>>> I do not think it is worth renaming, but won't oppose it.
>>
>> Since at least Leon reported back he took the name as a suggestion to
>> include classpath customization in there and I can imagine there are
>> others as well for whom we would break their installation when
>> upgrading, I suggest we postpone renaming to TC 8. That might be the
>> time for a bigger script refactoring using shell and bat functions to
>> keep the catalina and tool-wrapper scripts in sync more easily.
> 
> It seems reasonable to allow for both setupjava.sh (or whatever the
> preferred name is) AND setclasspath.sh and prefer the former: if it
> exists, run that instead of setclasspath.sh. Also, we could issue a WARN
> message to the console if setclasspath.sh exists yet still run it.

We could, but the scripts are already pretty long and complex for simple
start scripts. I hesitate making them even harder to understand. I think
it's not worth the benefit for TC 7.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Overhauling setclasspath.(bat|sh)?

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

On 6/23/2011 7:33 AM, Rainer Jung wrote:
> On 21.06.2011 11:40, Konstantin Kolinko wrote:
>> 2011/6/20 Rainer Jung <ra...@kippdata.de>:
>>> 1) Renaming
>>>
>>> Since quite some time now the setclasspath script doesn't have anything
>>> to do with setting a class path. It only searches for JRE / JDK and sets
>>> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>>>
>>> So it would be more correct to call it checkjava.sh or setupjava.sh or
>>> whatever.
>>>
>>> Do you think it's too late for TC 7 to rename the script?
>>>
>>> Good ideas for a new name?
>>>
>>
>> The name may be mentioned in mailing list archives or elsewhere.
>> I do not think it is worth renaming, but won't oppose it.
> 
> Since at least Leon reported back he took the name as a suggestion to
> include classpath customization in there and I can imagine there are
> others as well for whom we would break their installation when
> upgrading, I suggest we postpone renaming to TC 8. That might be the
> time for a bigger script refactoring using shell and bat functions to
> keep the catalina and tool-wrapper scripts in sync more easily.

It seems reasonable to allow for both setupjava.sh (or whatever the
preferred name is) AND setclasspath.sh and prefer the former: if it
exists, run that instead of setclasspath.sh. Also, we could issue a WARN
message to the console if setclasspath.sh exists yet still run it.

-chris


Re: Overhauling setclasspath.(bat|sh)?

Posted by Rainer Jung <ra...@kippdata.de>.
On 21.06.2011 11:40, Konstantin Kolinko wrote:
> 2011/6/20 Rainer Jung <ra...@kippdata.de>:
>> 1) Renaming
>>
>> Since quite some time now the setclasspath script doesn't have anything
>> to do with setting a class path. It only searches for JRE / JDK and sets
>> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>>
>> So it would be more correct to call it checkjava.sh or setupjava.sh or
>> whatever.
>>
>> Do you think it's too late for TC 7 to rename the script?
>>
>> Good ideas for a new name?
>>
> 
> The name may be mentioned in mailing list archives or elsewhere.
> I do not think it is worth renaming, but won't oppose it.

Since at least Leon reported back he took the name as a suggestion to
include classpath customization in there and I can imagine there are
others as well for whom we would break their installation when
upgrading, I suggest we postpone renaming to TC 8. That might be the
time for a bigger script refactoring using shell and bat functions to
keep the catalina and tool-wrapper scripts in sync more easily.

>> 2) Removing BASEDIR
>>
>> In addition it contains a validity check for BASEDIR. This is bogus:
>> whereever setclasspath is sources, we directly before set BASEDIR to the
>> path from which we source setclasspath. In addition, apart from the
>> validity check, BASEDIR is never ever used.
> 
> It is used:
> set "JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed"
> 
> but given that it always is equal to CATALINA_HOME I think it is OK to
> replace it with CATALINA_HOME.

Removed / repaced in r1138835.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Overhauling setclasspath.(bat|sh)?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/6/20 Rainer Jung <ra...@kippdata.de>:
> 1) Renaming
>
> Since quite some time now the setclasspath script doesn't have anything
> to do with setting a class path. It only searches for JRE / JDK and sets
> up the path to the Java or JDB binary plus JAVA_ENDORSED_DIRS.
>
> So it would be more correct to call it checkjava.sh or setupjava.sh or
> whatever.
>
> Do you think it's too late for TC 7 to rename the script?
>
> Good ideas for a new name?
>

The name may be mentioned in mailing list archives or elsewhere.
I do not think it is worth renaming, but won't oppose it.

> 2) Removing BASEDIR
>
> In addition it contains a validity check for BASEDIR. This is bogus:
> whereever setclasspath is sources, we directly before set BASEDIR to the
> path from which we source setclasspath. In addition, apart from the
> validity check, BASEDIR is never ever used.

It is used:
set "JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed"

but given that it always is equal to CATALINA_HOME I think it is OK to
replace it with CATALINA_HOME.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org