Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting .jar to .bat

 
pappitha swaminathan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21292
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a simple bat file that does what you want:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic