Some kind soul had already hacked in a Microsoft workaround, but the Linux
port of the Sun VM does the same thing. Ergo, I broadened the hack a little.
:-)
-- /v\atthew
--
Matthew L Daniel Never put off until tomorrow what you can do today.
Wizard There might be a law against it by that time.
[EMAIL PROTECTED] -- `/usr/bin/fortune`
diff -u -r1.4 JikesJavaCompiler.java
--- jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java 2001/02/08
13:37:54 1.4
+++ jasper/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java 2001/03/30
+05:34:53
@@ -72,6 +72,7 @@
*
* @author Jeffrey Chiu
* @author Hans Bergsten <[EMAIL PROTECTED]>
+ * @author Matthew L Daniel ([EMAIL PROTECTED])
*/
public class JikesJavaCompiler implements JavaCompiler {
@@ -83,8 +84,10 @@
* Microsoft does not report it's internal classpath in
* System.getProperty(java.class.path) which results in jikes to fail.
* (Internal classpath with other JVMs contains for instance rt.jar).
+ * The Sun Linux VMs also exhibit this "feature," thus, this is a vendor
+ * specific classpath.
*/
- static StringBuffer MicrosoftClasspath = null;
+ static StringBuffer vendorClasspath = null;
String encoding;
String classpath;
@@ -138,8 +141,8 @@
// Used to dynamically load classpath if using Microsoft
// virtual machine
- if (MicrosoftClasspath==null) {
- MicrosoftClasspath = new StringBuffer(200);
+ if (vendorClasspath==null) {
+ vendorClasspath = new StringBuffer(200);
if (System.getProperty("java.vendor").startsWith("Microsoft")) {
quote = "\"";
//Get Microsoft classpath
@@ -148,9 +151,17 @@
File libDir=new File(javaHome);
String[] zips=libDir.list();
for(int i=0;i<zips.length;i++) {
- MicrosoftClasspath.append(";" + javaHome + "\\" + zips[i]);
+ vendorClasspath.append(";" + javaHome + "\\" + zips[i]);
}
}
+ // Strangely enough, this is the name of the property file for
+ // IBM's VM also.
+ String sunBootClassPath = System.getProperty("sun.boot.class.path");
+ if (sunBootClassPath != null) {
+ // This classpath is already in native format (with regard to
+ // File.separator and File.pathSeparator
+ vendorClasspath.append(sunBootClassPath);
+ }
}
String[] compilerCmd = null;
@@ -159,7 +170,7 @@
compilerCmd = new String[] {
quote + compilerPath + quote,
//XXX - add encoding once Jikes supports it
- "-classpath", quote + classpath + MicrosoftClasspath + quote,
+ "-classpath", quote + classpath + vendorClasspath + quote,
"-d", quote + outdir + quote,
"-nowarn",
quote + source + quote
@@ -168,7 +179,7 @@
compilerCmd = new String[] {
quote + compilerPath + quote,
//XXX - add encoding once Jikes supports it
- "-classpath", quote + classpath + MicrosoftClasspath + quote,
+ "-classpath", quote + classpath + vendorClasspath + quote,
"-nowarn",
quote + source + quote
};