src/share/vm/runtime/arguments.hpp

Print this page




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 







  25 // Arguments parses the command line and recognizes options
  26 
  27 // Invocation API hook typedefs (these should really be defined in jni.hpp)
  28 extern "C" {
  29   typedef void (JNICALL *abort_hook_t)(void);
  30   typedef void (JNICALL *exit_hook_t)(jint code);
  31   typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args);
  32 }
  33 
  34 // Forward declarations
  35 
  36 class SysClassPath;
  37 
  38 // Element describing System and User (-Dkey=value flags) defined property.
  39 
  40 class SystemProperty: public CHeapObj {
  41  private:
  42   char*           _key;
  43   char*           _value;
  44   SystemProperty* _next;


 513   }
 514 
 515   static char *get_java_home() { return _java_home->value(); }
 516   static char *get_dll_dir() { return _sun_boot_library_path->value(); }
 517   static char *get_endorsed_dir() { return _java_endorsed_dirs->value(); }
 518   static char *get_sysclasspath() { return _sun_boot_class_path->value(); }
 519   static char* get_meta_index_path() { return _meta_index_path; }
 520   static char* get_meta_index_dir()  { return _meta_index_dir;  }
 521 
 522   // Operation modi
 523   static Mode mode()                        { return _mode; }
 524 
 525   // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
 526   static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
 527 
 528 #ifdef KERNEL
 529   // For java kernel vm, return property string for kernel properties.
 530   static char *get_kernel_properties();
 531 #endif // KERNEL
 532 };




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_ARGUMENTS_HPP
  26 #define SHARE_VM_RUNTIME_ARGUMENTS_HPP
  27 
  28 #include "runtime/java.hpp"
  29 #include "runtime/perfData.hpp"
  30 #include "utilities/top.hpp"
  31 
  32 // Arguments parses the command line and recognizes options
  33 
  34 // Invocation API hook typedefs (these should really be defined in jni.hpp)
  35 extern "C" {
  36   typedef void (JNICALL *abort_hook_t)(void);
  37   typedef void (JNICALL *exit_hook_t)(jint code);
  38   typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args);
  39 }
  40 
  41 // Forward declarations
  42 
  43 class SysClassPath;
  44 
  45 // Element describing System and User (-Dkey=value flags) defined property.
  46 
  47 class SystemProperty: public CHeapObj {
  48  private:
  49   char*           _key;
  50   char*           _value;
  51   SystemProperty* _next;


 520   }
 521 
 522   static char *get_java_home() { return _java_home->value(); }
 523   static char *get_dll_dir() { return _sun_boot_library_path->value(); }
 524   static char *get_endorsed_dir() { return _java_endorsed_dirs->value(); }
 525   static char *get_sysclasspath() { return _sun_boot_class_path->value(); }
 526   static char* get_meta_index_path() { return _meta_index_path; }
 527   static char* get_meta_index_dir()  { return _meta_index_dir;  }
 528 
 529   // Operation modi
 530   static Mode mode()                        { return _mode; }
 531 
 532   // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
 533   static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
 534 
 535 #ifdef KERNEL
 536   // For java kernel vm, return property string for kernel properties.
 537   static char *get_kernel_properties();
 538 #endif // KERNEL
 539 };
 540 
 541 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP