File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Unhandled execption in EXE containing executable jar file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unhandled execption in EXE containing executable jar file. " Watch "Unhandled execption in EXE containing executable jar file. " New topic
Author

Unhandled execption in EXE containing executable jar file.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
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 ???


Jigar Naik


Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Simply logs the exception either on console or (more better) in file.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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

Joined: Dec 12, 2006
Posts: 757
So basically it stays in a buffer...
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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

Joined: Dec 12, 2006
Posts: 757
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…
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unhandled execption in EXE containing executable jar file.