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 18:22 Go to next message
David Tannen is currently offline David Tannen
Messages: 48
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 99 times)


David Tannen

[Updated on: Sat, 25 August 2012 18: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 18:44 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 999
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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:48 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:40 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:42 Go to previous messageGo to next message
David Tannen is currently offline David Tannen
Messages: 48
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 09: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 00:44 Go to previous messageGo to previous message
David Tannen is currently offline David Tannen
Messages: 48
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 09:08]

Report message to a moderator

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


Current Time: Thu Aug 28 23:25:58 EDT 2014

Powered by FUDForum. Page generated in 0.13390 seconds