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]
Other format: [Raw text]

Re: Compiling jar file using gcj


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.



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