Workarounds for wierd quirks of jikes compiler, build config changes, print/println added to core

This commit is contained in:
francisli
2005-02-09 07:46:52 +00:00
parent 999466852a
commit 68a926cbe2
4 changed files with 31 additions and 11 deletions

View File

@@ -133,10 +133,11 @@ public class PdeCompiler implements PdeMessageConsumer {
buildPath + File.separator + sketch.code[i].preprocName;
}
*/
//for (int i = 0; i < command.length; i++) {
//System.out.println("cmd " + i + ": " + command[i]);
//}
/*
for (int i = 0; i < command.length; i++) {
System.out.println("cmd " + i + ": " + command[i]);
}
*/
firstErrorFound = false; // haven't found any errors yet
secondErrorFound = false;
@@ -199,7 +200,8 @@ public class PdeCompiler implements PdeMessageConsumer {
}
// success would mean that 'result' is set to zero
return (result == 0); // ? true : false;
//// MOBILE: jikes returns result 1 with wierd errors even though files compile ok
return firstErrorFound;//(result == 0); // ? true : false;
}
@@ -215,7 +217,8 @@ public class PdeCompiler implements PdeMessageConsumer {
public void message(String s) {
// This receives messages as full lines, so a newline needs
// to be added as they're printed to the console.
System.err.println(s);
//// MOBILE: moving to end due to wierd jikes output
//System.err.println(s);
// ignore cautions
if (s.indexOf("Caution") != -1) return;
@@ -284,6 +287,7 @@ public class PdeCompiler implements PdeMessageConsumer {
}
// if executing at this point, this is *at least* the first error
/// MOBILE: moving to end due to wierd jikes output
firstErrorFound = true;
//err += "error:".length();
@@ -327,12 +331,20 @@ public class PdeCompiler implements PdeMessageConsumer {
}
}
//// MOBILE: ignore wierd jikes errors that get output even though it compiles fine
if (description.indexOf("Type java.io.Serializable was not found.") != -1) {
return;
}
if (description.indexOf("Type java.lang.Cloneable was not found.") != -1) {
return;
}
if (description.indexOf("A non-standard version of the type \"java.lang.StringBuffer\" was found.") != -1) {
return;
}
//// MOBILE: moving to end due to wierd jikes output
firstErrorFound = true;
System.err.println(s);
//System.out.println("description = " + description);
//System.out.println("creating exception " + exception);

View File

@@ -1832,7 +1832,7 @@ public class PdeSketch {
wtkLibPath + "midpapi10.jar";
//// this is just to satisfy Jikes which wants java.io.Serializable and java.lang.Cloneable to be reachable...
//System.out.println(System.getProperty ("java.home"));
bootClassPath += File.pathSeparator + System.getProperty("java.home") + File.separator + "lib" + File.separator + "rt.jar";
//bootClassPath += File.pathSeparator + System.getProperty("java.home") + File.separator + "lib" + File.separator + "rt.jar";
String additionalClassPath = "lib" + File.separator + "mobile.jar";
String foundName = build(midletDir.getPath(), name, baseClass, baseImports,
bootClassPath, additionalClassPath);

View File

@@ -15,9 +15,9 @@
<!-- Check if processing has been checked out and set property accordingly-->
<available property="ischeckedout" file="processing" type="dir"/>
<!-- home directory of cygwin -->
<property name="cygwin.dir" value="C:/Sdk/cygwin"/>
<property name="cygwin.dir" value="C:/cygwin"/>
<!-- the absolute path of the basedir, specified here with unix slashes -->
<property name="parent.dir" value="C:/Projects/processing"/>
<property name="parent.dir" value="C:/projects/processing"/>
<!-- the absolute path of a WTK implementation for building core files -->
<property name="wtk.dir" value="C:/WTK22"/>
<!-- the boot classpath to use when compiling core files -->
@@ -27,7 +27,7 @@
</target>
<!-- checks out a tagged copy of processing if it hasn't been done so already. -->
<target name="checkout" unless="ischeckedout">
<target name="checkout" depends="init" unless="ischeckedout">
<!-- perform the cvs update to get clean files. -->
<exec executable="${cygwin.dir}/bin/bash.exe">
<arg value="--login"/>

View File

@@ -359,7 +359,7 @@ public abstract class PMIDlet extends MIDlet implements Runnable {
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (is != null) {
try {
@@ -375,4 +375,12 @@ public abstract class PMIDlet extends MIDlet implements Runnable {
return strings;
}
public final void print(String data) {
System.out.print(data);
}
public final void println(String data) {
System.out.println(data);
}
}