• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unhandled execption in EXE containing executable jar file.

 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have created one executable Jar file, to which i pass arguements. and from that executable jar file i have created exe file using jar 2 exe converter.

now that exe file is called by another application. and if my java program throws some execptions which i have not handled.

where can i find the execption ???

I have cheked windows EventViewer but could not find anything about the exe.

Can anybody help me out with this issue ???
 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply logs the exception either on console or (more better) in file.
 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah... but what if i havent loged it... and i want to know what was the error... by default does jvm create log file somewhere.....
 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jigar Naik wrote: by default does jvm create log file somewhere.....

NO. As far as my knowledge and experience is concerned the unhandled error/exception goes to the default console. In my case its mostly CMD.
 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So basically it stays in a buffer...
 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't say where it stays exactly but the good practice will be to define checked custom exception class for your app and log them if they get thrown during execution.
 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,

I have done all the logging in my program.. but what i can see in the log file... that it has printed only first 2 statements... and rest of the statement were not printed in to the log files...

plus there has not been logged any error... i have done all the exception handling...

the only possibility i can see is that, there might be an internal error in log4j.
I have checked the log4j api, which says…

You can enable log4j internal logging by defining the log4j.configDebug variable.




I have enabled log4j loggin… but all the log statements are getting printed on console only… what I am trying is to print log4j internal logging statement in a separate file…

How do I do that ???

Below is my log4j.properties file.


Can anybody help me out with this issue…
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic