Java Run Jar package-settings classpath

Source: Internet
Author: User

Sometimes we need to read a properties file from Classpath, and for a separate jar package, it needs to be jar/meta-inf/manifest. MF file to set Classpath so that the program can load files from classpath:

manifest-version:1.0
Implementation-title:
Implementation-version:1.0-snapshot
Implementation-vendor-id:
Built-by:test
Build-jdk:1.7.0_75
Class-path:classes/lib/core-renderer-r8.jar
Created-by:apache Maven
Main-class:batch. Batchmain
Archiver-version:plexus archiver

For running jar packages, the classpath set in the environment variable is invalid.

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.