This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Compiling jar file using gcj
- From: Andrew Haley <aph at redhat dot com>
- To: Swapnil Jain <swapnil at pisces dot net dot in>
- Cc: gcc-help at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Sat, 29 Aug 2009 16:05:51 +0100
- Subject: Re: Compiling jar file using gcj
- References: <5872C486-D36C-4D9D-BB9A-3EB13639CCD4@pisces.net.in>
Swapnil Jain wrote:
> i created a java project using netbeans. it uses 2 libraries
> RXTXcomm.jar & mysql-connector-java.jar
>
> after building the project thru netbeans i get the iRemote.jar file in
> the dist folder.
>
> i want to compile it using gcj to create a binary file. i am using the
> following command
>
> gcj --classpath=lib/RXTXcomm.jar --main=iremote.controller.Controller -o
> iRemote.bin iRemote.jar
>
>
> i get the following error
>
> /tmp/cc6GjIBu.o: In function
> `iremote::device::light::innlink::SignalSender::SignalSender()':
> iRemote.jar:(.text+0x180a7): undefined reference to
> `gnu::io::CommPortIdentifier*
You need to compile RXTXcomm.jar as well, not just point the classpath
at it. i.e. it's a runtime dependency, not just a compile-time
dependency.
Andrew.