Eric vanberkel wrote:
> 
> Folks,
> 
> Though I'm confessin' that I read a bit less than I should
> maybe,

They (Sun) changed how the $CLASSPATH environment variable and the -cp
and the -classpath command line options work when they went from JDK
1.1.x to 1.2.

The change is for the better.  The new scheme is more flexible and
devorces the development environment and the runtime environment and
also gave more control to the developer and the deployer of Java
applications.

It's at Sun's Java web site.  Look for the release notes of JDK 1.2. 
It's all explained there.

> why do applets in JDK 1.2 ignore my $CLASSPATH?
> It worked with JDK 1.1.4 on my TurboLinux.
> After installing, the applicable text to read says:
> 'No $CLASSPATh, no $JAVA_HOME, just run it!"

That's true for the development environment (the compiler, the debugger,
the profiler, etc.) and the runtime library (java.awt.*, java.lang.*,
etc.).

> Fairly enthusiastic that, but what was wrong with Applets
> conforming to my $CLASSPATH?

An applet is always run from a URL, which is conceptually NOT from your
local system.  An applet may use classes that's available from either
the VM where the applet is run, or the CODEBASE specified in the
<APPLET> tag.

> I found out apps DO mind the $CLASSPATH though.

Yes, and for JDK 1.2, the way the $CLASSPATH environment variable, the
-cp and the -classpath command line options work has changed.  It quite
involved now, and the best advise I can give is to read the
documentation from Sun.  You might get a little bit confused the first
time around, but it not rocket science, you will get it sooner or later.

> I alwyas use a self-made script that goes
> 
> java -classpath .:$CLASSPATH $1
> 
> However, since I installed JDK 1.2-b-prev the script
> 
> appletviewer $1 &
> 
> does not function, and now I found out why.

You did?

-- 
Weiqi Gao
[EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to