Compiling JServ to binaries

Konrad Ciborowski Konrad.Ciborowski@omicron.comarch.pl
Fri Apr 14 02:41:00 GMT 2000


     This is the first time I send a mail to this list
so please be nice to a newcomer :)

     I have Red Hat 6.0
I have succesfully installed gcj and so far it has worked
perfectly. 
     Some time ago, however, I set up my Apache server
and created several servlet zones (using JServ).
     Recently I started considering compiling Apache JServ
to a binary file. 
     I reached a stage where the gcj returns just one
compile error (this is taken from the test version of my
system, hence the rather agricultural looking command line):

gcj --main=JServ JServ.class /root/test/java/lang/*.class
/root/test/javax/servl
et/http/*.class /root/test/javax/servlet/*.class ../java/lang/*.class
../java/se
curity/*.class ../java/util/*.class ../java/recycle/*.class
../java/recycle/pool
/*.class ../java/net/*.class ./JServConnection.class ./JServLog.class
./JServSer
vletManager.class ./JServLogChannels.class ./JServDefs.class
./Ajpv12InputStream
.class 
               
     This produces:
                                                                                
org/apache/java/lang/AdaptiveClassLoader.java: In class
`org.apache.java.lang.Ad
aptiveClassLoader':
org/apache/java/lang/AdaptiveClassLoader.java: In method
`getResource(java.lang.
String)':
org/apache/java/lang/AdaptiveClassLoader.java:674: Class
'java.lang.ClassLoader'
 has no method named 'getSystemResource' matching signature
'(Ljava/lang/String;
)Ljava/net/URL;'

     To check things out I wrote a simple Java program:

import java.util.*;
public class Try {

         public static void init(ClassLoader a)
         {
                a.getSystemResource(new String("am"));
         }
}

     javac has no trouble compiling this one but gcj again returns:

Try.java: In method `init(java.lang.ClassLoader)':
Try.java:6: Can't find method `getSystemResource(Ljava/lang/String;)' in
class `
java.lang.ClassLoader'.
                a.getSystemResource(new String("am"));
                 ^
1 error


     The funny thing is that the ClassLoader.class file is the
very same that was installed during the libgcj installation.
Does this simply mean that gcj is not fully compliant with
jdk 1.1 (getSystemResource is a jdk 1.1 method)? Or perhaps
there is something else I am missing?
     Thanks in advance for your help.



-- 
***********************************************************************

 - One school believes that high taxes are most profitable for the
   poor as there is more money in the budget for social purposes. The
   other one claims that low taxes are better for the poor as the rich
   ones can keep more money for investments that give work to the
   unemployed ones etc. Which side does your party support?
 - Both of these schools are right but we reject both viewpoints.

 ( from a TV debate before the elections in a certain European country )

                                  Konrad Ciborowski
                                  Krakow, Poland


More information about the Java mailing list