Meaningless Drivel is fun!*
The moose likes IDEs, Version Control and other tools and the fly likes Converting .jar to .bat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Converting .jar to .bat" Watch "Converting .jar to .bat" New topic
Author

Converting .jar to .bat

pappitha swaminathan
Greenhorn

Joined: Aug 16, 2011
Posts: 9
Hi,

I am having my own executable jar named "SFTP.jar" which includes jsch.jar, mail.jar and activation.jar. I want to convert the whole content to .bat file as SFTP.bat.

Could you please help me in this. Since am unaware of conversion.

P.S : My jar is working fine. i want it as .bat file.

Thanks in advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18110
    
    8

But... a jar file is a container for Java classes and perhaps other resources. It's structured like a zip file internally. Whereas a .bat file is a text file containing a script of commands which are meant to be executed sequentially.

So I have no idea what you mean by converting a jar file to a bat file. It's like asking to convert a train timetable to a bicycle. But perhaps you could explain what you want, and perhaps give an example.
pappitha swaminathan
Greenhorn

Joined: Aug 16, 2011
Posts: 9
Hi Paul,

Thans for your reply. Wat i mean is, jar files can be executed through command line rite, those content should be in a text file which is saved as ".bat" and execute.

Am having a problem that my jar will work if it contains third paty api as "mail.jar", "jsch.jar". i want to set class path for those in text file and execute.

i dint mean to convert train to bicycle, want to ride train like bicycle.

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

Here is a simple bat file that does what you want:



JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting .jar to .bat
 
Similar Threads
Opening .jar from .bat shortcut...
Class Path Issues
jvm property in jar
How do I deploy my application using a jar?
run bat file within java