diff --git a/app/PdeCompiler.java b/app/PdeCompiler.java index b03ae431d..a02716278 100755 --- a/app/PdeCompiler.java +++ b/app/PdeCompiler.java @@ -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); diff --git a/app/PdeSketch.java b/app/PdeSketch.java index 90920867e..079b1210a 100755 --- a/app/PdeSketch.java +++ b/app/PdeSketch.java @@ -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); diff --git a/build/windows/build.xml b/build/windows/build.xml index 982f77492..590c8af93 100755 --- a/build/windows/build.xml +++ b/build/windows/build.xml @@ -15,9 +15,9 @@ - + - + @@ -27,7 +27,7 @@ - + diff --git a/core/processing/core/PMIDlet.java b/core/processing/core/PMIDlet.java index 16222ca79..67687528a 100755 --- a/core/processing/core/PMIDlet.java +++ b/core/processing/core/PMIDlet.java @@ -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); + } }