Update of /cvsroot/nice/Nice/src/nice/tools/compiler
In directory sc8-pr-cvs1:/tmp/cvs-serv2286/src/nice/tools/compiler
Modified Files:
native.nice
Log Message:
Fixed the main class name for gcj compilation.
Explicitely specify the classpath as empty, since the jar should be
self-contained, and nice.jar which is on the classpath interferes.
Index: native.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/compiler/native.nice,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** native.nice 16 Oct 2002 11:44:34 -0000 1.3
--- native.nice 16 Jul 2003 14:07:59 -0000 1.4
***************
*** 21,24 ****
--- 21,26 ----
*/
+ import java.io.*;
+
void produceNativeProgram(?String nativeCompiler, String pkg,
String output, String jar)
***************
*** 37,45 ****
try{
Process p = Runtime.getRuntime().exec
! ([gcj, "--main=" + pkg + ".package",
"-o", output, jar ]);
p.waitFor();
if (p.exitValue() != 0)
! fail();
}
catch(java.io.IOException e) {
--- 39,60 ----
try{
Process p = Runtime.getRuntime().exec
! ([gcj,
! "--classpath=", // We set the classpath to null to ignore nice.jar
! "--main=" + pkg + ".fun",
"-o", output, jar ]);
p.waitFor();
if (p.exitValue() != 0)
! {
! fail();
!
! // Print the content of stderr.
! let in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
! try {
! for (String line = in.readLine(); line != null;
! line = in.readLine())
! System.out.println(line);
! }
! catch(IOException ex) {}
! }
}
catch(java.io.IOException e) {
|