Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JAR file behaves differently than in Eclipse(When running in Eclipse the GUI works but not the JAR file)
JAR file behaves differently than in Eclipse [message #903782] Sat, 25 August 2012 22:22 Go to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Hi,

First post here and a newbie to Java and Eclipse (long time programmer). I did some searching around the forum but didn't see anything like this.

Ok I have built a desktop application using Java and Eclipse. When I run it from inside of Eclipse it runs just fine. All of my GUI elements work and the application is great.

But after following the instructions I found How to create JAR file in Eclipse ("codejava.net/ides/eclipse/how-to-create-jar-file-in-eclipse") and tried to run my application the only thing that worked were the 'built in GUI' elements. The FileChooser worked and a message box when closing the application. But all of the GUI elements I put into my application failed.

The zip file I am posting has both the necessary XML input file and the JAR that was created.

Thank you in advance



  • Attachment: HCM.zip
    (Size: 409.91KB, Downloaded 276 times)


David Tannen

[Updated on: Sat, 25 August 2012 22:23]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903783 is a reply to message #903782] Sat, 25 August 2012 22:44 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Quick question: how do you manage your dependencies / libraries?
It looks funny that you include some src-zips of libraries, and then these don't seem to be complete.
Maybe you're just lacking those dependencies on the classpath when running outside Eclipse?

And then, since you mastered to create the jar using Eclipse I don't think the remaining problems are genuine Eclipse issues.

Stephan
Re: JAR file behaves differently than in Eclipse [message #903790 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Stephan,

Thank you for your answers.

Stephan Herrmann wrote on Sat, 25 August 2012 18:44
Quick question: how do you manage your dependencies / libraries?
It looks funny that you include some src-zips of libraries, and then these don't seem to be complete.
Maybe you're just lacking those dependencies on the classpath when running outside Eclipse?


I have no idea how the src-zips of libraries got included. What should I do about that?

I think you are 100% correct on the dependencies not being part of my classpath. Here are the questions I have:
1. How do I figure out what library dependencies I need?
2. Do I create new classpath variables or do I put the libraries in the User Library?

Stephan Herrmann wrote on Sat, 25 August 2012 18:44
And then, since you mastered to create the jar using Eclipse I don't think the remaining problems are genuine Eclipse issues.



Thank you in advance


David Tannen
Re: JAR file behaves differently than in Eclipse [message #903791 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:09]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903792 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:04]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903793 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:10]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903794 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:10]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903795 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:10]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903796 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:10]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903797 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:11]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903798 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:11]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903799 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:11]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903800 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Stephan,
Dang I multiple posted. I guess my posts are being moderated... Sorry about that


David Tannen

[Updated on: Sun, 26 August 2012 13:11]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903801 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:12]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903802 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:12]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903803 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:12]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903804 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:12]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903805 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:13]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903806 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:13]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903807 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:13]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903808 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:13]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903809 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:14]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903810 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:14]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903811 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:14]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903812 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:14]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903813 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:15]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903814 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:15]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903815 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:15]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903816 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:15]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903817 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:15]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903818 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:16]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903819 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:16]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903820 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:16]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903821 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:16]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903822 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:17]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903823 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:17]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903824 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:17]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903825 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:09]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903826 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:08]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903827 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:08]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903828 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:07]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903829 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:07]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903830 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:06]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903831 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:07]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903832 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:06]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903833 is a reply to message #903783] Sun, 26 August 2012 04:40 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:06]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903834 is a reply to message #903783] Sun, 26 August 2012 04:42 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:05]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903835 is a reply to message #903783] Sun, 26 August 2012 04:44 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:05]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903836 is a reply to message #903783] Sun, 26 August 2012 04:48 Go to previous messageGo to next message
David Tannen is currently offline David TannenFriend
Messages: 50
Registered: August 2012
Member
Dang I multiple posted. I guess my posts are being moderated... Sorry about that

David Tannen

[Updated on: Sun, 26 August 2012 13:05]

Report message to a moderator

Re: JAR file behaves differently than in Eclipse [message #903841 is a reply to message #903793] Sun, 26 August 2012 09:39 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
For the jar file: open the export wizard, from there you should be able to figure out how to solve that problem. Do your homework before reposting your question.

For the libraries issue: This forum can't replace basic Java training.

Stephan
Previous Topic:Generating calls to setters/getters
Next Topic:Copyright Issue
Goto Forum:
  


Current Time: Thu Mar 28 10:54:27 GMT 2024

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

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

Back to the top