Re: Compiling jar file using gcj

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.help,gmane.comp.gcc.java.devel
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.