Problem with parameter name being modified when ant hits Jar package

Source: Internet
Author: User
Tags vars

42678117

After using ant to hit the jar package, it is found that the method name in the jar package automatically adds the "param" prefix in front of it, causing spring's bean injection to fail because the bean name is incorrectly initialized.

Workaround:

Add debug= "True" debuglevel= "lines, VARs, source" in Build.xml's Javac command for these two line properties

The cause of the problem is:

    • The ant package default Javac command is Debug=false.
    • When Debug opens, the jar package will be larger than the original package (my original 250K package, opened after debug to 320K, One-third larger)
    • If you just keep the variable name, you can abbreviate the debuglevel= "VARs" so that the jar package becomes smaller. (I've got a 320K bag here, it's 280K)
    • Debuglevel= the parameters of "lines, VARs, source" are described below

Lines: Writes the line number information from the source file to the class file, which is used to generate a mapping between the method byte stream offset and the source code line number in the class file. If this property is not specified, the printed line number is not visible in the stack exception information.
The Vars:local variable property establishes a mapping between the local variables part of the stack frame of the method and the local variable name and descriptor in the source code. With this property, when debugging, we can see the value of the variable.
Source: This property is specified at compile time, which writes the source file's property information, such as the source file name, to the class file

Problem with parameter name being modified when ant hits Jar package

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.