Note: all variables refer to the current file opened within the currently selected editor.
Table 4.3. Properties: Variables for Parameters and Working Directory (example file in editor: c:\java\beginners\HelloWorld.java)
Variable | Description | Example |
---|---|---|
%p |
Current path | c:\java\beginners |
%f |
Current file | HelloWorld.java |
%n |
Current filename without path and extension | HelloWorld |
%e |
Current file extension including the dot "." | .java |
%P |
Name of the parent directory of the current file. | beginners |
%o |
Path to the parent directory. | %o = %p - %P = c:\java .
|
%cp |
Classpath of current setting | depends on the settings but always includes
%p |