<%
// System attributes
String javaversion = system. getproperty ("Java. Version ");
String javavendor = system. getproperty ("Java. Vendor ");
String javavendorurl = system. getproperty ("Java. Vendor. url ");
String javahome = system. getproperty ("Java. Home ");
String javavmspecificationversion = system. getproperty ("Java. VM. Specification. Version ");
String javavmspecificationvendor = system. getproperty ("Java. VM. Specification. Vendor ");
String javavmspecificationname = system. getproperty ("Java. VM. Specification. Name ");
String javavmversion = system. getproperty ("Java. VM. Version ");
String javavmvendor = system. getproperty ("Java. VM. Vendor ");
String javavmname = system. getproperty ("Java. VM. Name ");
String required pecificationversion = system. getproperty ("Java. Specification. Version ");
String export pecificationvendor = system. getproperty ("Java. Specification. Vendor ");
String response pecificationname = system. getproperty ("Java. Specification. Name ");
String javaclassversion = system. getproperty ("Java. Class. Version ");
String javaclasspath = system. getproperty ("Java. Class. Path ");
String javalibrarypath = system. getproperty ("Java. Library. Path ");
String javaiotmpdir = system. getproperty ("Java. Io. tmpdir ");
String javacompiler = system. getproperty ("Java. compiler ");
String javaextdirs = system. getproperty ("Java. Ext. dirs ");
String osname = system. getproperty ("OS. Name ");
String osarch = system. getproperty ("OS. Arch ");
String osversion = system. getproperty ("OS. Version ");
String fileseparator = system. getproperty ("file. separator ");
String pathseparator = system. getproperty ("path. separator ");
String lineseparator = system. getproperty ("line. separator ");
String username = system. getproperty ("user. Name ");
String userhome = system. getproperty ("user. Home ");
String userdir = system. getproperty ("user. dir ");
%>
Java. Version: Java runtime version
Installation Directory of Java. Home Java
Java. Class. Version: version number of the Java class format
Java. Class. Path: Search Path of the Java class
Java. Io. tmpdir default temporary directory
Timely compiler used by Java. compiler Java
Java. Ext. dirs Java extension package directory
OS. NameOperating SystemName
OS. Arch Operating System Architecture
OS. Version
File. Separator file separator ('/' in UNIX '/')
Path. Separator path separator (':' in UNIX ':')
Line. Separator Line Break ('/N' in UNIX ')
User. Name User Account Name
User. Home user directory
User. dir: current working directory of the user
Test procedure
Class setting
...{
Public static void main (string [] ARGs)
...{
System. Out. println (system. getproperty ("Java. Version "));
System. Out. println (system. getproperty ("Java. Home "));
System. Out. println (system. getproperty ("Java. Class. Version "));
System. Out. println (system. getproperty ("Java. Class. Path "));
System. Out. println (system. getproperty ("Java. Io. tmpdir "));
System. Out. println (system. getproperty ("Java. compiler "));
System. Out. println (system. getproperty ("Java. Ext. dirs "));
System. Out. println (system. getproperty ("OS. Name "));
System. Out. println (system. getproperty ("OS. Arch "));
System. Out. println (system. getproperty ("OS. Version "));
System. Out. println (system. getproperty ("file. separator "));
System. Out. println (system. getproperty ("path. separator "));
System. Out. println (system. getproperty ("line. separator "));
System. Out. println (system. getproperty ("user. Name "));
System. Out. println (system. getproperty ("user. Home "));
System. Out. println (system. getproperty ("user. dir "));
}
}
-
public class DefaultEditorKit
-
-
Extends editorkit
This is a text component that enables the editorTypeThe set of implementations required for the rational use of the text documentation. This implementation provides a default implementation that treats text as plain text and provides the minimum set of operations for a simple editor.
-
Line feed
-
Two attributes are used to process line breaks. System attributes
line.separator
It is defined as platform-independent. It can be "/N", "/R", or "/R/N ". There is also an attribute, which is in
DefaultEditorKit
And the name is
EndOfLineStringProperty
It is automatically defined during document loading and is defined as the first line break that appears. After the document is loaded, it will be set as appropriate
EndOfLineStringProperty
When the document is written back
EndOfLineStringProperty
. However, when the document is in memory, no matter how the document defines the line feed on the disk, the "/N" character will be used to define the line feed. Therefore, "/N" is frequently used for search convenience ". When a new document is created
EndOfLineStringProperty
When not defined, the system attribute is used for writing the document.
Note thatDocument
Use onget/setProperty
Method settingsEndOfLineStringProperty
. Subclass can override this behavior.