# Us Javac in a batch file



## molemenacer (Aug 24, 2006)

Hi all,

I am struggling with using Javac inside a batch file. I am trying to build 6 .jar files and cannot get it to work.

Can someone give me some guidence into the code required for doing this

Thanks in advance


----------



## Chicon (Jul 29, 2004)

Hi molemenacer,

*javac* is the Java compiler, you can't build *jar* files with it.

To build *jar*, you have first to compile the needed classes and eventually create the *manifest*.
After that, use the command *jar*, for example in a batch :

*"C:\Program Files\Java\jdk1.6.0\bin\jar.exe" cvf Placement.jar Placement.class*


----------

