This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Using gcj
- From: Samuel Michael Fredland <sfredland at cas dot org>
- To: java at gcc dot gnu dot org
- Date: Mon, 24 Nov 2003 16:04:49 -0500
- Subject: Using gcj
Note: I don't know if I automatically get CC'd when someone replies to
this posting, so please copy me at slf29@cas.org, if you think it may be
necessary.
I am a newbie to gcj (and gcc) and I am having trouble getting it to
work with third party libraries.
I have a Java program, ACDProcessor, which uses Xerces and Xalan, as
well as GNU regular expressions and log4j and I don't remember what
else. I have included the appropriate jars in the CLASSPATH and with the
-I command line option. I also included:
-l-org-w3c-dom \
-l-org-xml-sax \
on the command line to pick up gcj's versions of these libraries. The
full command that I am running is listed at the bottom of this message
for reference.
When I run gcj (via my shell script), I get errors like this:
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:410:
undefined reference to `javax::xml::transform::stream::StreamResult::class$'
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:410:
undefined reference to `javax::xml::transform::stream::StreamResult::class$'
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:410:
undefined reference to
`javax::xml::transform::stream::StreamResult::StreamResult[in-charge](java::io::Writer*)'
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:421:
undefined reference to `org::apache::xerces::parsers::DOMParser::class$'
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:421:
undefined reference to `org::apache::xerces::parsers::DOMParser::class$'
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:421:
undefined reference to
`org::apache::xerces::parsers::DOMParser::DOMParser[in-charge]()'
/tmp/ccxPQIyr.o: In function
`org::cas::properties::acd::ACDProcessor::<clinit>()':
/home/slf29/props/org/cas/properties/acd/ACDProcessor.java:84: undefined
reference to `org::apache::log4j::Logger::getLogger(java::lang::Class*)'
Notice that it is not finding log4j, which does not have a native gcj
implementation, nor is it finding xerces, which is supposed to be
implemented in native code for gcj, nor can it find some XML-related
classes in javax.xml.transform, which is part of the Java standard XSLT API.
What am I doing wrong?
Here is the command file I am running:
acd=/home/slf29/props/org/cas/properties/acd
utils=/home/slf29/props/org/cas/properties/utilities
gcc=/volws/pmd24/ldatae/gcc-3.3
restr=/vol/javapkgs/restricted
ora=/vol/ora_client/product/8.1.7/jdbc/lib
${gcc}/bin/gcj \
-L${gcc}/lib \
-I${gcc}/share/java/libgcj-3.3.jar \
-I/home/slf29/OptionManager-0.01a.jar \
-I/home/slf29/props \
${restr}/gnuregexp/gnu.regexp-1.1.4/lib/gnu-regexp-1.1.4.jar \
-I${restr}/xerces/xerces-2_2_1/xercesImpl.jar \
-I${restr}/xerces/xerces-2_2_1/xercesSamples.jar \
-I${restr}/xerces/xerces-2_2_1/xmlParserAPIs.jar \
-I${restr}/xalan/xalan-j_2_4_1/bin/xalan.jar \
-I${restr}/xalan/xalan-j_2_4_1/bin/xml-apis.jar \
-I${restr}/log4j/jakarta-log4j-1.2.7/dist/lib/log4j-1.2.7.jar \
-I${ora}/classes111.zip \
-I${ora}/nls_charset11.zip \
-I${restr}/gnuregexp/gnu.regexp-1.1.4/lib/gnu-regexp-1.1.4.jar \
-l-org-w3c-dom \
-l-org-xml-sax \
-o acd \
--main=org.cas.properties.acd.ACDProcessor \
${acd}/ACDProcessor.java \
${acd}/ACDProcessorException.java \
${acd}/PropertyQueueInterface.java \
${acd}/FilePropertyQueue.java \
${acd}/PhysPropRow.java \
${utils}/SequenceGenerator.java \
${utils}/MiscUtils.java \
${utils}/TextUtils.java \
${utils}/XMLSerializer.java
-Sam