How to make CLASSPATH behave like PATH on Windows?  
Author Message
David Cook





PostPosted: 2004-8-20 4:43:00 Top

java-programmer, How to make CLASSPATH behave like PATH on Windows? Windows (XP and NT) allows one to specify environmental variable
(such as PATH and CLASSPATH) at both the SYSTEM-wide level
as well as at the per-USER level.

And the behavior has always been that the value of one's PATH list is
the concatenation of those two ENV specifications.

So, the $64 question is: Is there some way to coerce the resulting
CLASSPATH list to also be a concatenation of both the SYSTEM
and the USER's lists?

(Hopefully, some sort of registry hack can accomplish this!?)

The reason I ask is that today, after installing a Sun 'product' called
JMF (Java Media Framework), it BROKE my existing CLASSPATH
setup. The reason it BROKE it was that BEFORE the installation,
I had my CLASSPATH defined (only) at the SYSTEM level, and it
got inherited into my USER level. But, the (stupid?) JMF kit decided
to 'add' some stuff of its own to the USER classpath, and since one
didn't exist at all, it created one and put its stuff in it.

BUT the unwanted side-effect of that (brilliant?) idea was that now
the only resulting CLASSPATH that the users have is this new one that
the kit created and all the existing entries on the SYSTEM-wide defn
of CLASSPATH now get tossed into the bit-bucket.

Any SUN Java architects out there who can rule on this? Is this a
bug or a feature of the JMF kit? (A registry hack or something similar
for a workaround would be nice.)

Cheers...

Dave


 
gregory.guy





PostPosted: 2004-8-30 16:11:00 Top

java-programmer >> How to make CLASSPATH behave like PATH on Windows? Hi,

I don't think you can do that..... You'll have to use some tricky
methods for that.....

Quiks
--------------
BTW: For those who have to do with monitoring, check the site:
http://www.metamindsolutions.com. It's a great multiplatform
monitoring solution and seems to have been adopted by large accounts


"David Cook" <(who wants to know?)> wrote in message news:<email***@***.com>...
> Windows (XP and NT) allows one to specify environmental variable
> (such as PATH and CLASSPATH) at both the SYSTEM-wide level
> as well as at the per-USER level.
>
> And the behavior has always been that the value of one's PATH list is
> the concatenation of those two ENV specifications.
>
> So, the $64 question is: Is there some way to coerce the resulting
> CLASSPATH list to also be a concatenation of both the SYSTEM
> and the USER's lists?
>
> (Hopefully, some sort of registry hack can accomplish this!?)
>
> The reason I ask is that today, after installing a Sun 'product' called
> JMF (Java Media Framework), it BROKE my existing CLASSPATH
> setup. The reason it BROKE it was that BEFORE the installation,
> I had my CLASSPATH defined (only) at the SYSTEM level, and it
> got inherited into my USER level. But, the (stupid?) JMF kit decided
> to 'add' some stuff of its own to the USER classpath, and since one
> didn't exist at all, it created one and put its stuff in it.
>
> BUT the unwanted side-effect of that (brilliant?) idea was that now
> the only resulting CLASSPATH that the users have is this new one that
> the kit created and all the existing entries on the SYSTEM-wide defn
> of CLASSPATH now get tossed into the bit-bucket.
>
> Any SUN Java architects out there who can rule on this? Is this a
> bug or a feature of the JMF kit? (A registry hack or something similar
> for a workaround would be nice.)
>
> Cheers...
>
> Dave
 
Kelly





PostPosted: 2004-8-30 16:20:00 Top

java-programmer >> How to make CLASSPATH behave like PATH on Windows? Interesting.......

--
All the Best,
Kelly

Microsoft-MVP Windows?XP
2004 Windows MVP "Winny" Award

Troubleshooting Windows XP
http://www.kellys-korner-xp.com

Taskbar Repair Tool Plus!
http://www.kellys-korner-xp.com/taskbarplus!.htm



"Quiks" <email***@***.com> wrote in message
news:email***@***.com...
> Hi,
>
> I don't think you can do that..... You'll have to use some tricky
> methods for that.....
>
> Quiks
> --------------
> BTW: For those who have to do with monitoring, check the site:
> http://www.metamindsolutions.com. It's a great multiplatform
> monitoring solution and seems to have been adopted by large accounts
>
>
> "David Cook" <(who wants to know?)> wrote in message
> news:<email***@***.com>...
>> Windows (XP and NT) allows one to specify environmental variable
>> (such as PATH and CLASSPATH) at both the SYSTEM-wide level
>> as well as at the per-USER level.
>>
>> And the behavior has always been that the value of one's PATH list is
>> the concatenation of those two ENV specifications.
>>
>> So, the $64 question is: Is there some way to coerce the resulting
>> CLASSPATH list to also be a concatenation of both the SYSTEM
>> and the USER's lists?
>>
>> (Hopefully, some sort of registry hack can accomplish this!?)
>>
>> The reason I ask is that today, after installing a Sun 'product' called
>> JMF (Java Media Framework), it BROKE my existing CLASSPATH
>> setup. The reason it BROKE it was that BEFORE the installation,
>> I had my CLASSPATH defined (only) at the SYSTEM level, and it
>> got inherited into my USER level. But, the (stupid?) JMF kit decided
>> to 'add' some stuff of its own to the USER classpath, and since one
>> didn't exist at all, it created one and put its stuff in it.
>>
>> BUT the unwanted side-effect of that (brilliant?) idea was that now
>> the only resulting CLASSPATH that the users have is this new one that
>> the kit created and all the existing entries on the SYSTEM-wide defn
>> of CLASSPATH now get tossed into the bit-bucket.
>>
>> Any SUN Java architects out there who can rule on this? Is this a
>> bug or a feature of the JMF kit? (A registry hack or something similar
>> for a workaround would be nice.)
>>
>> Cheers...
>>
>> Dave