Class CommandLine
java.lang.Object
com.sun.enterprise.admin.launcher.CommandLine
Universal command line for launching the GlassFish reliably in all scenarios.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandLine(com.sun.enterprise.admin.launcher.CommandLine.CommandFormat format) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends new item without any formatting.voidAppends path, normalized, absolute and quoted if needed.voidappendClassPath(File... paths) Appends classpath argument (whole-cp [paths])voidappendJavaOption(String item) Appends java option without any changes.voidappendJavaOption(String itemKey, Path path) Appends java option.voidappendNativeLibraryPath(File... paths) Appends java system option "java.library.path".voidappendSystemOption(String itemKey, String itemValue) Appends java system option.com.sun.enterprise.admin.launcher.CommandLine.CommandFormatiterator()toList()Converts the object to an unmodifiable list of elements.toString()Generates the final command using an empty space as a separator.Generates the final command using given separator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CommandLine
public CommandLine(com.sun.enterprise.admin.launcher.CommandLine.CommandFormat format) - Parameters:
format- BAT files use specific format compared to command line.
-
-
Method Details
-
getFormat
public com.sun.enterprise.admin.launcher.CommandLine.CommandFormat getFormat()- Returns:
CommandLine.CommandFormat
-
append
Appends new item without any formatting.- Parameters:
item-
-
appendClassPath
Appends classpath argument (whole-cp [paths])- Parameters:
paths-
-
appendNativeLibraryPath
Appends java system option "java.library.path". The value will be wrapped into quotation marks.- Parameters:
paths-
-
append
Appends path, normalized, absolute and quoted if needed.- Parameters:
path-
-
appendJavaOption
Appends java option without any changes.- Parameters:
item-
-
appendJavaOption
Appends java option. The path will be wrapped into quotation marks.- Parameters:
itemKey-path-
-
appendSystemOption
Appends java system option. The value will be wrapped into quotation marks.- Parameters:
itemKey-itemValue-
-
iterator
-
listIterator
- Returns:
ListIterator
-
toString
Generates the final command using an empty space as a separator. -
toString
Generates the final command using given separator.- Parameters:
separator-- Returns:
- the command as a string
-
toList
Converts the object to an unmodifiable list of elements.- Returns:
- list of strings
-