This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Two - Elementry Questions



I find myself enmeshed in a Java-centric world which seems oblivious to the
horrid performance of the JVM.  My first attempt to alleviate the problem is 
to try using gcj as a replacement for javac.  That is I would like to hope 
that gcj with machine-independent optimization and disabling run time checks
it would be possible to realize a substantial performance enhancement.  My 
test case was to try it with the Apache xerces-1.4.2 package for XML 
processing. (We certainly spend a lot of time in that one, it is self 
contained, and has some simple examples.)  I wasn't successful.  There were, 
of course, a few files that would not compile because of deficiencies in the 
library class files.  So I set the makefile variables to:

JAVAC = gcj -C 
CLPATH = /usr/local/share/libgcj.jar$(CLPATHSEP)$(XERCES_CLASSPATH) 

did a "make clean and followed it with "make".

then I set the variables back to  javac and the appropriate classpath and did 
a "make", expecting to compile the the ones that failed with gcj.  When I 
tried executing the simple DOMWriter example it failed. It died in the main 
method

Question 1:  Are the class files from GCJ interchangeable with class files 
generated by other Java "compilers"?  I would think that class files are 
class files.

Another thing I tried to see if I could get all the files to compile was to 
disable the check for the gcj-compiled attribute and changed the above 
makefile variables to:

JAVAC = gcj -C 
CLPATH = /usr/local/j2sdk1.3.1/jre/lib/rt.jar$(CLPATHSEP)$(XERCES_CLASSPATH)

did my "make clean" and "make".  Not surprisingly, many more of the java 
files compiled.  And, of course, execution failed right off the bat passing 
parameters to the main routine, just like above.

Question 2:  What is the purpose of insisting that one use "libgcj.jar"? Does 
it extend beyond licensing issues? Are not class files, class files?

I must be missing something and would appreciate any guidance.
-- 
Don Rozenberg
rozen@rgv.hp.com
408-343-6266


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]