[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
about RMI
From: |
Takashi Okamoto |
Subject: |
about RMI |
Date: |
Thu, 06 Sep 2001 07:33:19 +0900 |
User-agent: |
Wanderlust/2.7.1 (Too Funky) SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.1 (AOI) |
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 <address@hidden>
- about RMI,
Takashi Okamoto <=