Batch processing tool for j2-based

Source: Internet
Author: User

 

Dejar. bat
Decompile Java from jarSource codeFile.

@ Echo off
Rem
Rem decompile the jar
Rem class files will be put in./class
Rem source files will be put in./DSRC
Rem

Set Jad = Jad
Set jar = jar
Set clsdir =./class
Set srcdir =./DSRC

If exist % clsdir % rmdir/S/Q % clsdir %
MD % clsdir %

If exist % srcdir % rmdir/S/Q % srcdir %
MD % srcdir %

Rem ***** unzip jar *****
Copy % 1.jar % clsdir %
Cd % clsdir %
% Jar % XF % 1.jar
Del % 1.jar
CD ..

Rem ***** decompile class *****
% Jad %-o-r-D % srcdir % clsdir %/*. Class % clsdir %/**/*. Class

Echo done!

---------------------------------------------

Jax. bat
Decompress the files in jar to the class directory in the current directory.
Extract the menifest file at the same time.

@ Echo off
Rem
Rem Jax the_jar_file which will be extracted.
Rem class files in it will be put in./class
Rem meta-INF/manifest. MF in it will be put in.
Rem

Set clsdir = "./class"
Set jar = jar

If exist % clsdir % rmdir/S/Q % clsdir %
MD % clsdir %

Rem ****** unzip *****
Copy % 1.jar % clsdir %
Cd % clsdir %
% Jar % XF % 1.jar
Del % 1.jar

Rem ***** move manifest out *****
Move./meta-INF/manifest. MF ..
Rmdir/Q meta-INF

CD ..

Echo done!

---------------------------------------------------

Jaz. bat
Package the files in the class directory by referring to the manifest in the current directory.

@ Echo off
Rem
Rem generate % 1.jar file from
Rem./manifest. MF,./class
Rem

Set clsdir = "./class"
If exist % 1.jar del/Q % 1.jar
Jar CMF manifest. MF % 1.jar-C % clsdir %.

Echo done!

---------------------------------------------------------

Jad-the fast Java decompiler.
Jad home page: http://www.kpdus.com/jad.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.