Learning from a Java project

Source: Internet
Author: User

1. Startup of the Java command line

First, gradle build.

Followed by: Java-dabc.appid=1234-classpath "D:\test\build\lib\*.jar" Com.ctrip.oss.MainClass 1> "D:\test\logs\log.txt" 2 > "D:\test\errors\errors.txt"

which
-D is followed by the runtime configuration parameters, which can be obtained in code via System.getproperty (' Abc.appid ')

-classpath is the *.jar file path generated after compilation is complete

Com.ctrip.oss.MainClass is the main class in which the program runs

1> If there is sl4j in the code, the path file after this parameter will be used to hold the log log file

2> If there is sl4j in the code, the path file after this parameter will be used to hold the error log file

How do I configure the SL4J environment?

Note: The code structure:

2.

Learning from a Java project

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.