This section describes the command-line tools included with PreEmptive Protection™ DashO™. Use them to:
- Integrate DashO into a build process when you cannot use the provided Gradle or Ant integrations.
- Launch the DashO GUI.
- Generate a Shelf Life token.
- Add a watermark to a JAR and read a watermark from a JAR.
DashO Command Line
Use dashocmd to execute a DashO project from the command line.
dashocmd [options] [projectfile]| Argument | Description |
|---|---|
projectfile |
DashO project file |
Command-line options must begin with -.
| Options | Description |
|---|---|
-d, --debug
|
Print verbose messages with additional debug information |
-e, --printStackTraces
|
Print stack traces for exceptions |
-f, --force
|
Force execution (see Dynamic Class Loading for details). Force global option is preferred over this option. |
--file-version
|
Show project file version and exit |
-h, --help
|
Display command line help |
--license <licenseString {LicenseKey[:e-mail]}>
|
Specify a DashO license |
-p, --properties <filename>
|
Load system properties from a file |
--pathMap <filename>
|
Use inputs and outputs from a specified path map file (Android Mode only) |
-q, --quiet
|
Print minimal amount of messages. Overrides -v/--verbose and -d/--debug.
|
-v, --verbose
|
Print verbose (additional, more detailed) messages |
--version
|
Show DashO version/license information and exit |
Building Projects from the Command Line
To execute a project file from the command line, use:
dashocmd [options] projectfileMultiple warnings may be emitted during a build. If DashO encounters an error, the process stops immediately with exit code 1.
DashOGUI Command Line
Use dashogui to launch the user interface.
dashogui [options] [projectfile|mapfile]| Argument | Description |
|---|---|
projectfile |
DashO project file to open for editing. |
mapfile |
DashO Renaming map file to open for decoding a stack trace. |
Command-line options must begin with -.
| Options | Description |
|---|---|
--clearPrefs
|
Reset user preferences |
--create <project>
|
Create or re-initialize the project file |
-d, --debug
|
Print verbose messages with additional debug information |
-e, --printStackTraces
|
Print stack traces for exceptions |
--file-version
|
Show project file version and exit |
-h, --help
|
Display command line help |
--license <licenseString {LicenseKey[:e-mail]}>
|
Specify a DashO license |
-q, --quiet
|
Print minimal amount of messages. Overrides -v/--verbose and -d/--debug.
|
-v, --verbose
|
Print verbose messages |
--version
|
Show DashO version/license information and exit |
--wizardCreate <project/dir>
|
Create or re-initialize the project using the New Project Wizard |
ConvertMap
The ConvertMap.jar conversion utility converts a mapfile to a format suitable for upload to analytics services for decoding stack traces.
Run java -jar ConvertMap.jar --help at a command line to see the options available for the utility.
Configure DashO
You can configure the Java runtime environment used by DashO and its utilities. You can also configure command-line options that are always passed to them.
To apply settings to your user account, copy dashorc.bat (Windows) or dashorc (macOS or Linux/GNU) from the DashO Home directory to your home directory. On Linux and macOS, rename the copied file to .dashorc.
You can specify these options:
| Option | Description |
|---|---|
javaOptions |
Arguments always passed to the JVM, for example javaOptions=-verbose:gc. |
memoryStart |
Initial heap size, for example memoryStart=512m. |
memoryMax |
Maximum heap size, for example memoryMax=2048m. |
stackSize |
Stack size, for example stackSize=1m. |
options |
Arguments always passed to dashocmd, dashogui, premark, and tokengenerator, for example options=--verbose --printStackTraces. |
DASHO_JAVA_HOME |
Path to a specific Java installation, under which the tool will run. Examples follow. |
C:\Program Files\AdoptOpenJDK\jdk-11.x.y for Windows
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home for macOS
/usr/java/jdk-11.x.y for LinuxThese options are used by antconfig, dashocmd, dashogui, premark, and tokengenerator.
Support for Proxies
If DashO runs in an environment that requires a proxy to access the internet, configure the proxy by setting the following standard Java system properties:
| Property | Description |
|---|---|
https.proxyHost |
Host name or IP address of the proxy server. |
https.proxyPort |
Port number for the proxy. |
https.proxyUser |
Username for proxy authentication. |
https.proxyPassword |
Password for proxy authentication. |
Set these properties in dashorc.bat on Windows or dashorc on macOS or Linux/GNU. If your proxy does not require authentication, specify only https.proxyHost and https.proxyPort. If it requires basic authentication, configure all four properties. Use https, the protocol DashO uses to communicate to the license server.
https.proxyUser and https.proxyPassword do not appear to be supported by Java directly, according to the documentation, but these names are supported in Apache's HttpClient that DashO uses.
Shelf Life TokenGenerator
Use the TokenGenerator tool to create Shelf Life tokens.
tokengenerator [options]Command-line options must begin with -.
| Options | Description |
|---|---|
-d, --date <date>
|
Specifies an expiration date (MM/DD/YYYY) |
-e, --printStackTraces
|
Print stack traces for exceptions |
-f, --file <token-file>
|
Specifies a token file |
-h, --help
|
Display command line help |
-k, --key <key-file>
|
Specifies a Shelf Life key file |
-p, --property <name=value>
|
Specifies a Token property |
--period <days>
|
Specifies the Expiration period, the number of days after a start date before the token expires. Start date is specified during injection. |
--print
|
Print information about a token file |
-q, --quiet
|
Print minimal amount of messages. Overrides -v/--verbose
|
-v, --verbose
|
Print verbose messages |
-w, --warningdate <date>
|
Specifies an expiration warning date (MM/DD/YYYY) |
--warningperiod <days>
|
Specifies an expiration warning period (number of days before expiration on which warnings should be issued). |
Watermarking with PreMark
Use the PreMark command-line tool to add or read a watermark. It can watermark a JAR without starting DashO, including a JAR that has not been obfuscated by DashO.
premark [options] inputfileCommand-line options must begin with -.
| Options | Description |
|---|---|
-c, --charmap <charmap>
|
Character map name
(6bit-a, 6bit-b, 7bit-a, 4bit-a, utf8)
|
-e, --printStackTraces
|
Print stack traces for exceptions |
-h, --help
|
Display command line help |
--license <licenseString {LicenseKey[:e-mail]}>
|
Specify a DashO license |
-m, --mark <watermark>
|
Instructs the tool to watermark inputfile with
the specified <watermark> string.
|
-o, --output <file>
|
Specifies the path where the tool should output the watermarked JAR. |
-p, --passphrase <passphrase>
|
Sets a passphrase to encrypt/decrypt watermark string |
-q, --quiet
|
Print minimal amount of messages. Overrides -v/--verbose
|
-r, --read
|
Read watermark from specified inputfile and
print it to the standard output.
|
-t, --truncate
|
Instructs the tool to truncate the watermark if it is too long. Default behavior is to error in this case. |
-v, --verbose
|
Print verbose messages |
--version
|
Show PreMark tool version and exit |
Ant integration
DashO can integrate directly with the Ant build system through a custom Ant task.
C and install the ant integration using antconfig and antinstall.
Gradle Integration
DashO can integrate directly with the Gradle build system through the DashO Gradle Plugin for Android or the DashO Gradle Plugins for Java.