Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » GCC & MinGW How to compile a user library
GCC & MinGW How to compile a user library [message #446428] Thu, 25 November 2004 09:22 Go to next message
Eclipse UserFriend
Originally posted by: melko.gmx.at

morning!!

I have used this tool to convert my project into runable *.exe file and it
worked perfectly until I built in a library, where I search for the
JDBCDriver!!
I built in it in Eclipse as user-library and then added the rar-files and
when I run the program out of Eclipse it works perfect. But when I want to
compile it to a *.jar file it doesn't include the library and so I cann't
create the *.exe file?! I mean I can create it but when I ckick to connect
then he can not find the Driver that is in the library in a *.jar file!?!?
How ca I solve this problem?! I have tried to put the librarys in the
java-path-folder, where all other librarys, and swt librarys are included
but doesn't work!? Tryed to put it in the swt.jar, doesn't work!! I have
no ideas more?!

How can I, when I make a *.jar file out of Eclipse to say him to include
the library?! Because I cann't run the *.jar file when I make it with
Eclipse?!

Thank you for any suggestion!!

Nice greatings from cold austria.

PS: Excuse my english! ;-)
Re: GCC & MinGW How to compile a user library [message #446430 is a reply to message #446428] Thu, 25 November 2004 10:29 Go to previous messageGo to next message
Radu is currently offline RaduFriend
Messages: 44
Registered: July 2009
Member
Hi,

Please take a look at this plugin http://gcjbuilder.sourceforge.net/
it should help you create native apps and shared objects more easily.

one thing is that if your code uses driver manager to load the driver
class you should put a reference to the driver class somewhere on your
code, like:

com.mysql.Driver driverRef;

This will force the GCJ linker to include the driver class in the
compilation unit.

regards,
radu

melko wrote:
> morning!!
>
> I have used this tool to convert my project into runable *.exe file and
> it worked perfectly until I built in a library, where I search for the
> JDBCDriver!! I built in it in Eclipse as user-library and then added the
> rar-files and when I run the program out of Eclipse it works perfect.
> But when I want to compile it to a *.jar file it doesn't include the
> library and so I cann't create the *.exe file?! I mean I can create it
> but when I ckick to connect then he can not find the Driver that is in
> the library in a *.jar file!?!?
> How ca I solve this problem?! I have tried to put the librarys in the
> java-path-folder, where all other librarys, and swt librarys are
> included but doesn't work!? Tryed to put it in the swt.jar, doesn't
> work!! I have no ideas more?!
>
> How can I, when I make a *.jar file out of Eclipse to say him to include
> the library?! Because I cann't run the *.jar file when I make it with
> Eclipse?!
> Thank you for any suggestion!!
>
> Nice greatings from cold austria.
>
> PS: Excuse my english! ;-)
Re: GCC & MinGW How to compile a user library [message #446458 is a reply to message #446430] Thu, 25 November 2004 11:11 Go to previous message
Eclipse UserFriend
Originally posted by: melko.gmx.at

Hallo! At first thanks for your answer!
But I don't understand what do you mean with reference?!? Could you give
me a code-sample, please?!
How and where should I reference it? And I need all drivers for all
databases because I make a database-talk program and therefore I need all
Driver!

Thank you for your help!

nice greetings, melko!

> one thing is that if your code uses driver manager to load the driver
> class you should put a reference to the driver class somewhere on your
> code, like:

> com.mysql.Driver driverRef;

> This will force the GCJ linker to include the driver class in the
> compilation unit.
Previous Topic:Look and Feel of DirecotryDialog
Next Topic:Get the size of a view
Goto Forum:
  


Current Time: Tue Apr 16 18:43:26 GMT 2024

Powered by FUDForum. Page generated in 1.65260 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top