Haseeb Wali
Haseeb Wali

Reputation: 1171

Jar file not running properly after building in netbeans

I have made a project and when i run it through net beans it runs properly means my log in screen appears and when i enter my id and password it opens next screen....but when i run it using .jar file it is opening login file but when i enter (valid) id and password it is not opening next window. It is blocking log in buton which means it is loading but after some time it is not showing me next screen. If i build or run it using net beans it is not showing a single problem..here is my build out put

ant -f C:\\Users\\Administrator\\Documents\\NetBeansProjects\\IDocCsMain run
init:
Deleting: C:\Users\Administrator\Documents\NetBeansProjects\IDocCsMain\build\built-jar.properties
deps-jar:
 Updating property file:C:\Users\Administrator\Documents\NetBeansProjects\IDocCsMain\build\built-jar.properties

compile:

Upvotes: 0

Views: 2020

Answers (1)

Haseeb Wali
Haseeb Wali

Reputation: 1171

Here is the solution i am writing by myself with the help of "Advise" given to me by "Andrew Thompson". I was getting an icon and setting it on JLabel in constructor. When, i was running it through net beans it was running perfectly but when i ran it without net beans, with .jar file it was not getting path of icon and showing throwing exception(checked it by running it in command prompt). I set my path dynamically and now it is running properly.

Upvotes: 2

Related Questions