Sending this to the main jde list for more discussion. Background: I
wrote this patch so that the system classes (rt.jar) would be added to
jikes command line using -bootclasspath rather than -classpath. This
was to prevent a conflict in versions between any inherited
BOOTCLASSPATH environment variable (see jikes manpage), and the rt.jar
located by jde (which can depend on the jde-jdk variable for
targetting different JVM versions). (I encountered this problem which
is why I wrote the patch). The question is, what is the best way to
add the system classes when using jikes. Javier indicates that using
-bootclasspath may interfere with people using it for other purposes
(but at this point I'm not sure how)
Javier S. Lopez wrote:
> Could you send me the patch? The attachment you sent seems to be empty.
Sure, here it is, inlined:
------
Index: lisp/jde-compile.el
===================================================================
RCS file: /pack/anoncvs/jde/lisp/jde-compile.el,v
retrieving revision 1.62
diff -u -r1.62 jde-compile.el
--- lisp/jde-compile.el 2004/08/21 04:29:20 1.62
+++ lisp/jde-compile.el 2004/10/11 01:04:49
@@ -1007,7 +1007,7 @@
(list "+E")
jde-compile-option-command-line-args))
-(defmethod jde-compile-classpath-arg ((this jde-compile-jikes))
+(defmethod jde-compile-bootclasspath-arg ((this jde-compile-jikes))
"Returns the classpath argument for this compiler."
(let ((classpath (call-next-method))
(rt (expand-file-name "jre/lib/rt.jar" (jde-get-jdk-dir))))
@@ -1018,7 +1018,7 @@
(concat (cadr classpath)
jde-classpath-separator
rt)))
- (setq classpath (list "-classpath" rt))))
+ (setq classpath (list "-bootclasspath" rt))))
classpath))
(defmethod jde-compile-get-args ((this jde-compile-jikes))
------
Thus jikes gets the non-overridden definition of
jde-compile-classpath-arg, and the inferred system classes are added
using -bootclasspath
> I took a look at Ant and I was mistaken about its behavior. Ant does not add
> anything at all to the classpath or boot class path. Perhaps we should do the
> same.
As in, using the jikes compiler doesn't require either
classpath/bootclasspath parameters in the build.xml or environment
variables to be set in order to work? Then they must be adding an
implicit rt.jar to jikes somehow when they invoke it (otherwise jikes
wouldn't be able to compile it).
Cheers,
Len.