Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Exporting to Jar File
Exporting to Jar File [message #210491] Fri, 11 May 2007 20:50 Go to next message
Eclipse UserFriend
Originally posted by: shuertasw.ghuertasauto.com

Hi,
I have a application that use a DB in JDBC, the connection is by the use
of three jar files that I set in the application project, like "external
jar". The application runs Ok in the IDE, but when I create the jar file
for run the application out of the IDE, the application runs but not
connect to DB. I browse the jar file and see that aren't classes about the
DB. Before in JBuilder there was theses class files in the "jar". My
question is how must I create the jar?.

Thanks in advance!!
Salvador Huertas.
Re: Exporting to Jar File [message #210534 is a reply to message #210491] Sun, 13 May 2007 01:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

Salvador Huertas wrote:
> Hi,
> I have a application that use a DB in JDBC, the connection is by the use
> of three jar files that I set in the application project, like "external
> jar". The application runs Ok in the IDE, but when I create the jar file
> for run the application out of the IDE, the application runs but not
> connect to DB. I browse the jar file and see that aren't classes about
> the DB. Before in JBuilder there was theses class files in the "jar". My
> question is how must I create the jar?.

This question is a FAQ - please search through the previous messages
before posting a question.

JAR files can not contain other JAR files (well, they can contain other
JARs, but they are not used). This is a Java limitation, not an Eclipse
problem.
You will have to write a batch or shell script to run your application
and include all the JARs on the classpath. There are lots of examples of
such scripts on the web.

Hope this helps,
Eric
Re: Exporting to Jar File [message #210574 is a reply to message #210491] Sun, 13 May 2007 18:00 Go to previous message
Eclipse UserFriend
Originally posted by: drulius1AT.suddenlink.net

I don't know if your problem is exactly the same as the one I had, but look
at my post from March 21, 2007 in the thread "Making jar." You may not be
able to use the method I outlined exactly, but it should get you pointed in
the right direction.

Hope this helps,

drulius

shuertasw@ghuertasauto.com (Salvador Huertas) wrote in
news:439a455ffc4d130db53e5a44b8fe5274$1@www.eclipse.org:

> Hi,
> I have a application that use a DB in JDBC, the connection is by the
> use of three jar files that I set in the application project, like
> "external jar". The application runs Ok in the IDE, but when I create
> the jar file for run the application out of the IDE, the application
> runs but not connect to DB. I browse the jar file and see that aren't
> classes about the DB. Before in JBuilder there was theses class files
> in the "jar". My question is how must I create the jar?.
>
> Thanks in advance!!
> Salvador Huertas.
>
Previous Topic:Need help with org.eclipse.core.runtime
Next Topic:Is there an archive of dead tools projects?
Goto Forum:
  


Current Time: Fri Mar 29 09:19:49 GMT 2024

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

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

Back to the top