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

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



> > Packages, which want to contribute a alternative for /usr/bin/java
> > and its manpage must provide java-runtime. The alternative must
> > accept the option '-classpath', which sets the classpath and
> > autmatically adds the right rt.jar. The must depend on java-common.
> 
> You need to specify what you mean by setting the classpath more
> closely.  Preferably, explain the semantics you want using an example.
> Current wording is too vague.

Can we use $CLASSPATH instead of -classpath?  From my experience making
packages work with both free and proprietary JVMs, setting $CLASSPATH
before calling the java runtime (instead of passing -classpath, -cp,
whatever) has caused the least breakage.

In addition, if a user wants to add their own classes to the classpath
(e.g., with jython where adding your own classes can be advantageous
even if the app itself doesn't need them), they can set $CLASSPATH
before running the script.  The script then sets:

  export CLASSPATH="foo.jar:bar.jar:$CLASSPATH"

and everything just works.  This is somewhat more difficult to arrange
with command-line options.

Ben.



Reply to: