Re: [tcljava-dev] Patch: java::import -classpath -resolve
Brought to you by:
mdejong
From: Mo D. <md...@un...> - 2003-04-09 08:10:49
|
On Tue, 8 Apr 2003 22:07:41 -0600 Tom Poindexter <tpo...@ny...> wrote: > Here's a patch to java::import that adds -classpath and -resolve options. > The -classpath option specifies a specific classpath and/or jar files from > which to load the classes being imported. The -resolve passes the > 'resolve' flag to the class loader (see docs for > java.lang.ClassLoader.loadClass() ). I must admit, I don't like the idea of adding a -classpath option to the import command. The java::import command is meant to act like the import statement in Java, in that it allows using a short name for a class instead of the fully qualified name. What is wrong with setting the CLASSPATH or the TCL_CLASSPATH env var before running the java::import command? I also don't see how this -resolve flag fits in with the functionality of the import command. In what situation would one want to pass this -resolve flag, and in what situation would one not want it passed? Why would we want to expose this feature at the script level? I read over the JDK docs but they were not very clear on exactly what the resolve really does. It seems one needs to read the JVM book to find out what "the class is linked" means. Mo |