I checked gnu/java/rmic/RMIC.java.
I found following code:
// Compiler comp = Compiler.getInstance();
// if (verbose) {
// System.out.println("[Compiling class " + name + "]");
// }
// comp.setDestination(destination);
// boolean result = comp.compile(name);
// if (result == false) {
// throw comp.getException();
// }
So, RMIC can't compile Stab and Skel files currently.
I have a briefly patch. How about it?
--- /home/tokamoto/cvs/classpath/gnu/java/rmi/rmic/RMIC.java Tue Aug 28 08:52:28
2001
+++ RMIC.java Wed Sep 5 09:08:00 2001
@@ -839,16 +839,26 @@
}
private void compile(String name) throws Exception {
- throw new Error ("Not implemented");
+ String args[];
+ if(destination == null){
+ args = new String[1];
+ args[0] = name;
+ } else {
+ args = new String[3];
+ args[0] = "-d";
+ args[1] = destination;
+ args[2] = name;
+ }
+ boolean result = at.dms.kjc.Main.compile(args);
// Compiler comp = Compiler.getInstance();
// if (verbose) {
// System.out.println("[Compiling class " + name + "]");
// }
// comp.setDestination(destination);
// boolean result = comp.compile(name);
-// if (result == false) {
-// throw comp.getException();
-// }
+ if (result == false) {
+ throw new Exception(name + "can't be compiled.");
+ }
}
private static String getPrettyName(Class cls) {
----
This code works with kopi java compiler (http://www.dms.at/kopi/)
which is distributed under GPL:)
Maybe I should write interface and we should select one of compilers
(sun,jikes,kjc..etc) like kaffe.
----
Takashi Okamoto <[EMAIL PROTECTED]>
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath