Reproduced JAVA command parameters in detail:-D

Source: Internet
Author: User

Original link: http://blog.sina.com.cn/s/blog_605f5b4f0100hlt9.html

The JAVA command parameters are detailed:

1.-d<name>=<value> set a system property.

java-d parameter simplification joins multiple jars

When a Java command introduces a jar, it can-cp parameters, but when-CP cannot use wildcards (more than one jar is annoying to write, not *.jar), the usual jar is in the same directory, and more than 1. It was good to find (find)-djava.ext.dirs some days ago.

Such as:

Java-djava.ext.dirs=lib MyClass

You can configure some properties, such as the path, before running.

java-dconfig= "D:/config/config.xml" ABC

This allows you to pass the System.getproperty ("config") in ABC and get this value.

Set the property name/value pair in the system properties of the virtual machine, and the application running on top of this virtual machine is available
This parameter can be used to diagnose when the virtual machine reports that the class cannot find or class conflicts when the virtual machine is loaded from the class.

In addition, javac-d < directory > Specifies the location where the generated class files are stored

Standard System Properties

Key meaning
"file.separator" Character that separates the components of a file path. This is the "on / UNIX and" \ "on Windows.
"java.class.path" Path used to find directories and JAR archives containing class files. Elements of the class path is separated by a platform-specific character specified in the property path.separator .
"java.home" installation directory for Java Runtime environment (JRE)
"java.vendor" JRE Vendor Name
"java.vendor.url" JRE vender URL
"java.version" JRE Version number
"line.separator" Sequence used by operating system to separate lines in text files
"os.arch" Operating System Architecture
"os.name" Operating system Name
"os.version" Operating System version
"path.separator" Path separator character used injava.class.path
"user.dir" User working Directory
"user.home" User Home Directory
"user.name" User account Name

The so-called system Porperty,system refers to the JRE (runtime)system, not the OS.

System. SetProperty ("Net.jxta.tls.principal", "client");
System. SetProperty ("Net.jxta.tls.password", "password");
system. SetProperty ("Jxta_home",system. GetProperty ("Jxta_home", "Client"));
You can use System properties to load multiple drivers

Reproduced JAVA command parameters in detail:-D

Related Article

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.