[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PROPOSAL] New Virtual Packages and way to handle Classpath



Hallo Jan,

--- Jan Schulz <jasc.usenet@gmx.de> wrote:
> Hallo Dalibor,
> 
> * Dalibor Topic wrote:
> >> A precise interface should be discussed together. Off my head:
> >>   -classpath, -cp, -sourcepath, -O, -d, -g, -deprecation
> >I'd remove a few things from the list, since javac 1.4.2 doesn't support -cp
> >and javac 1.4.2 doesn't support -O.
> 
> I thought that javac 1.4.2 actually added -cp? Anyway, we can seperate
> the interface for java and javac. I don't actually mind, if we have
> -cp, as patching programms to use -classpath should be fairly easy.

It didn't, according to
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javac.html

> java
>   -classpath -bootclasspath -jar -dxx=xx 
> 
> javac
>   -classpath -sourcepath -bootclasspath -d -target -g
> 
> In my opinion it is better to use a jitter than -O, especially if we
> have more that one JVM.

-O is also known to be broken on java 1.1's javac at least. It performs some
illegal optimizations.
 
> I thought it doesn't put the rt jar on the claspath, when you specify
> -classpath. So add the -bootclasspath before the rt.jar (or whatever

That shows how tricky -classpath handling is without an exact specification of
what you expect to see. In general, the concensus seems to be that -classpath
puts something on the CLASSPATH. Where exactely it puts things has changed
between java 1.1, 1.2 and 1.3, so that now it puts something on the CLASSPATH,
but doesn't touch BOOTCLASSPATH, which still contains rt.jar and is sought for
classes first.

> it is names) and it should be fine. If thats the search path for
> classes... Without, we probably can't use kjc, as a javac replacement
> or ant compiler, as the result would be unpredictable, especially when
> a programm wants to have a newer version of one of teh included APIs

I think programs that want to have a news version of the included APIs should
wait for an updated java API, come with their own VM & class library or use
something sane like their own ClassLoader to link to the classes they want. No
userland program should touch bootclasspath.

cheers,
dalibor topic

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



Reply to: