com.sun.akuma
Class JavaVMArguments

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<java.lang.String>
              extended by com.sun.akuma.JavaVMArguments
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.List<java.lang.String>, java.util.RandomAccess

public class JavaVMArguments
extends java.util.ArrayList<java.lang.String>

List of arguments for Java VM and application.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
JavaVMArguments()
           
JavaVMArguments(java.util.Collection<? extends java.lang.String> c)
           
 
Method Summary
static JavaVMArguments current()
          Gets the process argument list of the current process.
static void main(java.lang.String[] args)
           
static JavaVMArguments of(int pid)
          Gets the process argument list of the specified process ID.
 void removeSystemProperty(java.lang.String name)
           
 void removeTail(int n)
          Removes the n items from the end.
 void setSystemProperty(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode
 

Constructor Detail

JavaVMArguments

public JavaVMArguments()

JavaVMArguments

public JavaVMArguments(java.util.Collection<? extends java.lang.String> c)
Method Detail

removeSystemProperty

public void removeSystemProperty(java.lang.String name)

setSystemProperty

public void setSystemProperty(java.lang.String name,
                              java.lang.String value)

removeTail

public void removeTail(int n)
Removes the n items from the end. Useful for removing all the Java arguments to rebuild them.


current

public static JavaVMArguments current()
                               throws java.io.IOException
Gets the process argument list of the current process.

Throws:
java.io.IOException

of

public static JavaVMArguments of(int pid)
                          throws java.io.IOException
Gets the process argument list of the specified process ID.

Parameters:
pid - -1 to indicate the current process.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2012. All Rights Reserved.