mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-28 08:39:56 +00:00
Merge
This commit is contained in:
commit
7784c5eec4
@ -238,3 +238,4 @@ d086227bfc45d124f09b3bd72a07956b4073bf71 jdk8-b111
|
||||
4f2011496393a26dcfd7b1f7787a3673ddd32599 jdk8-b114
|
||||
763ada2a1d8c5962bc8c3d297e57c562d2e95338 jdk8-b115
|
||||
cbfe5da942c63ef865cab4a7159e01eff7d7fcf5 jdk8-b116
|
||||
a4afb0a8d55ef75aef5b0d77b434070468fb89f8 jdk8-b117
|
||||
|
||||
@ -238,3 +238,4 @@ a259ff3e42d91da68f4d4f09d7eb9dc22bc024fc jdk8-b113
|
||||
0bbccf77c23e566170b88b52c2cf28e5d31ce927 jdk8-b114
|
||||
8d07115924b7d703a5048adb24e8aba751442f13 jdk8-b115
|
||||
5fdc4465208933ba704825b2b05e1afd062235fb jdk8-b116
|
||||
e53d1ee4d2ae898f1cf58688d45a5afe7c482173 jdk8-b117
|
||||
|
||||
@ -395,3 +395,5 @@ f6962730bbde82f279a0ae3a1c14bc5e58096c6e jdk8-b111
|
||||
e510dfdec6dd701410f3398ed86ebcdff0cca63a hs25-b58
|
||||
52b076e6ffae247c1c7d8b7aba995195be2b6fc2 jdk8-b116
|
||||
c78d517c7ea47501b456e707afd4b78e7b5b202e hs25-b59
|
||||
f573d00213b7170c2ff856f9cd83cd148437f5b9 jdk8-b117
|
||||
abad3b2d905d9e1ad767c94baa94aba6ed5b207b hs25-b60
|
||||
|
||||
@ -24,8 +24,9 @@
|
||||
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.runtime.Arguments;
|
||||
import sun.jvm.hotspot.runtime.VM;
|
||||
|
||||
public class JInfo extends Tool {
|
||||
public JInfo() {
|
||||
@ -138,14 +139,33 @@ public class JInfo extends Tool {
|
||||
}
|
||||
|
||||
private void printVMFlags() {
|
||||
VM.Flag[] flags = VM.getVM().getCommandLineFlags();
|
||||
System.out.print("Non-default VM flags: ");
|
||||
for (VM.Flag flag : flags) {
|
||||
if (flag.getOrigin() == 0) {
|
||||
// only print flags which aren't their defaults
|
||||
continue;
|
||||
}
|
||||
if (flag.isBool()) {
|
||||
String onoff = flag.getBool() ? "+" : "-";
|
||||
System.out.print("-XX:" + onoff + flag.getName() + " ");
|
||||
} else {
|
||||
System.out.print("-XX:" + flag.getName() + "="
|
||||
+ flag.getValue() + " ");
|
||||
}
|
||||
}
|
||||
System.out.println();
|
||||
|
||||
System.out.print("Command line: ");
|
||||
String str = Arguments.getJVMFlags();
|
||||
if (str != null) {
|
||||
System.out.println(str);
|
||||
System.out.print(str + " ");
|
||||
}
|
||||
str = Arguments.getJVMArgs();
|
||||
if (str != null) {
|
||||
System.out.println(str);
|
||||
System.out.print(str);
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
private int mode;
|
||||
|
||||
@ -25,11 +25,11 @@
|
||||
package sun.jvm.hotspot.tools;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import sun.jvm.hotspot.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.HotSpotAgent;
|
||||
import sun.jvm.hotspot.debugger.DebuggerException;
|
||||
import sun.jvm.hotspot.debugger.JVMDebugger;
|
||||
import sun.jvm.hotspot.runtime.VM;
|
||||
|
||||
// generic command line or GUI tool.
|
||||
// override run & code main as shown below.
|
||||
@ -147,6 +147,7 @@ public abstract class Tool implements Runnable {
|
||||
}
|
||||
|
||||
PrintStream err = System.err;
|
||||
PrintStream out = System.out;
|
||||
|
||||
int pid = 0;
|
||||
String coreFileName = null;
|
||||
@ -180,18 +181,18 @@ public abstract class Tool implements Runnable {
|
||||
try {
|
||||
switch (debugeeType) {
|
||||
case DEBUGEE_PID:
|
||||
err.println("Attaching to process ID " + pid + ", please wait...");
|
||||
out.println("Attaching to process ID " + pid + ", please wait...");
|
||||
agent.attach(pid);
|
||||
break;
|
||||
|
||||
case DEBUGEE_CORE:
|
||||
err.println("Attaching to core " + coreFileName +
|
||||
out.println("Attaching to core " + coreFileName +
|
||||
" from executable " + executableName + ", please wait...");
|
||||
agent.attach(executableName, coreFileName);
|
||||
break;
|
||||
|
||||
case DEBUGEE_REMOTE:
|
||||
err.println("Attaching to remote server " + remoteServer + ", please wait...");
|
||||
out.println("Attaching to remote server " + remoteServer + ", please wait...");
|
||||
agent.attach(remoteServer);
|
||||
break;
|
||||
}
|
||||
@ -218,7 +219,7 @@ public abstract class Tool implements Runnable {
|
||||
return 1;
|
||||
}
|
||||
|
||||
err.println("Debugger attached successfully.");
|
||||
out.println("Debugger attached successfully.");
|
||||
startInternal();
|
||||
return 0;
|
||||
}
|
||||
@ -237,14 +238,14 @@ public abstract class Tool implements Runnable {
|
||||
// Remains of the start mechanism, common to both start methods.
|
||||
private void startInternal() {
|
||||
|
||||
PrintStream err = System.err;
|
||||
PrintStream out = System.out;
|
||||
VM vm = VM.getVM();
|
||||
if (vm.isCore()) {
|
||||
err.println("Core build detected.");
|
||||
out.println("Core build detected.");
|
||||
} else if (vm.isClientCompiler()) {
|
||||
err.println("Client compiler detected.");
|
||||
out.println("Client compiler detected.");
|
||||
} else if (vm.isServerCompiler()) {
|
||||
err.println("Server compiler detected.");
|
||||
out.println("Server compiler detected.");
|
||||
} else {
|
||||
throw new RuntimeException("Fatal error: "
|
||||
+ "should have been able to detect core/C1/C2 build");
|
||||
@ -252,8 +253,8 @@ public abstract class Tool implements Runnable {
|
||||
|
||||
String version = vm.getVMRelease();
|
||||
if (version != null) {
|
||||
err.print("JVM version is ");
|
||||
err.println(version);
|
||||
out.print("JVM version is ");
|
||||
out.println(version);
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=59
|
||||
HS_BUILD_NUMBER=60
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
||||
@ -3001,6 +3001,10 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
|
||||
// sp should be pointing at the return address to the caller (3)
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
// restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Stack bang to make sure there's enough room for these interpreter frames.
|
||||
if (UseStackBanging) {
|
||||
__ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
|
||||
@ -3020,9 +3024,6 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
__ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
|
||||
__ movl(counter, rbx);
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Now adjust the caller's stack to make up for the extra locals
|
||||
// but record the original sp so that we can save it in the skeletal interpreter
|
||||
// frame and the stack walking of interpreter_sender will get the unextended sp
|
||||
@ -3220,6 +3221,10 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
|
||||
// sp should be pointing at the return address to the caller (3)
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
// restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Stack bang to make sure there's enough room for these interpreter frames.
|
||||
if (UseStackBanging) {
|
||||
__ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
|
||||
@ -3240,9 +3245,6 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
__ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
|
||||
__ movl(counter, rbx);
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Now adjust the caller's stack to make up for the extra locals
|
||||
// but record the original sp so that we can save it in the skeletal interpreter
|
||||
// frame and the stack walking of interpreter_sender will get the unextended sp
|
||||
|
||||
@ -3471,6 +3471,10 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
|
||||
// rsp should be pointing at the return address to the caller (3)
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
// restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Stack bang to make sure there's enough room for these interpreter frames.
|
||||
if (UseStackBanging) {
|
||||
__ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
|
||||
@ -3489,9 +3493,6 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
// Load counter into rdx
|
||||
__ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Now adjust the caller's stack to make up for the extra locals
|
||||
// but record the original sp so that we can save it in the skeletal interpreter
|
||||
// frame and the stack walking of interpreter_sender will get the unextended sp
|
||||
@ -3663,6 +3664,10 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
|
||||
// rsp should be pointing at the return address to the caller (3)
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
// restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
|
||||
__ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
|
||||
// Stack bang to make sure there's enough room for these interpreter frames.
|
||||
if (UseStackBanging) {
|
||||
__ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
|
||||
@ -3670,27 +3675,16 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
}
|
||||
|
||||
// Load address of array of frame pcs into rcx (address*)
|
||||
__ movptr(rcx,
|
||||
Address(rdi,
|
||||
Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
|
||||
__ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
|
||||
|
||||
// Trash the return pc
|
||||
__ addptr(rsp, wordSize);
|
||||
|
||||
// Load address of array of frame sizes into rsi (intptr_t*)
|
||||
__ movptr(rsi, Address(rdi,
|
||||
Deoptimization::UnrollBlock::
|
||||
frame_sizes_offset_in_bytes()));
|
||||
__ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock:: frame_sizes_offset_in_bytes()));
|
||||
|
||||
// Counter
|
||||
__ movl(rdx, Address(rdi,
|
||||
Deoptimization::UnrollBlock::
|
||||
number_of_frames_offset_in_bytes())); // (int)
|
||||
|
||||
// Pick up the initial fp we should save
|
||||
__ movptr(rbp,
|
||||
Address(rdi,
|
||||
Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
|
||||
__ movl(rdx, Address(rdi, Deoptimization::UnrollBlock:: number_of_frames_offset_in_bytes())); // (int)
|
||||
|
||||
// Now adjust the caller's stack to make up for the extra locals but
|
||||
// record the original sp so that we can save it in the skeletal
|
||||
@ -3700,9 +3694,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
const Register sender_sp = r8;
|
||||
|
||||
__ mov(sender_sp, rsp);
|
||||
__ movl(rbx, Address(rdi,
|
||||
Deoptimization::UnrollBlock::
|
||||
caller_adjustment_offset_in_bytes())); // (int)
|
||||
__ movl(rbx, Address(rdi, Deoptimization::UnrollBlock:: caller_adjustment_offset_in_bytes())); // (int)
|
||||
__ subptr(rsp, rbx);
|
||||
|
||||
// Push interpreter frames in a loop
|
||||
|
||||
@ -1003,21 +1003,15 @@ void ciEnv::register_method(ciMethod* target,
|
||||
// Free codeBlobs
|
||||
code_buffer->free_blob();
|
||||
|
||||
if (nm == NULL) {
|
||||
// The CodeCache is full. Print out warning and disable compilation.
|
||||
record_failure("code cache is full");
|
||||
{
|
||||
MutexUnlocker ml(Compile_lock);
|
||||
MutexUnlocker locker(MethodCompileQueue_lock);
|
||||
CompileBroker::handle_full_code_cache();
|
||||
}
|
||||
} else {
|
||||
if (nm != NULL) {
|
||||
nm->set_has_unsafe_access(has_unsafe_access);
|
||||
nm->set_has_wide_vectors(has_wide_vectors);
|
||||
|
||||
// Record successful registration.
|
||||
// (Put nm into the task handle *before* publishing to the Java heap.)
|
||||
if (task() != NULL) task()->set_code(nm);
|
||||
if (task() != NULL) {
|
||||
task()->set_code(nm);
|
||||
}
|
||||
|
||||
if (entry_bci == InvocationEntryBci) {
|
||||
if (TieredCompilation) {
|
||||
@ -1055,12 +1049,16 @@ void ciEnv::register_method(ciMethod* target,
|
||||
method->method_holder()->add_osr_nmethod(nm);
|
||||
}
|
||||
}
|
||||
}
|
||||
// JVMTI -- compiled method notification (must be done outside lock)
|
||||
if (nm != NULL) {
|
||||
nm->post_compiled_method_load_event();
|
||||
}
|
||||
} // safepoints are allowed again
|
||||
|
||||
if (nm != NULL) {
|
||||
// JVMTI -- compiled method notification (must be done outside lock)
|
||||
nm->post_compiled_method_load_event();
|
||||
} else {
|
||||
// The CodeCache is full. Print out warning and disable compilation.
|
||||
record_failure("code cache is full");
|
||||
CompileBroker::handle_full_code_cache();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
#include "prims/jvmtiImpl.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "services/threadService.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
|
||||
|
||||
@ -50,6 +51,7 @@ MetadataOnStackMark::MetadataOnStackMark() {
|
||||
CodeCache::alive_nmethods_do(nmethod::mark_on_stack);
|
||||
CompileBroker::mark_on_stack();
|
||||
JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||
ThreadService::metadata_do(Metadata::mark_on_stack);
|
||||
}
|
||||
|
||||
MetadataOnStackMark::~MetadataOnStackMark() {
|
||||
|
||||
@ -141,7 +141,6 @@ class SymbolPropertyTable;
|
||||
/* NOTE: needed too early in bootstrapping process to have checks based on JDK version */ \
|
||||
/* Universe::is_gte_jdk14x_version() is not set up by this point. */ \
|
||||
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
|
||||
do_klass(lambda_MagicLambdaImpl_klass, java_lang_invoke_MagicLambdaImpl, Opt ) \
|
||||
do_klass(reflect_MagicAccessorImpl_klass, sun_reflect_MagicAccessorImpl, Opt ) \
|
||||
do_klass(reflect_MethodAccessorImpl_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \
|
||||
do_klass(reflect_ConstructorAccessorImpl_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \
|
||||
|
||||
@ -188,10 +188,8 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul
|
||||
bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {
|
||||
Symbol* name = klass->name();
|
||||
Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass();
|
||||
Klass* lambda_magic_klass = SystemDictionary::lambda_MagicLambdaImpl_klass();
|
||||
|
||||
bool is_reflect = refl_magic_klass != NULL && klass->is_subtype_of(refl_magic_klass);
|
||||
bool is_lambda = lambda_magic_klass != NULL && klass->is_subtype_of(lambda_magic_klass);
|
||||
|
||||
return (should_verify_for(klass->class_loader(), should_verify_class) &&
|
||||
// return if the class is a bootstrapping class
|
||||
@ -215,9 +213,7 @@ bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool shou
|
||||
// NOTE: this is called too early in the bootstrapping process to be
|
||||
// guarded by Universe::is_gte_jdk14x_version()/UseNewReflection.
|
||||
// Also for lambda generated code, gte jdk8
|
||||
(!is_reflect || VerifyReflectionBytecodes) &&
|
||||
(!is_lambda || VerifyLambdaBytecodes)
|
||||
);
|
||||
(!is_reflect || VerifyReflectionBytecodes));
|
||||
}
|
||||
|
||||
Symbol* Verifier::inference_verify(
|
||||
|
||||
@ -273,7 +273,6 @@
|
||||
template(java_lang_invoke_Stable_signature, "Ljava/lang/invoke/Stable;") \
|
||||
template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
|
||||
template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;") \
|
||||
template(java_lang_invoke_MagicLambdaImpl, "java/lang/invoke/MagicLambdaImpl") \
|
||||
/* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */ \
|
||||
template(findMethodHandleType_name, "findMethodHandleType") \
|
||||
template(findMethodHandleType_signature, "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
|
||||
|
||||
@ -70,12 +70,14 @@ void Rewriter::compute_index_maps() {
|
||||
}
|
||||
|
||||
// Unrewrite the bytecodes if an error occurs.
|
||||
void Rewriter::restore_bytecodes(TRAPS) {
|
||||
void Rewriter::restore_bytecodes() {
|
||||
int len = _methods->length();
|
||||
bool invokespecial_error = false;
|
||||
|
||||
for (int i = len-1; i >= 0; i--) {
|
||||
Method* method = _methods->at(i);
|
||||
scan_method(method, true, CHECK);
|
||||
scan_method(method, true, &invokespecial_error);
|
||||
assert(!invokespecial_error, "reversing should not get an invokespecial error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,22 +162,21 @@ void Rewriter::rewrite_member_reference(address bcp, int offset, bool reverse) {
|
||||
// These cannot share cpCache entries. It's unclear if all invokespecial to
|
||||
// InterfaceMethodrefs would resolve to the same thing so a new cpCache entry
|
||||
// is created for each one. This was added with lambda.
|
||||
void Rewriter::rewrite_invokespecial(address bcp, int offset, bool reverse, TRAPS) {
|
||||
static int count = 0;
|
||||
void Rewriter::rewrite_invokespecial(address bcp, int offset, bool reverse, bool* invokespecial_error) {
|
||||
address p = bcp + offset;
|
||||
if (!reverse) {
|
||||
int cp_index = Bytes::get_Java_u2(p);
|
||||
if (_pool->tag_at(cp_index).is_interface_method()) {
|
||||
int cache_index = add_invokespecial_cp_cache_entry(cp_index);
|
||||
if (cache_index != (int)(jushort) cache_index) {
|
||||
THROW_MSG(vmSymbols::java_lang_InternalError(),
|
||||
"This classfile overflows invokespecial for interfaces "
|
||||
"and cannot be loaded");
|
||||
*invokespecial_error = true;
|
||||
}
|
||||
Bytes::put_native_u2(p, cache_index);
|
||||
} else {
|
||||
int cache_index = Bytes::get_native_u2(p);
|
||||
int cp_index = cp_cache_entry_pool_index(cache_index);
|
||||
Bytes::put_Java_u2(p, cp_index);
|
||||
rewrite_member_reference(bcp, offset, reverse);
|
||||
}
|
||||
} else {
|
||||
rewrite_member_reference(bcp, offset, reverse);
|
||||
}
|
||||
}
|
||||
|
||||
@ -329,7 +330,7 @@ void Rewriter::maybe_rewrite_ldc(address bcp, int offset, bool is_wide,
|
||||
|
||||
|
||||
// Rewrites a method given the index_map information
|
||||
void Rewriter::scan_method(Method* method, bool reverse, TRAPS) {
|
||||
void Rewriter::scan_method(Method* method, bool reverse, bool* invokespecial_error) {
|
||||
|
||||
int nof_jsrs = 0;
|
||||
bool has_monitor_bytecodes = false;
|
||||
@ -391,15 +392,7 @@ void Rewriter::scan_method(Method* method, bool reverse, TRAPS) {
|
||||
}
|
||||
|
||||
case Bytecodes::_invokespecial : {
|
||||
int offset = prefix_length + 1;
|
||||
address p = bcp + offset;
|
||||
int cp_index = Bytes::get_Java_u2(p);
|
||||
// InterfaceMethodref
|
||||
if (_pool->tag_at(cp_index).is_interface_method()) {
|
||||
rewrite_invokespecial(bcp, offset, reverse, CHECK);
|
||||
} else {
|
||||
rewrite_member_reference(bcp, offset, reverse);
|
||||
}
|
||||
rewrite_invokespecial(bcp, prefix_length+1, reverse, invokespecial_error);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -496,11 +489,20 @@ Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Me
|
||||
|
||||
// rewrite methods, in two passes
|
||||
int len = _methods->length();
|
||||
bool invokespecial_error = false;
|
||||
|
||||
for (int i = len-1; i >= 0; i--) {
|
||||
Method* method = _methods->at(i);
|
||||
scan_method(method, false, CHECK); // If you get an error here,
|
||||
// there is no reversing bytecodes
|
||||
scan_method(method, false, &invokespecial_error);
|
||||
if (invokespecial_error) {
|
||||
// If you get an error here, there is no reversing bytecodes
|
||||
// This exception is stored for this class and no further attempt is
|
||||
// made at verifying or rewriting.
|
||||
THROW_MSG(vmSymbols::java_lang_InternalError(),
|
||||
"This classfile overflows invokespecial for interfaces "
|
||||
"and cannot be loaded");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// May have to fix invokedynamic bytecodes if invokestatic/InterfaceMethodref
|
||||
@ -513,7 +515,7 @@ Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Me
|
||||
// Restore bytecodes to their unrewritten state if there are exceptions
|
||||
// rewriting bytecodes or allocating the cpCache
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
restore_bytecodes(CATCH);
|
||||
restore_bytecodes();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -530,7 +532,7 @@ Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array<Me
|
||||
// relocating bytecodes. If some are relocated, that is ok because that
|
||||
// doesn't affect constant pool to cpCache rewriting.
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
restore_bytecodes(CATCH);
|
||||
restore_bytecodes();
|
||||
return;
|
||||
}
|
||||
// Method might have gotten rewritten.
|
||||
|
||||
@ -189,18 +189,18 @@ class Rewriter: public StackObj {
|
||||
|
||||
void compute_index_maps();
|
||||
void make_constant_pool_cache(TRAPS);
|
||||
void scan_method(Method* m, bool reverse, TRAPS);
|
||||
void scan_method(Method* m, bool reverse, bool* invokespecial_error);
|
||||
void rewrite_Object_init(methodHandle m, TRAPS);
|
||||
void rewrite_member_reference(address bcp, int offset, bool reverse);
|
||||
void maybe_rewrite_invokehandle(address opc, int cp_index, int cache_index, bool reverse);
|
||||
void rewrite_invokedynamic(address bcp, int offset, bool reverse);
|
||||
void maybe_rewrite_ldc(address bcp, int offset, bool is_wide, bool reverse);
|
||||
void rewrite_invokespecial(address bcp, int offset, bool reverse, TRAPS);
|
||||
void rewrite_invokespecial(address bcp, int offset, bool reverse, bool* invokespecial_error);
|
||||
|
||||
void patch_invokedynamic_bytecodes();
|
||||
|
||||
// Revert bytecodes in case of an exception.
|
||||
void restore_bytecodes(TRAPS);
|
||||
void restore_bytecodes();
|
||||
|
||||
static methodHandle rewrite_jsrs(methodHandle m, TRAPS);
|
||||
public:
|
||||
|
||||
@ -321,6 +321,8 @@ void Flag::print_kind(outputStream* st) {
|
||||
{ KIND_PRODUCT, "product" },
|
||||
{ KIND_MANAGEABLE, "manageable" },
|
||||
{ KIND_DIAGNOSTIC, "diagnostic" },
|
||||
{ KIND_EXPERIMENTAL, "experimental" },
|
||||
{ KIND_COMMERCIAL, "commercial" },
|
||||
{ KIND_NOT_PRODUCT, "notproduct" },
|
||||
{ KIND_DEVELOP, "develop" },
|
||||
{ KIND_LP64_PRODUCT, "lp64_product" },
|
||||
|
||||
@ -3622,9 +3622,6 @@ class CommandLineFlags {
|
||||
"Temporary flag for transition to AbstractMethodError wrapped " \
|
||||
"in InvocationTargetException. See 6531596") \
|
||||
\
|
||||
develop(bool, VerifyLambdaBytecodes, false, \
|
||||
"Force verification of jdk 8 lambda metafactory bytecodes") \
|
||||
\
|
||||
develop(intx, FastSuperclassLimit, 8, \
|
||||
"Depth of hardwired instanceof accelerator array") \
|
||||
\
|
||||
|
||||
@ -470,12 +470,6 @@ bool Reflection::verify_class_access(Klass* current_class, Klass* new_class, boo
|
||||
return true;
|
||||
}
|
||||
|
||||
// Also allow all accesses from
|
||||
// java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
|
||||
if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return can_relax_access_check_for(current_class, new_class, classloader_only);
|
||||
}
|
||||
|
||||
@ -570,12 +564,6 @@ bool Reflection::verify_field_access(Klass* current_class,
|
||||
return true;
|
||||
}
|
||||
|
||||
// Also allow all accesses from
|
||||
// java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
|
||||
if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return can_relax_access_check_for(
|
||||
current_class, field_class, classloader_only);
|
||||
}
|
||||
|
||||
@ -84,6 +84,7 @@
|
||||
|
||||
// Shared stub locations
|
||||
RuntimeStub* SharedRuntime::_wrong_method_blob;
|
||||
RuntimeStub* SharedRuntime::_wrong_method_abstract_blob;
|
||||
RuntimeStub* SharedRuntime::_ic_miss_blob;
|
||||
RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
|
||||
RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
|
||||
@ -101,11 +102,12 @@ UncommonTrapBlob* SharedRuntime::_uncommon_trap_blob;
|
||||
|
||||
//----------------------------generate_stubs-----------------------------------
|
||||
void SharedRuntime::generate_stubs() {
|
||||
_wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub");
|
||||
_ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_stub");
|
||||
_resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call");
|
||||
_resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call");
|
||||
_resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call");
|
||||
_wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub");
|
||||
_wrong_method_abstract_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_abstract), "wrong_method_abstract_stub");
|
||||
_ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_stub");
|
||||
_resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call");
|
||||
_resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call");
|
||||
_resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call");
|
||||
|
||||
#ifdef COMPILER2
|
||||
// Vectors are generated only by C2.
|
||||
@ -1345,6 +1347,11 @@ JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method(JavaThread* thread))
|
||||
return callee_method->verified_code_entry();
|
||||
JRT_END
|
||||
|
||||
// Handle abstract method call
|
||||
JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method_abstract(JavaThread* thread))
|
||||
return StubRoutines::throw_AbstractMethodError_entry();
|
||||
JRT_END
|
||||
|
||||
|
||||
// resolve a static call and patch code
|
||||
JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_static_call_C(JavaThread *thread ))
|
||||
@ -2341,12 +2348,13 @@ void AdapterHandlerLibrary::initialize() {
|
||||
|
||||
// Create a special handler for abstract methods. Abstract methods
|
||||
// are never compiled so an i2c entry is somewhat meaningless, but
|
||||
// fill it in with something appropriate just in case. Pass handle
|
||||
// wrong method for the c2i transitions.
|
||||
address wrong_method = SharedRuntime::get_handle_wrong_method_stub();
|
||||
// throw AbstractMethodError just in case.
|
||||
// Pass wrong_method_abstract for the c2i transitions to return
|
||||
// AbstractMethodError for invalid invocations.
|
||||
address wrong_method_abstract = SharedRuntime::get_handle_wrong_method_abstract_stub();
|
||||
_abstract_method_handler = AdapterHandlerLibrary::new_entry(new AdapterFingerPrint(0, NULL),
|
||||
StubRoutines::throw_AbstractMethodError_entry(),
|
||||
wrong_method, wrong_method);
|
||||
wrong_method_abstract, wrong_method_abstract);
|
||||
}
|
||||
|
||||
AdapterHandlerEntry* AdapterHandlerLibrary::new_entry(AdapterFingerPrint* fingerprint,
|
||||
|
||||
@ -56,6 +56,7 @@ class SharedRuntime: AllStatic {
|
||||
// Shared stub locations
|
||||
|
||||
static RuntimeStub* _wrong_method_blob;
|
||||
static RuntimeStub* _wrong_method_abstract_blob;
|
||||
static RuntimeStub* _ic_miss_blob;
|
||||
static RuntimeStub* _resolve_opt_virtual_call_blob;
|
||||
static RuntimeStub* _resolve_virtual_call_blob;
|
||||
@ -206,6 +207,11 @@ class SharedRuntime: AllStatic {
|
||||
return _wrong_method_blob->entry_point();
|
||||
}
|
||||
|
||||
static address get_handle_wrong_method_abstract_stub() {
|
||||
assert(_wrong_method_abstract_blob!= NULL, "oops");
|
||||
return _wrong_method_abstract_blob->entry_point();
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
static void generate_uncommon_trap_blob(void);
|
||||
static UncommonTrapBlob* uncommon_trap_blob() { return _uncommon_trap_blob; }
|
||||
@ -481,6 +487,7 @@ class SharedRuntime: AllStatic {
|
||||
// handle ic miss with caller being compiled code
|
||||
// wrong method handling (inline cache misses, zombie methods)
|
||||
static address handle_wrong_method(JavaThread* thread);
|
||||
static address handle_wrong_method_abstract(JavaThread* thread);
|
||||
static address handle_wrong_method_ic_miss(JavaThread* thread);
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
@ -231,7 +231,8 @@ void NMethodSweeper::mark_active_nmethods() {
|
||||
*/
|
||||
void NMethodSweeper::possibly_sweep() {
|
||||
assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
|
||||
if (!MethodFlushing || !sweep_in_progress()) {
|
||||
// Only compiler threads are allowed to sweep
|
||||
if (!MethodFlushing || !sweep_in_progress() || !Thread::current()->is_Compiler_thread()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -200,6 +200,12 @@ void ThreadService::oops_do(OopClosure* f) {
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadService::metadata_do(void f(Metadata*)) {
|
||||
for (ThreadDumpResult* dump = _threaddump_list; dump != NULL; dump = dump->next()) {
|
||||
dump->metadata_do(f);
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadService::add_thread_dump(ThreadDumpResult* dump) {
|
||||
MutexLocker ml(Management_lock);
|
||||
if (_threaddump_list == NULL) {
|
||||
@ -451,9 +457,16 @@ void ThreadDumpResult::oops_do(OopClosure* f) {
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadDumpResult::metadata_do(void f(Metadata*)) {
|
||||
for (ThreadSnapshot* ts = _snapshots; ts != NULL; ts = ts->next()) {
|
||||
ts->metadata_do(f);
|
||||
}
|
||||
}
|
||||
|
||||
StackFrameInfo::StackFrameInfo(javaVFrame* jvf, bool with_lock_info) {
|
||||
_method = jvf->method();
|
||||
_bci = jvf->bci();
|
||||
_class_holder = _method->method_holder()->klass_holder();
|
||||
_locked_monitors = NULL;
|
||||
if (with_lock_info) {
|
||||
ResourceMark rm;
|
||||
@ -477,6 +490,11 @@ void StackFrameInfo::oops_do(OopClosure* f) {
|
||||
f->do_oop((oop*) _locked_monitors->adr_at(i));
|
||||
}
|
||||
}
|
||||
f->do_oop(&_class_holder);
|
||||
}
|
||||
|
||||
void StackFrameInfo::metadata_do(void f(Metadata*)) {
|
||||
f(_method);
|
||||
}
|
||||
|
||||
void StackFrameInfo::print_on(outputStream* st) const {
|
||||
@ -620,6 +638,14 @@ void ThreadStackTrace::oops_do(OopClosure* f) {
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadStackTrace::metadata_do(void f(Metadata*)) {
|
||||
int length = _frames->length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
_frames->at(i)->metadata_do(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ConcurrentLocksDump::~ConcurrentLocksDump() {
|
||||
if (_retain_map_on_free) {
|
||||
return;
|
||||
@ -823,6 +849,13 @@ void ThreadSnapshot::oops_do(OopClosure* f) {
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadSnapshot::metadata_do(void f(Metadata*)) {
|
||||
if (_stack_trace != NULL) {
|
||||
_stack_trace->metadata_do(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DeadlockCycle::DeadlockCycle() {
|
||||
_is_deadlock = false;
|
||||
_threads = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<JavaThread*>(INITIAL_ARRAY_SIZE, true);
|
||||
|
||||
@ -113,6 +113,7 @@ public:
|
||||
|
||||
// GC support
|
||||
static void oops_do(OopClosure* f);
|
||||
static void metadata_do(void f(Metadata*));
|
||||
};
|
||||
|
||||
// Per-thread Statistics for synchronization
|
||||
@ -242,6 +243,7 @@ public:
|
||||
void dump_stack_at_safepoint(int max_depth, bool with_locked_monitors);
|
||||
void set_concurrent_locks(ThreadConcurrentLocks* l) { _concurrent_locks = l; }
|
||||
void oops_do(OopClosure* f);
|
||||
void metadata_do(void f(Metadata*));
|
||||
};
|
||||
|
||||
class ThreadStackTrace : public CHeapObj<mtInternal> {
|
||||
@ -265,6 +267,7 @@ class ThreadStackTrace : public CHeapObj<mtInternal> {
|
||||
void dump_stack_at_safepoint(int max_depth);
|
||||
Handle allocate_fill_stack_trace_element_array(TRAPS);
|
||||
void oops_do(OopClosure* f);
|
||||
void metadata_do(void f(Metadata*));
|
||||
GrowableArray<oop>* jni_locked_monitors() { return _jni_locked_monitors; }
|
||||
int num_jni_locked_monitors() { return (_jni_locked_monitors != NULL ? _jni_locked_monitors->length() : 0); }
|
||||
|
||||
@ -280,6 +283,9 @@ class StackFrameInfo : public CHeapObj<mtInternal> {
|
||||
Method* _method;
|
||||
int _bci;
|
||||
GrowableArray<oop>* _locked_monitors; // list of object monitors locked by this frame
|
||||
// We need to save the mirrors in the backtrace to keep the class
|
||||
// from being unloaded while we still have this stack trace.
|
||||
oop _class_holder;
|
||||
|
||||
public:
|
||||
|
||||
@ -289,9 +295,10 @@ class StackFrameInfo : public CHeapObj<mtInternal> {
|
||||
delete _locked_monitors;
|
||||
}
|
||||
};
|
||||
Method* method() const { return _method; }
|
||||
Method* method() const { return _method; }
|
||||
int bci() const { return _bci; }
|
||||
void oops_do(OopClosure* f);
|
||||
void metadata_do(void f(Metadata*));
|
||||
|
||||
int num_locked_monitors() { return (_locked_monitors != NULL ? _locked_monitors->length() : 0); }
|
||||
GrowableArray<oop>* locked_monitors() { return _locked_monitors; }
|
||||
@ -354,6 +361,7 @@ class ThreadDumpResult : public StackObj {
|
||||
int num_snapshots() { return _num_snapshots; }
|
||||
ThreadSnapshot* snapshots() { return _snapshots; }
|
||||
void oops_do(OopClosure* f);
|
||||
void metadata_do(void f(Metadata*));
|
||||
};
|
||||
|
||||
class DeadlockCycle : public CHeapObj<mtInternal> {
|
||||
|
||||
@ -172,7 +172,6 @@ public class ConcurrentClassLoadingTest {
|
||||
"java.lang.invoke.LambdaConversionException",
|
||||
"java.lang.invoke.LambdaForm",
|
||||
"java.lang.invoke.LambdaMetafactory",
|
||||
"java.lang.invoke.MagicLambdaImpl",
|
||||
"java.lang.invoke.MemberName",
|
||||
"java.lang.invoke.MethodHandle",
|
||||
"java.lang.invoke.MethodHandleImpl",
|
||||
|
||||
294
hotspot/test/compiler/uncommontrap/TestStackBangRbp.java
Normal file
294
hotspot/test/compiler/uncommontrap/TestStackBangRbp.java
Normal file
@ -0,0 +1,294 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8028308
|
||||
* @summary rbp not restored when stack overflow is thrown from deopt/uncommon trap blobs
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestStackBangRbp::m1 -XX:CompileCommand=exclude,TestStackBangRbp::m2 -Xss256K -XX:-UseOnStackReplacement TestStackBangRbp
|
||||
*
|
||||
*/
|
||||
public class TestStackBangRbp {
|
||||
|
||||
static class UnloadedClass1 {
|
||||
}
|
||||
|
||||
static class UnloadedClass2 {
|
||||
}
|
||||
|
||||
static Object m1(boolean deopt) {
|
||||
long l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12,
|
||||
l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24,
|
||||
l25, l26, l27, l28, l29, l30, l31, l32, l33, l34, l35, l36,
|
||||
l37, l38, l39, l40, l41, l42, l43, l44, l45, l46, l47, l48,
|
||||
l49, l50, l51, l52, l53, l54, l55, l56, l57, l58, l59, l60,
|
||||
l61, l62, l63, l64, l65, l66, l67, l68, l69, l70, l71, l72,
|
||||
l73, l74, l75, l76, l77, l78, l79, l80, l81, l82, l83, l84,
|
||||
l85, l86, l87, l88, l89, l90, l91, l92, l93, l94, l95, l96,
|
||||
l97, l98, l99, l100, l101, l102, l103, l104, l105, l106, l107,
|
||||
l108, l109, l110, l111, l112, l113, l114, l115, l116, l117,
|
||||
l118, l119, l120, l121, l122, l123, l124, l125, l126, l127,
|
||||
l128, l129, l130, l131, l132, l133, l134, l135, l136, l137,
|
||||
l138, l139, l140, l141, l142, l143, l144, l145, l146, l147,
|
||||
l148, l149, l150, l151, l152, l153, l154, l155, l156, l157,
|
||||
l158, l159, l160, l161, l162, l163, l164, l165, l166, l167,
|
||||
l168, l169, l170, l171, l172, l173, l174, l175, l176, l177,
|
||||
l178, l179, l180, l181, l182, l183, l184, l185, l186, l187,
|
||||
l188, l189, l190, l191, l192, l193, l194, l195, l196, l197,
|
||||
l198, l199, l200, l201, l202, l203, l204, l205, l206, l207,
|
||||
l208, l209, l210, l211, l212, l213, l214, l215, l216, l217,
|
||||
l218, l219, l220, l221, l222, l223, l224, l225, l226, l227,
|
||||
l228, l229, l230, l231, l232, l233, l234, l235, l236, l237,
|
||||
l238, l239, l240, l241, l242, l243, l244, l245, l246, l247,
|
||||
l248, l249, l250, l251, l252, l253, l254, l255, l256, l257,
|
||||
l258, l259, l260, l261, l262, l263, l264, l265, l266, l267,
|
||||
l268, l269, l270, l271, l272, l273, l274, l275, l276, l277,
|
||||
l278, l279, l280, l281, l282, l283, l284, l285, l286, l287,
|
||||
l288, l289, l290, l291, l292, l293, l294, l295, l296, l297,
|
||||
l298, l299, l300, l301, l302, l303, l304, l305, l306, l307,
|
||||
l308, l309, l310, l311, l312, l313, l314, l315, l316, l317,
|
||||
l318, l319, l320, l321, l322, l323, l324, l325, l326, l327,
|
||||
l328, l329, l330, l331, l332, l333, l334, l335, l336, l337,
|
||||
l338, l339, l340, l341, l342, l343, l344, l345, l346, l347,
|
||||
l348, l349, l350, l351, l352, l353, l354, l355, l356, l357,
|
||||
l358, l359, l360, l361, l362, l363, l364, l365, l366, l367,
|
||||
l368, l369, l370, l371, l372, l373, l374, l375, l376, l377,
|
||||
l378, l379, l380, l381, l382, l383, l384, l385, l386, l387,
|
||||
l388, l389, l390, l391, l392, l393, l394, l395, l396, l397,
|
||||
l398, l399, l400, l401, l402, l403, l404, l405, l406, l407,
|
||||
l408, l409, l410, l411, l412, l413, l414, l415, l416, l417,
|
||||
l418, l419, l420, l421, l422, l423, l424, l425, l426, l427,
|
||||
l428, l429, l430, l431, l432, l433, l434, l435, l436, l437,
|
||||
l438, l439, l440, l441, l442, l443, l444, l445, l446, l447,
|
||||
l448, l449, l450, l451, l452, l453, l454, l455, l456, l457,
|
||||
l458, l459, l460, l461, l462, l463, l464, l465, l466, l467,
|
||||
l468, l469, l470, l471, l472, l473, l474, l475, l476, l477,
|
||||
l478, l479, l480, l481, l482, l483, l484, l485, l486, l487,
|
||||
l488, l489, l490, l491, l492, l493, l494, l495, l496, l497,
|
||||
l498, l499, l500, l501, l502, l503, l504, l505, l506, l507,
|
||||
l508, l509, l510, l511;
|
||||
|
||||
long ll0, ll1, ll2, ll3, ll4, ll5, ll6, ll7, ll8, ll9, ll10, ll11, ll12,
|
||||
ll13, ll14, ll15, ll16, ll17, ll18, ll19, ll20, ll21, ll22, ll23, ll24,
|
||||
ll25, ll26, ll27, ll28, ll29, ll30, ll31, ll32, ll33, ll34, ll35, ll36,
|
||||
ll37, ll38, ll39, ll40, ll41, ll42, ll43, ll44, ll45, ll46, ll47, ll48,
|
||||
ll49, ll50, ll51, ll52, ll53, ll54, ll55, ll56, ll57, ll58, ll59, ll60,
|
||||
ll61, ll62, ll63, ll64, ll65, ll66, ll67, ll68, ll69, ll70, ll71, ll72,
|
||||
ll73, ll74, ll75, ll76, ll77, ll78, ll79, ll80, ll81, ll82, ll83, ll84,
|
||||
ll85, ll86, ll87, ll88, ll89, ll90, ll91, ll92, ll93, ll94, ll95, ll96,
|
||||
ll97, ll98, ll99, ll100, ll101, ll102, ll103, ll104, ll105, ll106, ll107,
|
||||
ll108, ll109, ll110, ll111, ll112, ll113, ll114, ll115, ll116, ll117,
|
||||
ll118, ll119, ll120, ll121, ll122, ll123, ll124, ll125, ll126, ll127,
|
||||
ll128, ll129, ll130, ll131, ll132, ll133, ll134, ll135, ll136, ll137,
|
||||
ll138, ll139, ll140, ll141, ll142, ll143, ll144, ll145, ll146, ll147,
|
||||
ll148, ll149, ll150, ll151, ll152, ll153, ll154, ll155, ll156, ll157,
|
||||
ll158, ll159, ll160, ll161, ll162, ll163, ll164, ll165, ll166, ll167,
|
||||
ll168, ll169, ll170, ll171, ll172, ll173, ll174, ll175, ll176, ll177,
|
||||
ll178, ll179, ll180, ll181, ll182, ll183, ll184, ll185, ll186, ll187,
|
||||
ll188, ll189, ll190, ll191, ll192, ll193, ll194, ll195, ll196, ll197,
|
||||
ll198, ll199, ll200, ll201, ll202, ll203, ll204, ll205, ll206, ll207,
|
||||
ll208, ll209, ll210, ll211, ll212, ll213, ll214, ll215, ll216, ll217,
|
||||
ll218, ll219, ll220, ll221, ll222, ll223, ll224, ll225, ll226, ll227,
|
||||
ll228, ll229, ll230, ll231, ll232, ll233, ll234, ll235, ll236, ll237,
|
||||
ll238, ll239, ll240, ll241, ll242, ll243, ll244, ll245, ll246, ll247,
|
||||
ll248, ll249, ll250, ll251, ll252, ll253, ll254, ll255, ll256, ll257,
|
||||
ll258, ll259, ll260, ll261, ll262, ll263, ll264, ll265, ll266, ll267,
|
||||
ll268, ll269, ll270, ll271, ll272, ll273, ll274, ll275, ll276, ll277,
|
||||
ll278, ll279, ll280, ll281, ll282, ll283, ll284, ll285, ll286, ll287,
|
||||
ll288, ll289, ll290, ll291, ll292, ll293, ll294, ll295, ll296, ll297,
|
||||
ll298, ll299, ll300, ll301, ll302, ll303, ll304, ll305, ll306, ll307,
|
||||
ll308, ll309, ll310, ll311, ll312, ll313, ll314, ll315, ll316, ll317,
|
||||
ll318, ll319, ll320, ll321, ll322, ll323, ll324, ll325, ll326, ll327,
|
||||
ll328, ll329, ll330, ll331, ll332, ll333, ll334, ll335, ll336, ll337,
|
||||
ll338, ll339, ll340, ll341, ll342, ll343, ll344, ll345, ll346, ll347,
|
||||
ll348, ll349, ll350, ll351, ll352, ll353, ll354, ll355, ll356, ll357,
|
||||
ll358, ll359, ll360, ll361, ll362, ll363, ll364, ll365, ll366, ll367,
|
||||
ll368, ll369, ll370, ll371, ll372, ll373, ll374, ll375, ll376, ll377,
|
||||
ll378, ll379, ll380, ll381, ll382, ll383, ll384, ll385, ll386, ll387,
|
||||
ll388, ll389, ll390, ll391, ll392, ll393, ll394, ll395, ll396, ll397,
|
||||
ll398, ll399, ll400, ll401, ll402, ll403, ll404, ll405, ll406, ll407,
|
||||
ll408, ll409, ll410, ll411, ll412, ll413, ll414, ll415, ll416, ll417,
|
||||
ll418, ll419, ll420, ll421, ll422, ll423, ll424, ll425, ll426, ll427,
|
||||
ll428, ll429, ll430, ll431, ll432, ll433, ll434, ll435, ll436, ll437,
|
||||
ll438, ll439, ll440, ll441, ll442, ll443, ll444, ll445, ll446, ll447,
|
||||
ll448, ll449, ll450, ll451, ll452, ll453, ll454, ll455, ll456, ll457,
|
||||
ll458, ll459, ll460, ll461, ll462, ll463, ll464, ll465, ll466, ll467,
|
||||
ll468, ll469, ll470, ll471, ll472, ll473, ll474, ll475, ll476, ll477,
|
||||
ll478, ll479, ll480, ll481, ll482, ll483, ll484, ll485, ll486, ll487,
|
||||
ll488, ll489, ll490, ll491, ll492, ll493, ll494, ll495, ll496, ll497,
|
||||
ll498, ll499, ll500, ll501, ll502, ll503, ll504, ll505, ll506, ll507,
|
||||
ll508, ll509, ll510, ll511;
|
||||
|
||||
int i1 = TestStackBangRbp.i1;
|
||||
int i2 = TestStackBangRbp.i2;
|
||||
int i3 = TestStackBangRbp.i3;
|
||||
int i4 = TestStackBangRbp.i4;
|
||||
int i5 = TestStackBangRbp.i5;
|
||||
int i6 = TestStackBangRbp.i6;
|
||||
int i7 = TestStackBangRbp.i7;
|
||||
int i8 = TestStackBangRbp.i8;
|
||||
int i9 = TestStackBangRbp.i9;
|
||||
int i10 = TestStackBangRbp.i10;
|
||||
int i11 = TestStackBangRbp.i11;
|
||||
int i12 = TestStackBangRbp.i12;
|
||||
int i13 = TestStackBangRbp.i13;
|
||||
int i14 = TestStackBangRbp.i14;
|
||||
int i15 = TestStackBangRbp.i15;
|
||||
int i16 = TestStackBangRbp.i16;
|
||||
|
||||
TestStackBangRbp.i1 = i1;
|
||||
TestStackBangRbp.i2 = i2;
|
||||
TestStackBangRbp.i3 = i3;
|
||||
TestStackBangRbp.i4 = i4;
|
||||
TestStackBangRbp.i5 = i5;
|
||||
TestStackBangRbp.i6 = i6;
|
||||
TestStackBangRbp.i7 = i7;
|
||||
TestStackBangRbp.i8 = i8;
|
||||
TestStackBangRbp.i9 = i9;
|
||||
TestStackBangRbp.i10 = i10;
|
||||
TestStackBangRbp.i11 = i11;
|
||||
TestStackBangRbp.i12 = i12;
|
||||
TestStackBangRbp.i13 = i13;
|
||||
TestStackBangRbp.i14 = i14;
|
||||
TestStackBangRbp.i15 = i15;
|
||||
TestStackBangRbp.i16 = i16;
|
||||
|
||||
if (deopt) {
|
||||
// deoptimize with integer in rbp
|
||||
UnloadedClass1 res = new UnloadedClass1(); // forces deopt with c2
|
||||
return res;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static boolean m2(boolean deopt) {
|
||||
// call m2 recursively until stack overflow. Then call m3 that
|
||||
// will call m1 and trigger and deopt in m1 while keeping a
|
||||
// lot of objects live in registers at the call to m1
|
||||
|
||||
long l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12,
|
||||
l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24,
|
||||
l25, l26, l27, l28, l29, l30, l31, l32, l33, l34, l35, l36,
|
||||
l37, l38, l39, l40, l41, l42, l43, l44, l45, l46, l47, l48,
|
||||
l49, l50, l51, l52, l53, l54, l55, l56, l57, l58, l59, l60,
|
||||
l61, l62, l63, l64, l65, l66, l67, l68, l69, l70, l71, l72,
|
||||
l73, l74, l75, l76, l77, l78, l79, l80, l81, l82, l83, l84,
|
||||
l85, l86, l87, l88, l89, l90, l91, l92, l93, l94, l95, l96,
|
||||
l97, l98, l99, l100, l101, l102, l103, l104, l105, l106, l107,
|
||||
l108, l109, l110, l111, l112, l113, l114, l115, l116, l117,
|
||||
l118, l119, l120, l121, l122, l123, l124, l125, l126, l127,
|
||||
l128, l129, l130, l131, l132, l133, l134, l135, l136, l137,
|
||||
l138, l139, l140, l141, l142, l143, l144, l145, l146, l147,
|
||||
l148, l149, l150, l151, l152, l153, l154, l155, l156, l157,
|
||||
l158, l159, l160, l161, l162, l163, l164, l165, l166, l167,
|
||||
l168, l169, l170, l171, l172, l173, l174, l175, l176, l177,
|
||||
l178, l179, l180, l181, l182, l183, l184, l185, l186, l187,
|
||||
l188, l189, l190, l191, l192, l193, l194, l195, l196, l197,
|
||||
l198, l199, l200, l201, l202, l203, l204, l205, l206, l207,
|
||||
l208, l209, l210, l211, l212, l213, l214, l215, l216, l217,
|
||||
l218, l219, l220, l221, l222, l223, l224, l225, l226, l227,
|
||||
l228, l229, l230, l231, l232, l233, l234, l235, l236, l237,
|
||||
l238, l239, l240, l241, l242, l243, l244, l245, l246, l247,
|
||||
l248, l249, l250, l251, l252, l253, l254, l255, l256, l257,
|
||||
l258, l259, l260, l261, l262, l263, l264, l265, l266, l267,
|
||||
l268, l269, l270, l271, l272, l273, l274, l275, l276, l277,
|
||||
l278, l279, l280, l281, l282, l283, l284, l285, l286, l287,
|
||||
l288, l289, l290, l291, l292, l293, l294, l295, l296, l297,
|
||||
l298, l299, l300, l301, l302, l303, l304, l305, l306, l307,
|
||||
l308, l309, l310, l311, l312, l313, l314, l315, l316, l317,
|
||||
l318, l319, l320, l321, l322, l323, l324, l325, l326, l327,
|
||||
l328, l329, l330, l331, l332, l333, l334, l335, l336, l337,
|
||||
l338, l339, l340, l341, l342, l343, l344, l345, l346, l347,
|
||||
l348, l349, l350, l351, l352, l353, l354, l355, l356, l357,
|
||||
l358, l359, l360, l361, l362, l363, l364, l365, l366, l367,
|
||||
l368, l369, l370, l371, l372, l373, l374, l375, l376, l377,
|
||||
l378, l379, l380, l381, l382, l383, l384, l385, l386, l387,
|
||||
l388, l389, l390, l391, l392, l393, l394, l395, l396, l397,
|
||||
l398, l399, l400, l401, l402, l403, l404, l405, l406, l407,
|
||||
l408, l409, l410, l411, l412, l413, l414, l415, l416, l417,
|
||||
l418, l419, l420, l421, l422, l423, l424, l425, l426, l427,
|
||||
l428, l429, l430, l431, l432, l433, l434, l435, l436, l437,
|
||||
l438, l439, l440, l441, l442, l443, l444, l445, l446, l447,
|
||||
l448, l449, l450, l451, l452, l453, l454, l455, l456, l457,
|
||||
l458, l459, l460, l461, l462, l463, l464, l465, l466, l467,
|
||||
l468, l469, l470, l471, l472, l473, l474, l475, l476, l477,
|
||||
l478, l479, l480, l481, l482, l483, l484, l485, l486, l487,
|
||||
l488, l489, l490, l491, l492, l493, l494, l495, l496, l497,
|
||||
l498, l499, l500, l501, l502, l503, l504, l505, l506, l507,
|
||||
l508, l509, l510, l511;
|
||||
|
||||
boolean do_m3 = false;
|
||||
try {
|
||||
do_m3 = m2(deopt);
|
||||
} catch (StackOverflowError e) {
|
||||
return true;
|
||||
}
|
||||
if (do_m3) {
|
||||
m3(deopt);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static volatile Object o1 = new Object();
|
||||
|
||||
static volatile int i1 = 1;
|
||||
static volatile int i2 = 2;
|
||||
static volatile int i3 = 3;
|
||||
static volatile int i4 = 4;
|
||||
static volatile int i5 = 5;
|
||||
static volatile int i6 = 6;
|
||||
static volatile int i7 = 7;
|
||||
static volatile int i8 = 8;
|
||||
static volatile int i9 = 9;
|
||||
static volatile int i10 = 10;
|
||||
static volatile int i11 = 11;
|
||||
static volatile int i12 = 12;
|
||||
static volatile int i13 = 13;
|
||||
static volatile int i14 = 14;
|
||||
static volatile int i15 = 15;
|
||||
static volatile int i16 = 16;
|
||||
|
||||
static void m3(boolean deopt) {
|
||||
Object o1 = TestStackBangRbp.o1;
|
||||
TestStackBangRbp.o1 = o1;
|
||||
|
||||
try {
|
||||
m1(deopt);
|
||||
} catch (StackOverflowError e) {
|
||||
// deoptimize again. rbp holds an integer. It should have an object.
|
||||
UnloadedClass2 res = new UnloadedClass2(); // forces deopt with c2
|
||||
}
|
||||
TestStackBangRbp.o1 = o1;
|
||||
}
|
||||
|
||||
static public void main(String[] args) {
|
||||
// get m1 & m3 compiled
|
||||
for (int i = 0; i < 20000; i++) {
|
||||
m1(false);
|
||||
m3(false);
|
||||
}
|
||||
m2(true);
|
||||
|
||||
System.out.println("TEST PASSED");
|
||||
}
|
||||
}
|
||||
@ -238,3 +238,4 @@ c1f9158fbb9c2da50f6946fffd974e8236e08447 jdk8-b112
|
||||
1b1e12117fe2840e5d21ae9a4b309e4f981f3ea8 jdk8-b114
|
||||
f610fd46463e6b0533dd92bce11a1e7d84984e64 jdk8-b115
|
||||
e757eb9aee3d6bec7da074c47e07616104a8df33 jdk8-b116
|
||||
c1d234d4f16472a5163464420fa00b25ffa5298a jdk8-b117
|
||||
|
||||
@ -238,3 +238,4 @@ dbdd5c76250928582cb5342bcf7b299a6007d538 jdk8-b112
|
||||
9ad289610fc6effe9076280b7920d0f16470709f jdk8-b114
|
||||
e126d8eca69b83a1cc159c2375b7c33140346d2b jdk8-b115
|
||||
587560c222a2476066852224ed02d39b5090a299 jdk8-b116
|
||||
fe56ba456fd32758c72db629938d69067468d89c jdk8-b117
|
||||
|
||||
@ -238,3 +238,4 @@ f002f5f3a16cca62e139cb8eed05ffaeb373587d jdk8-b112
|
||||
f26a0c8071bde1e3b923713c75156e4a58955623 jdk8-b114
|
||||
f82b730c798b6bf38946baaba8a7d80fd5efaa70 jdk8-b115
|
||||
0dc0067f3b8efb299a4c23f76ee26ea64df9e1d7 jdk8-b116
|
||||
fc4ac66aa657e09de5f8257c3174f240ed0cbaf7 jdk8-b117
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,25 +56,27 @@ define SetupAppletDemo
|
||||
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
|
||||
endef
|
||||
|
||||
$(eval $(call SetupAppletDemo,ArcTest))
|
||||
$(eval $(call SetupAppletDemo,BarChart))
|
||||
$(eval $(call SetupAppletDemo,Blink))
|
||||
$(eval $(call SetupAppletDemo,CardTest))
|
||||
$(eval $(call SetupAppletDemo,Clock))
|
||||
$(eval $(call SetupAppletDemo,DitherTest))
|
||||
$(eval $(call SetupAppletDemo,DrawTest))
|
||||
$(eval $(call SetupAppletDemo,Fractal))
|
||||
$(eval $(call SetupAppletDemo,GraphicsTest))
|
||||
$(eval $(call SetupAppletDemo,NervousText))
|
||||
$(eval $(call SetupAppletDemo,SimpleGraph))
|
||||
$(eval $(call SetupAppletDemo,SortDemo))
|
||||
$(eval $(call SetupAppletDemo,SpreadSheet))
|
||||
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
$(eval $(call SetupAppletDemo,ArcTest))
|
||||
$(eval $(call SetupAppletDemo,BarChart))
|
||||
$(eval $(call SetupAppletDemo,Blink))
|
||||
$(eval $(call SetupAppletDemo,CardTest))
|
||||
$(eval $(call SetupAppletDemo,Clock))
|
||||
$(eval $(call SetupAppletDemo,DitherTest))
|
||||
$(eval $(call SetupAppletDemo,DrawTest))
|
||||
$(eval $(call SetupAppletDemo,Fractal))
|
||||
$(eval $(call SetupAppletDemo,GraphicsTest))
|
||||
$(eval $(call SetupAppletDemo,NervousText))
|
||||
$(eval $(call SetupAppletDemo,SimpleGraph))
|
||||
$(eval $(call SetupAppletDemo,SortDemo))
|
||||
$(eval $(call SetupAppletDemo,SpreadSheet))
|
||||
|
||||
ifndef OPENJDK
|
||||
$(eval $(call SetupAppletDemo,Animator,,closed/))
|
||||
$(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
|
||||
$(eval $(call SetupAppletDemo,JumpingBox,,closed/))
|
||||
$(eval $(call SetupAppletDemo,TicTacToe,,closed/))
|
||||
ifndef OPENJDK
|
||||
$(eval $(call SetupAppletDemo,Animator,,closed/))
|
||||
$(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
|
||||
$(eval $(call SetupAppletDemo,JumpingBox,,closed/))
|
||||
$(eval $(call SetupAppletDemo,TicTacToe,,closed/))
|
||||
endif
|
||||
endif
|
||||
|
||||
##################################################################################################
|
||||
@ -157,14 +159,16 @@ $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \
|
||||
|
||||
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
|
||||
|
||||
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
|
||||
$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java))
|
||||
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
|
||||
$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java))
|
||||
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
|
||||
endif
|
||||
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
|
||||
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
|
||||
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
|
||||
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*))
|
||||
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*))
|
||||
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
|
||||
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*))
|
||||
$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*))
|
||||
$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n))
|
||||
@ -180,7 +184,7 @@ ifndef OPENJDK
|
||||
|
||||
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
|
||||
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \
|
||||
$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
|
||||
$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
|
||||
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \
|
||||
SplashScreen-Image: resources/images/splash.png,true))
|
||||
|
||||
@ -191,6 +195,9 @@ ifndef OPENJDK
|
||||
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
|
||||
$(call install-file)
|
||||
$(CHMOD) -f ug+w $@
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
$(RM) -r $(JDK_OUTPUTDIR)/demo/nbproject/jfc/SwingApplet
|
||||
endif
|
||||
endif
|
||||
|
||||
##################################################################################################
|
||||
|
||||
@ -1,66 +1,90 @@
|
||||
." Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH appletviewer 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: appletviewer.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH appletviewer 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
appletviewer \- The Java Applet Viewer.
|
||||
.LP
|
||||
.LP
|
||||
The \f3appletviewer\fP command allows you to run applets outside of a web browser.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4appletviewer\fP \f2[\fP \f2options\fP \f2] \fP\f2urls\fP ...
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3appletviewer\fP command connects to the documents or resources designated by \f2urls\fP and displays each applet referenced by the documents in its own window. Note: if the documents referred to by \f2urls\fP do not reference any applets with the \f2OBJECT\fP, \f2EMBED\fP, or \f2APPLET\fP tag, then \f3appletviewer\fP does nothing. For details on the HTML tags that \f3appletviewer\fP supports, see
|
||||
.na
|
||||
\f2AppletViewer Tags\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/appletviewertags.html.
|
||||
.LP
|
||||
.LP
|
||||
\f3Note:\fP The \f3appletviewer\fP requires encoded URLs according to the escaping mechanism defined in RFC2396. Only encoded URLs are supported. However, file names must be unencoded, as specified in RFC2396.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-debug
|
||||
Starts the applet viewer in the Java debugger, jdb(1), thus allowing you to debug the applets in the document.
|
||||
.TP 3
|
||||
\-encoding \ \ encoding name
|
||||
Specify the input HTML file encoding name.
|
||||
.TP 3
|
||||
\-Jjavaoption
|
||||
Passes through the string \f2javaoption\fP as a single argument to the Java interpreter which runs the appletviewer. The argument should not contain spaces. Multiple argument words must all begin with the prefix \f3\-J\fP, which is stripped. This is useful for adjusting the compiler's execution environment or memory usage.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.SH NAME
|
||||
appletviewer \- Runs applets outside of a web browser\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBappletviewer\fR [\fIoptions\fR] \fIurl\fR\&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options separated by spaces\&. See Options\&.
|
||||
.TP
|
||||
\fIurl\fR
|
||||
The location of the documents or resources to be displayed\&. You can specify multiple URLs separated by spaces\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3appletviewer\fR command connects to the documents or resources designated by \fIurls\fR and displays each applet referenced by the documents in its own window\&. If the documents referred to by urls do not reference any applets with the \f3OBJECT\fR, \f3EMBED\fR, or \f3APPLET\fR tag, then the \f3appletviewer\fR command does nothing\&. For details about the HTML tags that the \f3appletviewer\fR command supports, see AppletViewer Tags at http://docs\&.oracle\&.com/javase/8/docs/technotes/tools/appletviewertags\&.html
|
||||
.PP
|
||||
The \f3appletviewer\fR command requires encoded URLs according to the escaping mechanism defined in RFC2396\&. Only encoded URLs are supported\&. However, file names must be unencoded, as specified in RFC2396\&.
|
||||
.PP
|
||||
\fINote:\fR The \f3appletviewer\fR command is intended for development purposes only\&. For more information, see About Sample/Test Applications and Code at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/aboutCodeSamples\&.html
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-debug
|
||||
.br
|
||||
Starts the Applet Viewer in the Java debugger with the \f3jdb\fR command to debug the applets in the document\&.
|
||||
.TP
|
||||
-encoding \fIencoding-name\fR
|
||||
.br
|
||||
Specifies the input HTML file encoding name\&.
|
||||
.TP
|
||||
-J\fIjavaoption\fR
|
||||
.br
|
||||
Passes the string \f3javaoption\fR as a single argument to the Java interpreter, which runs the Applet Viewer\&. The argument should not contain spaces\&. Multiple argument words must all begin with the prefix \f3-J\fR\&. This is useful for adjusting the compiler\&'s execution environment or memory usage\&.
|
||||
.PP
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,73 +1,91 @@
|
||||
." Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH extcheck 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: extcheck.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH extcheck 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
extcheck \- A utility to detect jar conflicts
|
||||
.LP
|
||||
.LP
|
||||
\f3extcheck\fP detects version conflicts between a target jar file and currently installed extension jar files.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
extcheck [ \-verbose ] targetfile.jar
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
extcheck \- Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3extcheck\fP utility checks a specified Jar file for title and version conflicts with any extensions installed in the Java(TM) SDK. Before installing an extension, you can use this utility to see if the same or a more recent version of the extension is already installed.
|
||||
.LP
|
||||
.LP
|
||||
The \f3extcheck\fP utility compares the \f2Specification\-title\fP and \f2Specification\-version\fP headers in the manifest of the \f2targetfile.jar\fP file against the corresponding headers in all Jar files currently installed in the extension directory. (The extension directory is \f2jre/lib/ext\fP by default.) The \f3extcheck\fP utility compares version numbers in the same way as the method \f2java.lang.Package.isCompatibleWith\fP.
|
||||
.LP
|
||||
.LP
|
||||
If no conflict is detected, the return code is \f20\fP.
|
||||
.LP
|
||||
.LP
|
||||
If the manifest of any jar file in the extensions directory has the same \f2Specification\-title\fP and the same or a newer \f2Specification\-version\fP number, a non\-zero error code is returned. A non\-zero error code is also returned if \f2targetfile.jar\fP does not have the \f2Specification\-title\fP or \f2Specification\-version\fP attributes in its manifest.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-verbose
|
||||
Lists Jar files in the extension directory as they are checked. Additionally, manifest attributes of the target jar file and any conflicting jar files are also reported.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
\fBextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fItargetfile\&.jar\fR
|
||||
The target JAR file against which the currently installed extension JAR files are compared to detect version conflicts\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3extcheck\fR command checks a specified JAR file for title and version conflicts with any extensions installed in the Java SE SDK\&. Before installing an extension, you can use this utility to see whether the same or a more recent version of the extension is already installed\&.
|
||||
.PP
|
||||
The \f3extcheck\fR command compares the Specification-title and Specification-version headers in the manifest of the \f3targetfile\&.jar\fR file against the corresponding headers in all JAR files currently installed in the extension directory\&. By default, the extension directory is \f3jre/lib/ext\fR on Oracle Solaris and \f3\ejre\elib\eext\fR on Windows\&. The \f3extcheck\fR command compares version numbers in the same way as the \f3java\&.lang\&.Package\&.isCompatibleWith\fR method\&.
|
||||
.PP
|
||||
If no conflict is detected, then the return code is 0\&.
|
||||
.PP
|
||||
If the manifest of any JAR file in the extensions directory has the same \f3Specification-title\fR and the same or a newer \f3Specification-version\fR number, then a non-zero error code is returned\&. A non-zero error code is also returned when \f3targetfile\&.jar\fR does not have the \f3Specification-title\fR or \f3Specification-version\fR attributes in its manifest file\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Lists JAR files in the extension directory as they are checked\&. Additionally, manifest attributes of the target JAR file and any conflicting JAR files are also reported\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \fIoption\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jar(1)
|
||||
.LP
|
||||
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,138 +1,159 @@
|
||||
." Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH javah 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: javah.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
javah \- C Header and Stub File Generator
|
||||
.LP
|
||||
.LP
|
||||
\f3javah\fP produces C header files and C source files from a Java class. These files provide the connective glue that allow your Java and C code to interact.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
javah [ \fP\f3options\fP\f3 ] fully\-qualified\-classname. . .
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
javah \- Generates C header and source files from a Java class\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3javah\fP generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition whose layout parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class.
|
||||
.LP
|
||||
.LP
|
||||
The name of the header file and the structure declared within it are derived from the name of the class. If the class passed to \f3javah\fP is inside a package, the package name is prepended to both the header file name and the structure name. Underscores (_) are used as name delimiters.
|
||||
.LP
|
||||
.LP
|
||||
By default \f3javah\fP creates a header file for each class listed on the command line and puts the files in the current directory. Use the \f2\-stubs\fP option to create source files. Use the \f2\-o\fP option to concatenate the results for all listed classes into a single file.
|
||||
.LP
|
||||
.LP
|
||||
The new native method interface, Java Native Interface (JNI), does not require header information or stub files. \f3javah\fP can still be used to generate native method function proptotypes needed for JNI\-style native methods. \f3javah\fP produces JNI\-style output by default, and places the result in the .h file.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-o outputfile
|
||||
Concatenates the resulting header or source files for all the classes listed on the command line into \f2outputfile\fP. Only one of \f3\-o\fP or \f3\-d\fP may be used.
|
||||
.TP 3
|
||||
\-d directory
|
||||
Sets the directory where \f3javah\fP saves the header files or the stub files. Only one of \f3\-d\fP or \f3\-o\fP may be used.
|
||||
.TP 3
|
||||
\-stubs
|
||||
Causes \f3javah\fP to generate C declarations from the Java object file.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Indicates verbose output and causes \f3javah\fP to print a message to stdout concerning the status of the generated files.
|
||||
.TP 3
|
||||
\-help
|
||||
Print help message for \f3javah\fP usage.
|
||||
.TP 3
|
||||
\-version
|
||||
Print out \f3javah\fP version information.
|
||||
.TP 3
|
||||
\-jni
|
||||
Causes \f3javah\fP to create an output file containing JNI\-style native method function prototypes. This is the default output, so use of \f3\-jni\fP is optional.
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specifies the path \f3javah\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:<your_path>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/home/avh/classes:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations).
|
||||
\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIfully-qualified-class-name\fR
|
||||
The fully qualified location of the classes to be converted to C header and source files\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3javah\fR command generates C header and source files that are needed to implement native methods\&. The generated header and source files are used by C programs to reference an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&.
|
||||
.PP
|
||||
The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&.
|
||||
.PP
|
||||
By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&.
|
||||
.PP
|
||||
The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-o \fIoutputfile\fR
|
||||
.br
|
||||
Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&.
|
||||
.TP
|
||||
-d \fIdirectory\fR
|
||||
.br
|
||||
For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP.
|
||||
.TP 3
|
||||
\-bootclasspath path
|
||||
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java 2 platform located in \f2jre/lib/rt.jar\fP and several other jar files.
|
||||
.TP 3
|
||||
\-old
|
||||
Specifies that old JDK1.0\-style header files should be generated.
|
||||
.TP 3
|
||||
\-force
|
||||
Specifies that output files should always be written.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&.
|
||||
.TP
|
||||
-stubs
|
||||
.br
|
||||
Causes the \f3javah\fR command to generate C declarations from the Java object file\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Prints a help message for \f3javah\fR usage\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints \f3javah\fR command release information\&.
|
||||
.TP
|
||||
-jni
|
||||
.br
|
||||
Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&.
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is:
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons, for example,
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/home/avh/classes:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
\fIOracle Solaris\fR:
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
javac(1), java(1), jdb(1), javap(1), javadoc(1)
|
||||
.LP
|
||||
\&.:\fIyour-path\fR
|
||||
|
||||
Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR
|
||||
|
||||
\fIWindows\fR:
|
||||
|
||||
\&.;\fIyour-path\fR
|
||||
|
||||
Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
|
||||
|
||||
As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&.
|
||||
|
||||
For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&.
|
||||
.TP
|
||||
-bootclasspath \fIpath\fR
|
||||
.br
|
||||
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&.
|
||||
.TP
|
||||
-old
|
||||
.br
|
||||
Specifies that old JDK 1\&.0-style header files should be generated\&.
|
||||
.TP
|
||||
-force
|
||||
.br
|
||||
Specifies that output files should always be written\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javah(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jdb(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javap(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javadoc(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,317 +1,443 @@
|
||||
." Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH javap 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: javap.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
javap \- The Java Class File Disassembler
|
||||
.LP
|
||||
.LP
|
||||
Disassembles class files.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
javap [ \fP\f3options\fP\f3 ] classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
javap \- Disassembles one or more class files\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3javap\fP command disassembles one or more class files. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
classes
|
||||
List of one or more classes (separated by spaces) to be processed for annotations (such as \f2DocFooter.class\fP). You may specify a class that can be found in the class path, by its file name (for example, \f2/home/user/myproject/src/DocFooter.class\fP), or with a URL (for example, \f2file:///home/user/myproject/src/DocFooter.class\fP).
|
||||
.RE
|
||||
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclassfile\fR
|
||||
One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-help, --help, -?
|
||||
.br
|
||||
Prints a help message for the \f3javap\fR command\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints release information\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
Prints line and local variable tables\&.
|
||||
.TP
|
||||
-public
|
||||
.br
|
||||
Shows only public classes and members\&.
|
||||
.TP
|
||||
-protected
|
||||
.br
|
||||
Shows only protected and public classes and members\&.
|
||||
.TP
|
||||
-private, -p
|
||||
.br
|
||||
Shows all classes and members\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes the specified option to the JVM\&. For example:
|
||||
.sp
|
||||
.nf
|
||||
\f3javap \-J\-version\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For example, compile the following class declaration:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.awt.*;
|
||||
.fl
|
||||
import java.applet.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class DocFooter extends Applet {
|
||||
.fl
|
||||
String date;
|
||||
.fl
|
||||
String email;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void init() {
|
||||
.fl
|
||||
resize(500,100);
|
||||
.fl
|
||||
date = getParameter("LAST_UPDATED");
|
||||
.fl
|
||||
email = getParameter("EMAIL");
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void paint(Graphics g) {
|
||||
.fl
|
||||
g.drawString(date + " by ",100, 15);
|
||||
.fl
|
||||
g.drawString(email,290,15);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The output from \f3javap DocFooter.class\fP yields:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Compiled from "DocFooter.java"
|
||||
.fl
|
||||
public class DocFooter extends java.applet.Applet {
|
||||
.fl
|
||||
java.lang.String date;
|
||||
.fl
|
||||
java.lang.String email;
|
||||
.fl
|
||||
public DocFooter();
|
||||
.fl
|
||||
public void init();
|
||||
.fl
|
||||
public void paint(java.awt.Graphics);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The output from \f3javap \-c DocFooter.class\fP yields:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Compiled from "DocFooter.java"
|
||||
.fl
|
||||
public class DocFooter extends java.applet.Applet {
|
||||
.fl
|
||||
java.lang.String date;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
java.lang.String email;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public DocFooter();
|
||||
.fl
|
||||
Code:
|
||||
.fl
|
||||
0: aload_0
|
||||
.fl
|
||||
1: invokespecial #1 // Method java/applet/Applet."<init>":()V
|
||||
.fl
|
||||
4: return
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void init();
|
||||
.fl
|
||||
Code:
|
||||
.fl
|
||||
0: aload_0
|
||||
.fl
|
||||
1: sipush 500
|
||||
.fl
|
||||
4: bipush 100
|
||||
.fl
|
||||
6: invokevirtual #2 // Method resize:(II)V
|
||||
.fl
|
||||
9: aload_0
|
||||
.fl
|
||||
10: aload_0
|
||||
.fl
|
||||
11: ldc #3 // String LAST_UPDATED
|
||||
.fl
|
||||
13: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String;
|
||||
.fl
|
||||
16: putfield #5 // Field date:Ljava/lang/String;
|
||||
.fl
|
||||
19: aload_0
|
||||
.fl
|
||||
20: aload_0
|
||||
.fl
|
||||
21: ldc #6 // String EMAIL
|
||||
.fl
|
||||
23: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String;
|
||||
.fl
|
||||
26: putfield #7 // Field email:Ljava/lang/String;
|
||||
.fl
|
||||
29: return
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void paint(java.awt.Graphics);
|
||||
.fl
|
||||
Code:
|
||||
.fl
|
||||
0: aload_1
|
||||
.fl
|
||||
1: new #8 // class java/lang/StringBuilder
|
||||
.fl
|
||||
4: dup
|
||||
.fl
|
||||
5: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V
|
||||
.fl
|
||||
8: aload_0
|
||||
.fl
|
||||
9: getfield #5 // Field date:Ljava/lang/String;
|
||||
.fl
|
||||
12: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
.fl
|
||||
15: ldc #11 // String by
|
||||
.fl
|
||||
17: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
.fl
|
||||
20: invokevirtual #12 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
|
||||
.fl
|
||||
23: bipush 100
|
||||
.fl
|
||||
25: bipush 15
|
||||
.fl
|
||||
27: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V
|
||||
.fl
|
||||
30: aload_1
|
||||
.fl
|
||||
31: aload_0
|
||||
.fl
|
||||
32: getfield #7 // Field email:Ljava/lang/String;
|
||||
.fl
|
||||
35: sipush 290
|
||||
.fl
|
||||
38: bipush 15
|
||||
.fl
|
||||
40: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V
|
||||
.fl
|
||||
43: return
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-help \-\-help \-?
|
||||
Prints out help message for \f3javap\fP.
|
||||
.TP 3
|
||||
\-version
|
||||
Prints out version information.
|
||||
.TP 3
|
||||
\-l
|
||||
Prints out line and local variable tables.
|
||||
.TP 3
|
||||
\-public
|
||||
Shows only public classes and members.
|
||||
.TP 3
|
||||
\-protected
|
||||
Shows only protected and public classes and members.
|
||||
.TP 3
|
||||
\-package
|
||||
Shows only package, protected, and public classes and members. This is the default.
|
||||
.TP 3
|
||||
\-private \-p
|
||||
Shows all classes and members.
|
||||
.TP 3
|
||||
\-Jflag
|
||||
Pass \f2flag\fP directly to the runtime system. Some examples:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
javap \-J\-version
|
||||
.fl
|
||||
javap \-J\-Djava.security.manager \-J\-Djava.security.policy=MyPolicy MyClassName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-s
|
||||
Prints internal type signatures.
|
||||
.TP 3
|
||||
\-sysinfo
|
||||
Shows system information (path, size, date, MD5 hash) of the class being processed.
|
||||
.TP 3
|
||||
\-constants
|
||||
Shows static final constants.
|
||||
.TP 3
|
||||
\-c
|
||||
Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the
|
||||
.na
|
||||
\f2Java Virtual Machine Specification\fP @
|
||||
.fi
|
||||
http://java.sun.com/docs/books/vmspec/.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Prints stack size, number of \f2locals\fP and \f2args\fP for methods.
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set.
|
||||
.TP 3
|
||||
\-bootclasspath path
|
||||
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in \f2jre/lib/rt.jar\fP and several other jar files.
|
||||
.TP 3
|
||||
\-extdirs dirs
|
||||
Overrides location at which installed extensions are searched for. The default location for extensions is the value of \f2java.ext.dirs\fP.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
javac(1), java(1), jdb(1), javah(1), javadoc(1)
|
||||
.LP
|
||||
|
||||
For more information about JVM options, see the \f3java(1)\fR command documentation\&.
|
||||
.TP
|
||||
-s
|
||||
.br
|
||||
Prints internal type signatures\&.
|
||||
.TP
|
||||
-sysinfo
|
||||
.br
|
||||
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
|
||||
.TP
|
||||
-constants
|
||||
.br
|
||||
Shows \f3static final\fR constants\&.
|
||||
.TP
|
||||
-c
|
||||
.br
|
||||
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Prints stack size, number of locals and arguments for methods\&.
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
|
||||
.TP
|
||||
-bootclasspath \fIpath\fR
|
||||
.br
|
||||
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
|
||||
.TP
|
||||
-extdir \fIdirs\fR
|
||||
.br
|
||||
Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
|
||||
.SH EXAMPLE
|
||||
Compile the following \f3DocFooter\fR class:
|
||||
.sp
|
||||
.nf
|
||||
\f3import java\&.awt\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3import java\&.applet\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class DocFooter extends Applet {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 String date;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 String email;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void init() {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 resize(500,100);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 date = getParameter("LAST_UPDATED");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 email = getParameter("EMAIL");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void paint(Graphics g) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 g\&.drawString(date + " by ",100, 15);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 g\&.drawString(email,290,15);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The output from the \f3javap DocFooter\&.class\fR command yields the following:
|
||||
.sp
|
||||
.nf
|
||||
\f3Compiled from "DocFooter\&.java"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String date;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String email;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public DocFooter();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void init();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void paint(java\&.awt\&.Graphics);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The output from \f3javap -c DocFooter\&.class\fR command yields the following:
|
||||
.sp
|
||||
.nf
|
||||
\f3Compiled from "DocFooter\&.java"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String date;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String email;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public DocFooter();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Code:\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 0: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 1: invokespecial #1 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3java/applet/Applet\&."<init>":()V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 4: return \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void init();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Code:\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 0: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 1: sipush 500\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 4: bipush 100\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 6: invokevirtual #2 // Method resize:(II)V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 9: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 10: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 11: ldc #3 // String LAST_UPDATED\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 13: invokevirtual #4 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 19: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 20: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 21: ldc #6 // String EMAIL\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 23: invokevirtual #4 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 29: return \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void paint(java\&.awt\&.Graphics);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Code:\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 0: aload_1 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 1: new #8 // class java/lang/StringBuilder\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 4: dup \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 5: invokespecial #9 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&."<init>":()V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 8: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 12: invokevirtual #10 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 15: ldc #11 // String by \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 17: invokevirtual #10 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 20: invokevirtual #12 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 23: bipush 100\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 25: bipush 15\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 27: invokevirtual #13 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 30: aload_1 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 31: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 35: sipush 290\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 38: bipush 15\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 40: invokevirtual #13 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 43: return \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javac(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jdb(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javah(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javadoc(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
114
jdk/src/bsd/doc/man/jcmd.1
Normal file
114
jdk/src/bsd/doc/man/jcmd.1
Normal file
@ -0,0 +1,114 @@
|
||||
'\" t
|
||||
.\" Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jcmd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jcmd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.SH NAME
|
||||
jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR]
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR]
|
||||
.fi
|
||||
.sp
|
||||
.SH DESCRIPTION
|
||||
The \f3jcmd\fR utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&.
|
||||
.PP
|
||||
\fINote:\fR To invoke diagnostic commands from a remote machine or with different identiers, you can use the \f3com\&.sun\&.management\&.DiagnosticCommandMBean\fR interface\&. For more information about the \f3DiagnosticCommandMBean\fR interface, see the API documentation at http://download\&.java\&.net/jdk8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html
|
||||
.PP
|
||||
If you run \f3jcmd\fR without arguments or with the \f3-l\fR option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process\&. Running \f3jcmd\fR with the \f3-h\fR or \f3-help\fR option prints the tool\(cqs help message\&.
|
||||
.PP
|
||||
If you specify the processes identifier (\fIpid\fR) or the main class (\fImain-class\fR) as the first argument, \f3jcmd\fR sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying \f30\fR as the process identifier\&. Use one of the following as the diagnostic command request:
|
||||
.TP
|
||||
Perfcounter\&.print
|
||||
Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&.
|
||||
.TP
|
||||
-f \fIfilename\fR
|
||||
.br
|
||||
The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the \f3-f\fR option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&.
|
||||
.TP
|
||||
\fIcommand\fR [\fIarguments\fR]
|
||||
The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the \f3help\fR command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the \f3help\fR command\&.
|
||||
|
||||
\fINote:\fR If any arguments contain spaces, you must surround them with single or double quotation marks (\f3\&'\fR or \f3"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\f3\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&.
|
||||
.SH OPTIONS
|
||||
Options are mutually exclusive\&.
|
||||
.TP
|
||||
-f \fIfilename\fR
|
||||
.br
|
||||
Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&.
|
||||
.TP
|
||||
-h, -help
|
||||
.br
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
Prints the list of running Java processes identifiers with the main class and command-line arguments\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@ -1,137 +1,113 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jconsole 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Troubleshooting, Profiling, Monitoring and Management Tools
|
||||
.\" Title: jconsole.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jconsole 1 "21 November 2013" "JDK 8" "Java Troubleshooting, Profiling, Monitoring and Management Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jconsole \- Java Monitoring and Management Console
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jconsole\fP [ \f2options\fP ] [ connection ... ]
|
||||
.fl
|
||||
.SH NAME
|
||||
jconsole \- Starts a graphical console that lets you monitor and manage Java applications\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.fl
|
||||
.fi
|
||||
\fBjconsole\fR [ \fIoptions\fR ] [ connection \&.\&.\&. ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
connection = \fIpid\fR | \fIhost\fR:\fIport\fR | \fIjmxURL\fR
|
||||
The \f3pid\fR value is the process ID of a local Java Virtual Machine (JVM)\&. The JVM must be running with the same user ID as the user ID running the \f3jconsole\fR command\&.The \f3host:port\fR values are the name of the host system on which the JVM is running, and the port number specified by the system property \f3com\&.sun\&.management\&.jmxremote\&.port\fR when the JVM was started\&.The \f3jmxUrl\fR value is the address of the JMX agent to be connected to as described in JMXServiceURL\&.
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Options, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
connection = pid | host:port | jmxUrl
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2pid\fP Process ID of a local Java VM. The Java VM must be running with the same user ID as the user ID running jconsole. See
|
||||
.na
|
||||
\f2JMX Monitoring and Management\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details.
|
||||
.TP 2
|
||||
o
|
||||
\f2host\fP:\f2port\fP Name of the host system on which the Java VM is running and the port number specified by the system property \f2com.sun.management.jmxremote.port\fP when the Java VM was started. See
|
||||
.na
|
||||
\f2JMX Monitoring and Management\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details.
|
||||
.TP 2
|
||||
o
|
||||
\f2jmxUrl\fP Address of the JMX agent to be connected to as described in
|
||||
.na
|
||||
\f2JMXServiceURL\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/javax/management/remote/JMXServiceURL.html.
|
||||
.RE
|
||||
.RE
|
||||
For more information about the \f3connection\fR parameter, see Monitoring and Management Using JMX Technology at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/management/agent\&.html
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jconsole\fP command launches a graphical console tool that enables you to monitor and manage Java applications and virtual machines on a local or remote machine.
|
||||
.LP
|
||||
.LP
|
||||
On Windows, \f3jconsole\fP does not associate with a console window. It will, however, display a dialog box with error information if the \f3jconsole\fP command fails for some reason.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-interval=n
|
||||
Set the update interval to \f2n\fP seconds (default is 4 seconds).
|
||||
.TP 3
|
||||
\-notile
|
||||
Do not tile windows initially (for two or more connections).
|
||||
.TP 3
|
||||
\-pluginpath plugins
|
||||
Specify a list of directories or JAR files which are searched for JConsole plugins. The \f2plugins\fP path should contain a provider\-configuration file named:
|
||||
See also the \f3JMXServiceURL\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/javax/management/remote/JMXServiceURL\&.html
|
||||
.SH DESCRIPTION
|
||||
The \f3jconsole\fR command starts a graphical console tool that lets you monitor and manage Java applications and virtual machines on a local or remote machine\&.
|
||||
.PP
|
||||
On Windows, the \f3jconsole\fR command does not associate with a console window\&. It does, however, display a dialog box with error information when the \f3jconsole\fR command fails\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-interval\fI=n\fR
|
||||
.br
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
META\-INF/services/com.sun.tools.jconsole.JConsolePlugin
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
containing one line for each plugin specifying the fully qualified class name of the class implementing the
|
||||
.na
|
||||
\f2com.sun.tools.jconsole.JConsolePlugin\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/JConsolePlugin.html class.
|
||||
.TP 3
|
||||
\-version
|
||||
Output version information and exit.
|
||||
.TP 3
|
||||
\-help
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Pass <flag> to the Java virtual machine on which jconsole is run.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Using JConsole\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/jconsole.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Monitoring and Management for Java Platform\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/index.html
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Sets the update interval to \fIn\fR seconds (default is 4 seconds)\&.
|
||||
.TP
|
||||
-notile
|
||||
.br
|
||||
Does not tile windows initially (for two or more connections)\&.
|
||||
.TP
|
||||
-pluginpath \fIplugins\fR
|
||||
.br
|
||||
Specifies a list of directories or JAR files to be searched for \f3JConsole\fR plug-ins\&. The \fIplugins\fR path should contain a provider-configuration file named \f3META-INF/services/com\&.sun\&.tools\&.jconsole\&.JConsolePlugin\fR that contains one line for each plug-in\&. The line specifies the fully qualified class name of the class implementing the \f3com\&.sun\&.tools\&.jconsole\&.JConsolePlugin\fR class\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Displays release information and exits\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
Passes \f3flag\fR to the JVM on which the \f3jconsole\fR command is run\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Using JConsole at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/management/jconsole\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Monitoring and Management Using JMX Technology at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/management/agent\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3JMXServiceURL\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/javax/management/remote/JMXServiceURL\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,330 +1,271 @@
|
||||
." Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jdb 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: jdb.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jdb 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jdb \- The Java Debugger
|
||||
.LP
|
||||
.LP
|
||||
\f3jdb\fP helps you find and fix bugs in Java language programs.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jdb\fP [ options ] [ class ] [ arguments ]
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jdb \- Finds and fixes bugs in Java platform programs\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options, as specified below.
|
||||
.TP 3
|
||||
class
|
||||
Name of the class to begin debugging.
|
||||
.TP 3
|
||||
arguments
|
||||
Arguments passed to the \f2main()\fP method of \f2class\fP.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The Java Debugger, \f3jdb\fP, is a simple command\-line debugger for Java classes. It is a demonstration of the
|
||||
.na
|
||||
\f2Java Platform Debugger Architecture\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/jpda/index.html that provides inspection and debugging of a local or remote Java Virtual Machine.
|
||||
.LP
|
||||
.SS
|
||||
Starting a jdb Session
|
||||
.LP
|
||||
.LP
|
||||
There are many ways to start a jdb session. The most frequently used way is to have \f3jdb\fP launch a new Java Virtual Machine (VM) with the main class of the application to be debugged. This is done by substituting the command \f3jdb\fP for \f3java\fP in the command line. For example, if your application's main class is MyClass, you use the following command to debug it under JDB:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% jdb MyClass
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
When started this way, \f3jdb\fP invokes a second Java VM with any specified parameters, loads the specified class, and stops the VM before executing that class's first instruction.
|
||||
.LP
|
||||
.LP
|
||||
Another way to use \f3jdb\fP is by attaching it to a Java VM that is already running. Syntax for Starting a VM to which jdb will attach when the VM is running is as follows. This loads in\-process debugging libraries and specifies the kind of connection to be made.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-agentlib:jdwp=transport=dt_socket,server=y,suspend=n
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For example, the following command will run the MyClass application, and allow \f3jdb\fP to connect to it at a later time.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% java \-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n MyClass
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
You can then attach \f3jdb\fP to the VM with the following commmand:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% jdb \-attach 8000
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Note that "MyClass" is not specified in the \f3jdb\fP command line in this case because \f3jdb\fP is connecting to an existing VM instead of launching a new one.
|
||||
.LP
|
||||
.LP
|
||||
There are many other ways to connect the debugger to a VM, and all of them are supported by \f3jdb\fP. The Java Platform Debugger Architecture has additional
|
||||
.na
|
||||
\f2documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection options. For information on starting a J2SE 1.4.2 or early VM for use with \f3jdb\fP see the
|
||||
.na
|
||||
\f21.4.2 documentation\fP @
|
||||
.fi
|
||||
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
|
||||
.LP
|
||||
.SS
|
||||
Basic jdb Commands
|
||||
.LP
|
||||
.LP
|
||||
The following is a list of the basic \f3jdb\fP commands. The Java debugger supports other commands which you can list using \f3jdb\fP's \f2help\fP command.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
help, or ?
|
||||
The most important \f3jdb\fP command, \f2help\fP displays the list of recognized commands with a brief description.
|
||||
.TP 3
|
||||
\fBjdb\fR [\fIoptions\fR] [\fIclassname\fR] [\fIarguments\fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclass\fRname
|
||||
Name of the main class to debug\&.
|
||||
.TP
|
||||
\fIarguments\fR
|
||||
Arguments passed to the \f3main()\fR method of the class\&.
|
||||
.SH DESCRIPTION
|
||||
The Java Debugger (JDB) is a simple command-line debugger for Java classes\&. The \f3jdb\fR command and its options call the JDB\&. The \f3jdb\fR command demonstrates the Java Platform Debugger Architecture (JDBA) and provides inspection and debugging of a local or remote Java Virtual Machine (JVM)\&. See Java Platform Debugger Architecture (JDBA) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jpda/index\&.html
|
||||
.SS START\ A\ JDB\ SESSION
|
||||
There are many ways to start a JDB session\&. The most frequently used way is to have JDB launch a new JVM with the main class of the application to be debugged\&. Do this by substituting the \f3jdb\fR command for the \f3java\fR command in the command line\&. For example, if your application\&'s main class is \f3MyClass\fR, then use the following command to debug it under JDB:
|
||||
.sp
|
||||
.nf
|
||||
\f3jdb MyClass\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
When started this way, the \f3jdb\fR command calls a second JVM with the specified parameters, loads the specified class, and stops the JVM before executing that class\&'s first instruction\&.
|
||||
.PP
|
||||
Another way to use the \f3jdb\fR command is by attaching it to a JVM that is already running\&. Syntax for starting a JVM to which the \f3jdb\fR command attaches when the JVM is running is as follows\&. This loads in-process debugging libraries and specifies the kind of connection to be made\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3java \-agentlib:jdwp=transport=dt_socket,server=y,suspend=n MyClass\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
You can then attach the \f3jdb\fR command to the JVM with the following command:
|
||||
.sp
|
||||
.nf
|
||||
\f3jdb \-attach 8000\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The \f3MyClass\fR argument is not specified in the \f3jdb\fR command line in this case because the \f3jdb\fR command is connecting to an existing JVM instead of launching a new JVM\&.
|
||||
.PP
|
||||
There are many other ways to connect the debugger to a JVM, and all of them are supported by the \f3jdb\fR command\&. The Java Platform Debugger Architecture has additional documentation on these connection options\&.
|
||||
.SS BASIC\ JDB\ COMMANDS
|
||||
The following is a list of the basic \f3jdb\fR commands\&. The JDB supports other commands that you can list with the \f3-help\fR option\&.
|
||||
.TP
|
||||
help or ?
|
||||
The \f3help\fR or \f3?\fR commands display the list of recognized commands with a brief description\&.
|
||||
.TP
|
||||
run
|
||||
After starting \f3jdb\fP, and setting any necessary breakpoints, you can use this command to start the execution the debugged application. This command is available only when \f3jdb\fP launches the debugged application (as opposed to attaching to an existing VM).
|
||||
.TP 3
|
||||
After you start JDB and set breakpoints, you can use the \f3run\fR command to execute the debugged application\&. The \f3run\fR command is available only when the \f3jdb\fR command starts the debugged application as opposed to attaching to an existing JVM\&.
|
||||
.TP
|
||||
cont
|
||||
Continues execution of the debugged application after a breakpoint, exception, or step.
|
||||
.TP 3
|
||||
Continues execution of the debugged application after a breakpoint, exception, or step\&.
|
||||
.TP
|
||||
print
|
||||
Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the \f2dump\fP command below for getting more information about an object.
|
||||
.br
|
||||
.br
|
||||
\f2NOTE: To display local variables, the containing class must have been compiled with the \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP option.
|
||||
.br
|
||||
.br
|
||||
\f2print\fP supports many simple Java expressions including those with method invocations, for example:
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2print MyClass.myStaticField\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print myObj.myInstanceField\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print i + j + k\fP \f2(i, j, k are primities and either fields or local variables)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print myObj.myMethod()\fP \f2(if myMethod returns a non\-null)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print new java.lang.String("Hello").length()\fP
|
||||
.RE
|
||||
.TP 3
|
||||
Displays Java objects and primitive values\&. For variables or fields of primitive types, the actual value is printed\&. For objects, a short description is printed\&. See the dump command to find out how to get more information about an object\&.
|
||||
|
||||
\fINote:\fR To display local variables, the containing class must have been compiled with the \f3javac -g\fR option\&.
|
||||
|
||||
The \f3print\fR command supports many simple Java expressions including those with method invocations, for example:
|
||||
.sp
|
||||
.nf
|
||||
\f3print MyClass\&.myStaticField\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print myObj\&.myInstanceField\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print i + j + k (i, j, k are primities and either fields or local variables)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print myObj\&.myMethod() (if myMethod returns a non\-null)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print new java\&.lang\&.String("Hello")\&.length()\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
dump
|
||||
For primitive values, this command is identical to \f2print\fP. For objects, it prints the current value of each field defined in the object. Static and instance fields are included.
|
||||
.br
|
||||
.br
|
||||
The \f2dump\fP command supports the same set of expressions as the \f2print\fP command.
|
||||
.TP 3
|
||||
For primitive values, the \f3dump\fR command is identical to the \f3print\fR command\&. For objects, the \f3dump\fR command prints the current value of each field defined in the object\&. Static and instance fields are included\&. The \f3dump\fR command supports the same set of expressions as the \f3print\fR command\&.
|
||||
.TP
|
||||
threads
|
||||
List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
4. (java.lang.Thread)0x1 main running
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is "main", and it is currently running,
|
||||
.TP 3
|
||||
List the threads that are currently running\&. For each thread, its name and current status are printed and an index that can be used in other commands\&. In this example, the thread index is 4, the thread is an instance of \f3java\&.lang\&.Thread\fR, the thread name is \f3main\fR, and it is currently running\&.
|
||||
.sp
|
||||
.nf
|
||||
\f34\&. (java\&.lang\&.Thread)0x1 main running\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
thread
|
||||
Select a thread to be the current thread. Many \f3jdb\fP commands are based on the setting of the current thread. The thread is specified with the thread index described in the \f2threads\fP command above.
|
||||
.TP 3
|
||||
Select a thread to be the current thread\&. Many \f3jdb\fR commands are based on the setting of the current thread\&. The thread is specified with the thread index described in the threads command\&.
|
||||
.TP
|
||||
where
|
||||
\f2where\fP with no arguments dumps the stack of the current thread. \f2where all\fP dumps the stack of all threads in the current thread group. \f2where\fP \f2threadindex\fP dumps the stack of the specified thread.
|
||||
The \f3where\fR command with no arguments dumps the stack of the current thread\&. The \f3where\fR\f3all\fR command dumps the stack of all threads in the current thread group\&. The \f3where\fR\f3threadindex\fR command dumps the stack of the specified thread\&.
|
||||
|
||||
If the current thread is suspended either through an event such as a breakpoint or through the \f3suspend\fR command, then local variables and fields can be displayed with the \f3print\fR and \f3dump\fR commands\&. The \f3up\fR and \f3down\fR commands select which stack frame is the current stack frame\&.
|
||||
.SS BREAKPOINTS
|
||||
Breakpoints can be set in JDB at line numbers or at the first instruction of a method, for example:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The command \f3stop at MyClass:22\fR sets a breakpoint at the first instruction for line 22 of the source file containing \f3MyClass\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The command \f3stop in java\&.lang\&.String\&.length\fR sets a breakpoint at the beginning of the method \f3java\&.lang\&.String\&.length\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The command \f3stop in MyClass\&.<clinit>\fR uses \f3<clinit>\fR to identify the static initialization code for \f3MyClass\fR\&.
|
||||
.PP
|
||||
When a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint\&. For example, \f3MyClass\&.myMethod(int,java\&.lang\&.String)\fR or \f3MyClass\&.myMethod()\fR\&.
|
||||
.PP
|
||||
The \f3clear\fR command removes breakpoints using the following syntax: \f3clear MyClass:45\fR\&. Using the \f3clear\fR or \f3stop\fR command with no argument displays a list of all breakpoints currently set\&. The \f3cont\fR command continues execution\&.
|
||||
.SS STEPPING
|
||||
The \f3step\fR command advances execution to the next line whether it is in the current stack frame or a called method\&. The \f3next\fR command advances execution to the next line in the current stack frame\&.
|
||||
.SS EXCEPTIONS
|
||||
When an exception occurs for which there is not a \f3catch\fR statement anywhere in the throwing thread\&'s call stack, the JVM typically prints an exception trace and exits\&. When running under JDB, however, control returns to JDB at the offending throw\&. You can then use the \f3jdb\fR command to diagnose the cause of the exception\&.
|
||||
.PP
|
||||
Use the \f3catch\fR command to cause the debugged application to stop at other thrown exceptions, for example: \f3catch java\&.io\&.FileNotFoundException\fR or \f3catch\fR\f3mypackage\&.BigTroubleException\fR\&. Any exception that is an instance of the specified class or subclass stops the application at the point where it is thrown\&.
|
||||
.PP
|
||||
The \f3ignore\fR command negates the effect of an earlier \f3catch\fR command\&. The \f3ignore\fR command does not cause the debugged JVM to ignore specific exceptions, but only to ignore the debugger\&.
|
||||
.SH OPTIONS
|
||||
When you use the \f3jdb\fR command instead of the \f3java\fR command on the command line, the \f3jdb\fR command accepts many of the same options as the \f3java\fR command, including \f3-D\fR, \f3-classpath\fR, and \f3-X\fR options\&. The following list contains additional options that are accepted by the \f3jdb\fR command\&.
|
||||
.PP
|
||||
Other options are supported to provide alternate mechanisms for connecting the debugger to the JVM it is to debug\&. For additional documentation about these connection alternatives, see Java Platform Debugger Architecture (JPDA) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jpda/index\&.html
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message\&.
|
||||
.TP
|
||||
-sourcepath \fIdir1:dir2: \&. \&. \&.\fR
|
||||
.br
|
||||
If the current thread is suspended (either through an event such as a breakpoint or through the \f2suspend\fP command), local variables and fields can be displayed with the \f2print\fP and \f2dump\fP commands. The \f2up\fP and \f2down\fP commands select which stack frame is current.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Breakpoints
|
||||
.LP
|
||||
.LP
|
||||
Breakpoints can be set in \f3jdb\fP at line numbers or at the first instruction of a method, for example:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2stop at MyClass:22\fP \f2(sets a breakpoint at the first instruction for line 22 of the source file containing MyClass)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2stop in java.lang.String.length\fP \f2(sets a breakpoint at the beginnig of the method \fP\f2java.lang.String.length\fP)
|
||||
.TP 2
|
||||
o
|
||||
\f2stop in MyClass.<init>\fP \f2(<init> identifies the MyClass constructor)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2stop in MyClass.<clinit>\fP \f2(<clinit> identifies the static initialization code for MyClass)\fP
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. For example, "\f2MyClass.myMethod(int,java.lang.String)\fP", or "\f2MyClass.myMethod()\fP".
|
||||
.LP
|
||||
.LP
|
||||
The \f2clear\fP command removes breakpoints using a syntax as in "\f2clear\ MyClass:45\fP". Using the \f2clear\fP or command with no argument displays a list of all breakpoints currently set. The \f2cont\fP command continues execution.
|
||||
.LP
|
||||
.SS
|
||||
Stepping
|
||||
.LP
|
||||
.LP
|
||||
The \f2step\fP commands advances execution to the next line whether it is in the current stack frame or a called method. The \f2next\fP command advances execution to the next line in the current stack frame.
|
||||
.LP
|
||||
.SS
|
||||
Exceptions
|
||||
.LP
|
||||
.LP
|
||||
When an exception occurs for which there isn't a catch statement anywhere in the throwing thread's call stack, the VM normally prints an exception trace and exits. When running under \f3jdb\fP, however, control returns to \f3jdb\fP at the offending throw. You can then use \f3jdb\fP to diagnose the cause of the exception.
|
||||
.LP
|
||||
.LP
|
||||
Use the \f2catch\fP command to cause the debugged application to stop at other thrown exceptions, for example: "\f2catch java.io.FileNotFoundException\fP" or "\f2catch mypackage.BigTroubleException\fP. Any exception which is an instance of the specifield class (or of a subclass) will stop the application at the point where it is thrown.
|
||||
.LP
|
||||
.LP
|
||||
The \f2ignore\fP command negates the effect of a previous \f2catch\fP command.
|
||||
.LP
|
||||
.LP
|
||||
\f2NOTE: The \fP\f2ignore\fP command does not cause the debugged VM to ignore specific exceptions, only the debugger.
|
||||
.LP
|
||||
.SH "Command Line Options"
|
||||
.LP
|
||||
.LP
|
||||
When you use \f3jdb\fP in place of the Java application launcher on the command line, \f3jdb\fP accepts many of the same options as the java command, including \f2\-D\fP, \f2\-classpath\fP, and \f2\-X<option>\fP.
|
||||
.LP
|
||||
.LP
|
||||
The following additional options are accepted by \f3jdb\fP:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-help
|
||||
Displays a help message.
|
||||
.TP 3
|
||||
\-sourcepath <dir1:dir2:...>
|
||||
Uses the given path in searching for source files in the specified path. If this option is not specified, the default path of "." is used.
|
||||
.TP 3
|
||||
\-attach <address>
|
||||
Attaches the debugger to previously running VM using the default connection mechanism.
|
||||
.TP 3
|
||||
\-listen <address>
|
||||
Waits for a running VM to connect at the specified address using standard connector.
|
||||
.TP 3
|
||||
\-listenany
|
||||
Waits for a running VM to connect at any available address using standard connector.
|
||||
.TP 3
|
||||
\-launch
|
||||
Launches the debugged application immediately upon startup of jdb. This option removes the need for using the \f2run\fP command. The debuged application is launched and then stopped just before the initial application class is loaded. At that point you can set any necessary breakpoints and use the \f2cont\fP to continue execution.
|
||||
.TP 3
|
||||
\-listconnectors
|
||||
List the connectors available in this VM
|
||||
.TP 3
|
||||
\-connect <connector\-name>:<name1>=<value1>,...
|
||||
Connects to target VM using named connector with listed argument values.
|
||||
.TP 3
|
||||
\-dbgtrace [flags]
|
||||
Prints info for debugging jdb.
|
||||
.TP 3
|
||||
\-tclient
|
||||
Runs the application in the Java HotSpot(tm) VM (Client).
|
||||
.TP 3
|
||||
\-tserver
|
||||
Runs the application in the Java HotSpot(tm) VM (Server).
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine used to run jdb. (Options for the application Java virtual machine are passed to the \f3run\fP command.) For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Other options are supported for alternate mechanisms for connecting the debugger and the VM it is to debug. The Java Platform Debugger Architecture has additional
|
||||
.na
|
||||
\f2documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection alternatives.
|
||||
.LP
|
||||
.SS
|
||||
Options Forwarded to Debuggee Process
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-v \-verbose[:class|gc|jni]
|
||||
Turns on verbose mode.
|
||||
.TP 3
|
||||
\-D<name>=<value>
|
||||
Sets a system property.
|
||||
.TP 3
|
||||
\-classpath <directories separated by ":">
|
||||
Lists directories in which to look for classes.
|
||||
.TP 3
|
||||
\-X<option>
|
||||
Non\-standard target VM option
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
javac(1), java(1), javah(1), javap(1), javadoc(1).
|
||||
.LP
|
||||
|
||||
Uses the specified path to search for source files in the specified path\&. If this option is not specified, then use the default path of dot (\&.)\&.
|
||||
.TP
|
||||
-attach \fIaddress\fR
|
||||
.br
|
||||
Attaches the debugger to a running JVM with the default connection mechanism\&.
|
||||
.TP
|
||||
-listen \fIaddress\fR
|
||||
.br
|
||||
Waits for a running JVM to connect to the specified address with a standard connector\&.
|
||||
.TP
|
||||
-launch
|
||||
.br
|
||||
Starts the debugged application immediately upon startup of JDB\&. The \f3-launch\fR option removes the need for the \f3run\fR command\&. The debugged application is launched and then stopped just before the initial application class is loaded\&. At that point, you can set any necessary breakpoints and use the \f3cont\fR command to continue execution\&.
|
||||
.TP
|
||||
-listconnectors
|
||||
.br
|
||||
List the connectors available in this JVM\&.
|
||||
.TP
|
||||
-connect connector-name:\fIname1=value1\fR
|
||||
.br
|
||||
Connects to the target JVM with the named connector and listed argument values\&.
|
||||
.TP
|
||||
-dbgtrace [\fIflags\fR]
|
||||
.br
|
||||
Prints information for debugging the \f3jdb\fR command\&.
|
||||
.TP
|
||||
-tclient
|
||||
.br
|
||||
Runs the application in the Java HotSpot VM client\&.
|
||||
.TP
|
||||
-tserver
|
||||
.br
|
||||
Runs the application in the Java HotSpot VM server\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the JVM, where option is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH OPTIONS\ FORWARDED\ TO\ THE\ DEBUGGER\ PROCESS
|
||||
.TP
|
||||
-v -verbose[:\fIclass\fR|gc|jni]
|
||||
.br
|
||||
Turns on verbose mode\&.
|
||||
.TP
|
||||
-D\fIname\fR=\fIvalue\fR
|
||||
.br
|
||||
Sets a system property\&.
|
||||
.TP
|
||||
-classpath \fIdir\fR
|
||||
.br
|
||||
Lists directories separated by colons in which to look for classes\&.
|
||||
.TP
|
||||
-X\fIoption\fR
|
||||
.br
|
||||
Nonstandard target JVM option\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javac(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javah(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javap(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
532
jdk/src/bsd/doc/man/jdeps.1
Normal file
532
jdk/src/bsd/doc/man/jdeps.1
Normal file
@ -0,0 +1,532 @@
|
||||
'\" t
|
||||
.\" Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: jdeps.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jdeps 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.SH NAME
|
||||
jdeps \- Java class dependency analyzer\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjdeps\fR [\fIoptions\fR] \fIclasses\fR \&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclass\fR\fIes\fR
|
||||
Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&.
|
||||
.SH DESCRIPTION
|
||||
The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files\&. The options determine the output\&. By default, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-dotoutput <\fIdir\fR>
|
||||
.br
|
||||
Destination directory for DOT file output\&. If specified, \f3jdeps\fR will generate one dot file per each analyzed archive named <\fIarchive-file-name\fR>\&.dot listing the dependencies, and also a summary file named summary\&.dot listing the dependencies among the archives\&.
|
||||
.TP
|
||||
-s, -summary
|
||||
.br
|
||||
Prints dependency summary only\&.
|
||||
.TP
|
||||
-v, -verbose
|
||||
.br
|
||||
Prints all class-level dependencies\&.
|
||||
.TP
|
||||
-verbose:package
|
||||
.br
|
||||
Prints package-level dependencies excluding dependencies within the same archive\&.
|
||||
.TP
|
||||
-verbose:class
|
||||
.br
|
||||
Prints class-level dependencies excluding dependencies within the same archive\&.
|
||||
.TP
|
||||
-cp <\fIpath\fR>, -classpath <\fIpath\fR>
|
||||
.br
|
||||
Specifies where to find class files\&.
|
||||
|
||||
See also Setting the Class Path\&.
|
||||
.TP
|
||||
-p <\fIpkg name\fR>, -package <\fIpkg name\fR>
|
||||
.br
|
||||
Finds dependencies in the specified package\&. You can specify this option multiple times for different packages\&. The \f3-p\fR and \f3-e\fR options are mutually exclusive\&.
|
||||
.TP
|
||||
-e <\fIregex\fR>, -regex <\fIregex\fR>
|
||||
.br
|
||||
Finds dependencies in packages matching the specified regular expression pattern\&. The \f3-p\fR and \f3-e\fR options are mutually exclusive\&.
|
||||
.TP
|
||||
-include <\fIregex\fR>
|
||||
.br
|
||||
Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&.
|
||||
.TP
|
||||
-P, -profile
|
||||
.br
|
||||
Shows profile or the file containing a package\&.
|
||||
.TP
|
||||
-apionly
|
||||
.br
|
||||
Restricts analysis to APIs, for example, dependences from the signature of \f3public\fR and \f3protected\fR members of public classes including field type, method parameter types, returned type, and checked exception types\&.
|
||||
.TP
|
||||
-R, -recursive
|
||||
.br
|
||||
Recursively traverses all dependencies\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints version information\&.
|
||||
.TP
|
||||
-h, -?, -help
|
||||
.br
|
||||
Prints help message for \f3jdeps\fR\&.
|
||||
.SH EXAMPLES
|
||||
Analyzing the dependencies of Notepad\&.jar\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps demo/jfc/Notepad/Notepad\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3demo/jfc/Notepad/Notepad\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 <unnamed> (Notepad\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt\&.event \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.beans \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.net \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.logging \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.border \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.event \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.text \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.tree \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.undo \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Use -P or -profile option to show on which profile that Notepad depends\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-profile demo/jfc/Notepad/Notepad\&.jar \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3demo/jfc/Notepad/Notepad\&.jar \-> /usr/java/jre/lib/rt\&.jar (Full JRE)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 <unnamed> (Notepad\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt\&.event Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.beans Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.net compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.logging compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.border Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.event Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.text Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.tree Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.undo Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Analyzing the immediate dependencies of a specific class in a given classpath, for example the \f3com\&.sun\&.tools\&.jdeps\&.Main\fR class in the tools\&.jar file\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.jdeps (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Use the \f3-verbose:class\fR option to find class-level dependencies or use the \f3-v\fR or \f3-verbose\fR option to include dependencies from the same JAR file\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-verbose:class \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.jdeps\&.Main (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io\&.PrintWriter \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.Exception \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.Object \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.String \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.System \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Use the \f3-R\fR or \f3-recursive\fR option to analyze the transitive dependencies of the \f3com\&.sun\&.tools\&.jdeps\&.Main\fR class\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-R \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.classfile (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.reflect \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.charset \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.file \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.regex \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.jdeps (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.file \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.file\&.attribute \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.text \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.jar \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.regex \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.zip \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3/usr/java/jre/lib/jce\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 javax\&.crypto (jce\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.reflect \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.net \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security\&.cert \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security\&.spec \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.concurrent \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.jar \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.regex \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.zip \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.security\&.auth \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> sun\&.security\&.jca JDK internal API (rt\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> sun\&.security\&.util JDK internal API (rt\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 javax\&.crypto\&.spec (jce\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security\&.spec \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3/usr/java/jre/lib/rt\&.jar \-> /usr/java/jre/lib/jce\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.security (rt\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.crypto\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Generate dot files of the dependencies of Notepad demo\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-dotoutput dot demo/jfc/Notepad/Notepad\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
\f3jdeps\fR will create one dot file for each given JAR file named <\fIfilename\fR>\&.dot in the dot directory specified in the \f3-dotoutput\fR option, and also a summary file named summary\&.dot that will list the dependencies among the JAR files
|
||||
.sp
|
||||
.nf
|
||||
\f3$ cat dot/Notepad\&.jar\&.dot \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3digraph "Notepad\&.jar" {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 // Path: demo/jfc/Notepad/Notepad\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.awt";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.awt\&.event";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.beans";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.io";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.lang";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.net";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.util";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.util\&.logging";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.border";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.event";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.text";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.tree";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.undo";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3$ cat dot/summary\&.dot\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3digraph "summary" {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "Notepad\&.jar" \-> "rt\&.jar";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javap(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@ -1,141 +1,137 @@
|
||||
." Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jhat 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jhat.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jhat 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jhat \- Java Heap Analysis Tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jhat\fP [ \f2options\fP ] <heap\-dump\-file>
|
||||
.fl
|
||||
.SH NAME
|
||||
jhat \- Analyzes the Java heap\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Options, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
heap\-dump\-file
|
||||
Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you may specify which dump in the file by appending "#<number> to the file name, i.e. "foo.hprof#3".
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jhat\fP command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre\-designed queries (such as 'show all instances of a known class "Foo"') as well as \f3OQL\fP (\f3O\fPbject \f3Q\fPuery \f3L\fPanguage) \- a SQL\-like query language to query heap dumps. Help on OQL is available from the OQL help page shown by jhat. With the default port, OQL help is available at http://localhost:7000/oqlhelp/
|
||||
.LP
|
||||
.LP
|
||||
There are several ways to generate a java heap dump:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Use jmap(1) \-dump option to obtain a heap dump at runtime;
|
||||
.TP 2
|
||||
o
|
||||
Use jconsole(1) option to obtain a heap dump via
|
||||
.na
|
||||
\f2HotSpotDiagnosticMXBean\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime;
|
||||
.TP 2
|
||||
o
|
||||
Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option;
|
||||
.TP 2
|
||||
o
|
||||
Use
|
||||
.na
|
||||
\f2hprof\fP @
|
||||
.fi
|
||||
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-stack false/true
|
||||
Turn off tracking object allocation call stack. Note that if allocation site information is not available in the heap dump, you have to set this flag to false. Default is true.
|
||||
.TP 3
|
||||
\-refs false/true
|
||||
Turn off tracking of references to objects. Default is true. By default, back pointers (objects pointing to a given object a.k.a referrers or in\-coming references) are calculated for all objects in the heap.
|
||||
.TP 3
|
||||
\-port port\-number
|
||||
Set the port for the jhat's HTTP server. Default is 7000.
|
||||
.TP 3
|
||||
\-exclude exclude\-file
|
||||
Specify a file that lists data members that should be excluded from the "reachable objects" query. For example, if the file lists \f2java.lang.String.value\fP, then, whenever list of objects reachable from a specific object "o" are calculated, reference paths involving \f2java.lang.String.value\fP field will not considered.
|
||||
.TP 3
|
||||
\-baseline baseline\-dump\-file
|
||||
Specify a baseline heap dump. Objects in both heap dumps with the same object ID will be marked as not being "new". Other objects will be marked as "new". This is useful while comparing two different heap dumps.
|
||||
.TP 3
|
||||
\-debug int
|
||||
Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes.
|
||||
.TP 3
|
||||
\-version
|
||||
Report version number and exit.
|
||||
.TP 3
|
||||
\-h
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-help
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\fBjhat\fR [ \fIoptions\fR ] \fIheap\-dump\-file\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIheap-dump-file\fR
|
||||
Java binary heap dump file to be browsed\&. For a dump file that contains multiple heap dumps, you can specify which dump in the file by appending \f3#<number>\fR to the file name, for example, \f3myfile\&.hprof#3\fR\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jhat\fR command parses a Java heap dump file and starts a web server\&. The \f3jhat\fR command lets you to browse heap dumps with your favorite web browser\&. The \f3jhat\fR command supports predesigned queries such as show all instances of a known class \f3MyClass\fR, and Object Query Language (OQL)\&. OQL is similar to SQL, except for querying heap dumps\&. Help on OQL is available from the OQL help page shown by the \f3jhat\fR command\&. With the default port, OQL help is available at http://localhost:7000/oqlhelp/
|
||||
.PP
|
||||
There are several ways to generate a Java heap dump:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Use the \f3jmap -dump\fR option to obtain a heap dump at runtime\&. See jmap(1)\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Use the \f3jconsole\fR option to obtain a heap dump through \f3HotSpotDiagnosticMXBean\fR at runtime\&. See jconsole(1) and the \f3HotSpotDiagnosticMXBean\fR interface description at http://docs\&.oracle\&.com/javase/8/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Heap dump is generated when an \f3OutOfMemoryError\fR is thrown by specifying the \f3-XX:+HeapDumpOnOutOfMemoryError\fR Java Virtual Machine (JVM) option\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Use the \f3hprof\fR command\&. See the HPROF: A Heap/CPU Profiling Tool at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/hprof\&.html
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-stack false|true
|
||||
.br
|
||||
Turns off tracking object allocation call stack\&. If allocation site information is not available in the heap dump, then you have to set this flag to \f3false\fR\&. The default is \f3true\fR\&.
|
||||
.TP
|
||||
-refs false|true
|
||||
.br
|
||||
Turns off tracking of references to objects\&. Default is \f3true\fR\&. By default, back pointers, which are objects that point to a specified object such as referrers or incoming references, are calculated for all objects in the heap\&.
|
||||
.TP
|
||||
-port \fIport-number\fR
|
||||
.br
|
||||
Sets the port for the \f3jhat\fR HTTP server\&. Default is 7000\&.
|
||||
.TP
|
||||
-exclude \fIexclude-file\fR
|
||||
.br
|
||||
Specifies a file that lists data members that should be excluded from the reachable objects query\&. For example, if the file lists \f3java\&.lang\&.String\&.value\fR, then, then whenever the list of objects that are reachable from a specific object \f3o\fR are calculated, reference paths that involve \f3java\&.lang\&.String\&.value\fR field are not considered\&.
|
||||
.TP
|
||||
-baseline \fIexclude-file\fR
|
||||
.br
|
||||
Specifies a baseline heap dump\&. Objects in both heap dumps with the same object ID are marked as not being new\&. Other objects are marked as new\&. This is useful for comparing two different heap dumps\&.
|
||||
.TP
|
||||
-debug \fIint\fR
|
||||
.br
|
||||
Sets the debug level for this tool\&. A level of 0 means no debug output\&. Set higher values for more verbose modes\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Reports the release number and exits
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
Dsiplays a help message and exits\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message and exits\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
Passes \f3flag\fR to the Java Virtual Machine on which the \f3jhat\fR command is running\&. For example, \f3-J-Xmx512m\fR to use a maximum heap size of 512 MB\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jmap(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jconsole(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2hprof \- Heap and CPU profiling tool\fP @
|
||||
.fi
|
||||
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
HPROF: A Heap/CPU Profiling Tool at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/hprof\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,147 +1,133 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jinfo 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jinfo.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jinfo 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jinfo \- Configuration Info
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jinfo\fP [ option ] pid
|
||||
.fl
|
||||
\f3jinfo\fP [ option ] executable core
|
||||
.fl
|
||||
\f3jinfo\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jinfo \- Generates configuration information\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
option
|
||||
Options are mutually exclusive. Option, if used, should follow immediately after the command name.
|
||||
.RE
|
||||
\fBjinfo\fR [ \fIoption\fR ] \fIpid\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
pid
|
||||
process id for which the configuration info is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
|
||||
.RE
|
||||
\fBjinfo\fR [ \fIoption \fR] \fIexecutable core\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
core
|
||||
core file for which the configuration info is to be printed.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
remote\-hostname\-or\-IP
|
||||
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
server\-id
|
||||
optional unique id, if multiple debug servers are running on the same remote host.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jinfo\fP prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
|
||||
\fBjinfo\fR [ \fIoption \fR] \fI[ servier\-id ] remote\-hostname\-or\-IP\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoption\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID for which the configuration information is to be printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file for which the configuration information is to be printed\&.
|
||||
.TP
|
||||
\fIremote-hostname-or-IP\fR
|
||||
The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID to use when multiple debug servers are running on the same remote host\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jinfo\fR command prints Java configuration information for a specified Java process or core file or a remote debug server\&. The configuration information includes Java system properties and Java Virtual Machine (JVM) command-line flags\&. If the specified process is running on a 64-bit JVM, then you might need to specify the \f3-J-d64\fR option, for example: \f3jinfo\fR\f3-J-d64 -sysprops pid\fR\&.
|
||||
.PP
|
||||
This utility is unsupported and might not be available in future releases of the JDK\&. In Windows Systems where \f3dbgeng\&.dll\fR is not present, Debugging Tools For Windows must be installed to have these tools working\&. The \f3PATH\fR environment variable should contain the location of the jvm\&.dll that is used by the target process or the location from which the crash dump file was produced\&. For example, \f3set PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR \&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
no-option
|
||||
Prints both command-line flags and system property name-value pairs\&.
|
||||
.TP
|
||||
-flag \fIname\fR
|
||||
.br
|
||||
jinfo \-J\-d64 \-sysprops pid
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' need to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP
|
||||
.LP
|
||||
.LP
|
||||
\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
<no option>
|
||||
prints both command line flags as well as System properties name, value pairs.
|
||||
Prints the name and value of the specified command-line flag\&.
|
||||
.TP
|
||||
-flag \fI[+|-]name\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-flag name
|
||||
prints the name and value of the given command line flag.
|
||||
enables or disables the specified Boolean command-line flag\&.
|
||||
.TP
|
||||
-flag \fIname=value\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-flag [+|\-]name
|
||||
enables or disables the given boolean command line flag.
|
||||
Sets the specified command-line flag to the specified value\&.
|
||||
.TP
|
||||
-flags
|
||||
.br
|
||||
.TP 3
|
||||
\-flag name=value
|
||||
sets the given command line flag to the specified value.
|
||||
Prints command-line flags passed to the JVM\&.
|
||||
.TP
|
||||
-sysprops
|
||||
.br
|
||||
.TP 3
|
||||
\-flags
|
||||
prints command line flags passed to the JVM. pairs.
|
||||
Prints Java system properties as name-value pairs\&.
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
.TP 3
|
||||
\-sysprops
|
||||
prints Java System properties as name, value pairs.
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
.TP 3
|
||||
\-h
|
||||
prints a help message
|
||||
.TP 3
|
||||
\-help
|
||||
prints a help message
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Prints a help message\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
352
jdk/src/bsd/doc/man/jjs.1
Normal file
352
jdk/src/bsd/doc/man/jjs.1
Normal file
@ -0,0 +1,352 @@
|
||||
'\" t
|
||||
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: jjs.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jjs 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.SH NAME
|
||||
jjs \- Invokes the Nashorn engine\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
\f3\fBjjs\fR [\fIoptions\fR] [\fIscript\-files\fR] [\-\- \fIarguments\fR]\fP
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
One or more options of the \f3jjs\fR command, separated by spaces\&. For more information, see Options\&.
|
||||
.TP
|
||||
\fIscript-files\fR
|
||||
One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&.
|
||||
.TP
|
||||
\fIarguments\fR
|
||||
All values after the double hyphen marker (\f3--\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the \f3arguments\fR property (see )\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jjs\fR command-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&.
|
||||
.SH OPTIONS
|
||||
The options of the \f3jjs\fR command control the conditions under which scripts are interpreted by Nashorn\&.
|
||||
.TP
|
||||
-ccs=\fIsize\fR , --class-cache-size=\fIsize\fR
|
||||
.br
|
||||
Sets the class cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes (KB), \f3m\fR or \f3M\fR to indicate megabytes (MB), \f3g\fR or \f3G\fR to indicate gigabytes (GB)\&. By default, the class cache size is set to 50 bytes\&. The following example shows how to set it to 1024 bytes (1 KB):
|
||||
.sp
|
||||
.nf
|
||||
\f3\-css=100\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\-css=1k\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-co, --compile-only
|
||||
.br
|
||||
Compiles the script without running it\&.
|
||||
.TP
|
||||
-cp \fIpath\fR , --classpath \fIpath\fR
|
||||
.br
|
||||
Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&.
|
||||
.TP
|
||||
-D\fIname\fR=\fIvalue\fR
|
||||
.br
|
||||
Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign \f3myValue\fR to the property named \f3myKey\fR:
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs \-DmyKey=myValue\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIjava\&.lang\&.System\&.getProperty("myKey")\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3myValue\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
This option can be repeated to set multiple properties\&.
|
||||
.TP
|
||||
-d=\fIpath\fR , --dump-debug-dir=\fIpath\fR
|
||||
.br
|
||||
Specifies the path to the directory where class files are dumped\&.
|
||||
.TP
|
||||
--debug-lines
|
||||
.br
|
||||
Generates a line number table in the class file\&. By default, this option is enabled\&. To disable it, specify \f3--debug-lines=false\fR\&.
|
||||
.TP
|
||||
--debug-locals
|
||||
.br
|
||||
Generates a local variable table in the class file\&.
|
||||
.TP
|
||||
-doe, --dump-on-error
|
||||
.br
|
||||
Provides a full stack trace when an arror occurs\&. By default, only a brief error message is printed\&.
|
||||
.TP
|
||||
--early-lvalue-error
|
||||
.br
|
||||
Reports invalid lvalue expressions as early errors (that is, when the code is parsed)\&. By default, this option is enabled\&. To disable it, specify \f3--early-lvalue-error=false\fR\&. When disabled, invalid lvalue expressions will not be reported until the code is executed\&.
|
||||
.TP
|
||||
--empty-statements
|
||||
.br
|
||||
Preserves empty statements in the Java abstract syntax tree\&.
|
||||
.TP
|
||||
-fv, --fullversion
|
||||
.br
|
||||
Prints the full Nashorn version string\&.
|
||||
.TP
|
||||
--function-statement-error
|
||||
.br
|
||||
Prints an error message when a function declaration is used as a statement\&.
|
||||
.TP
|
||||
--function-statement-warning
|
||||
.br
|
||||
Prints a warning message when a function declaration is used as a statement\&.
|
||||
.TP
|
||||
-fx
|
||||
.br
|
||||
Launches the script as a JavaFX application\&.
|
||||
.TP
|
||||
-h, -help
|
||||
.br
|
||||
Prints the list of options and their descriptions\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes the specified \f3java\fR launcher option to the JVM\&. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB:
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs \-J\-Xmx4g\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIjava\&.lang\&.Runtime\&.getRuntime()\&.maxMemory()\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33817799680\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
This option can be repeated to pass multiple \f3java\fR command options\&.
|
||||
.TP
|
||||
--lazy-compilation
|
||||
.br
|
||||
Enables lazy code generation strategies (that is, the entire script is not compiled at once)\&. This option is experimental\&.
|
||||
.TP
|
||||
--loader-per-compile
|
||||
.br
|
||||
Creates a new class loader per compile\&. By default, this option is enabled\&. To disable it, specify \f3--loader-per-compile=false\fR\&.
|
||||
.TP
|
||||
--log=\fIsubsystem\fR:\fIlevel\fR
|
||||
.br
|
||||
Performs logging at a given level for the specified subsystems\&. You can specify logging levels for multiple subsystems separating them with commas\&. For example:
|
||||
.sp
|
||||
.nf
|
||||
\f3\-\-log=fields:finest,codegen:info\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
--package=\fIname\fR
|
||||
.br
|
||||
Specifies the package to which generated class files are added\&.
|
||||
.TP
|
||||
--parse-only
|
||||
.br
|
||||
Parses the code without compiling\&.
|
||||
.TP
|
||||
--print-ast
|
||||
.br
|
||||
Prints the abstract syntax tree\&.
|
||||
.TP
|
||||
--print-code
|
||||
.br
|
||||
Prints bytecode\&.
|
||||
.TP
|
||||
--print-lower-ast
|
||||
.br
|
||||
Prints the lowered abstract syntax tree\&.
|
||||
.TP
|
||||
--print-lower-parse
|
||||
.br
|
||||
Prints the lowered parse tree\&.
|
||||
.TP
|
||||
--print-no-newline
|
||||
.br
|
||||
Forces other \f3--print*\fR options to print the output on one line\&.
|
||||
.TP
|
||||
--print-parse
|
||||
.br
|
||||
Prints the parse tree\&.
|
||||
.TP
|
||||
--print-symbols
|
||||
.br
|
||||
Prints the symbol table\&.
|
||||
.TP
|
||||
-pcs, --profile-callsites
|
||||
.br
|
||||
Dumps callsite profile data\&.
|
||||
.TP
|
||||
-scripting
|
||||
.br
|
||||
Enables shell scripting features\&.
|
||||
.TP
|
||||
--stderr=\fIfilename\fR|\fIstream\fR|\fItty\fR
|
||||
.br
|
||||
Redirects the standard error stream to the specified file, stream (for example, to \f3stdout\fR), or text terminal\&.
|
||||
.TP
|
||||
--stdout=\fIfilename\fR|\fIstream\fR|\fItty\fR
|
||||
.br
|
||||
Redirects the standard output stream to the specified file, stream (for example, to \f3stderr\fR), or text terminal\&.
|
||||
.TP
|
||||
-strict
|
||||
.br
|
||||
Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&.
|
||||
.TP
|
||||
-t=\fIzone\fR , -timezone=\fIzone\fR
|
||||
.br
|
||||
Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the \f3Date\fR object\&.
|
||||
.TP
|
||||
-tcs=\fIparameter\fR , --trace-callsites=\fIparameter\fR
|
||||
.br
|
||||
Enables callsite trace mode\&. Possible parameters are the following:
|
||||
.RS
|
||||
.TP
|
||||
miss
|
||||
Trace callsite misses\&.
|
||||
.TP
|
||||
enterexit
|
||||
Trace callsite enter/exit\&.
|
||||
.TP
|
||||
objects
|
||||
Print object properties\&.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
--verify-code
|
||||
.br
|
||||
Verifies bytecode before running\&.
|
||||
.TP
|
||||
-v, -version
|
||||
.br
|
||||
Prints the Nashorn version string\&.
|
||||
.TP
|
||||
-xhelp
|
||||
.br
|
||||
Prints extended help for command-line options\&.
|
||||
.SH EXAMPLES
|
||||
\f3Example 1 Running a Script with Nashorn\fR
|
||||
.sp
|
||||
.nf
|
||||
\f3jjs script\&.js\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
\f3Example 2 Running Nashorn in Interactive Mode\fR
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIprintln("Hello, World!")\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Hello, World!\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIquit()\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3>>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
\f3Example 3 Passing Arguments to Nashorn\fR
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs \-\- a b c\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIarguments\&.join(", ")\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3a, b, c\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
\f3jrunscript\fR
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@ -1,160 +1,144 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jmap 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jmap.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jmap 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jmap \- Memory Map
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jmap\fP [ option ] pid
|
||||
.fl
|
||||
\f3jmap\fP [ option ] executable core
|
||||
.fl
|
||||
\f3jmap\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jmap \- Prints shared object memory maps or heap memory details for a process, core file, or remote debug server\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
option
|
||||
Options are mutually exclusive. Option, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
pid
|
||||
process id for which the memory map is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
|
||||
.br
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced.
|
||||
.br
|
||||
.TP 3
|
||||
core
|
||||
core file for which the memory map is to be printed.
|
||||
.br
|
||||
.TP 3
|
||||
remote\-hostname\-or\-IP
|
||||
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
||||
.br
|
||||
.TP 3
|
||||
server\-id
|
||||
optional unique id, if multiple debug servers are running on the same remote host.
|
||||
.br
|
||||
.RE
|
||||
\fBjmap\fR [ \fIoptions\fR ] \fIpid\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jmap\fP prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jmap \-J\-d64 \-heap pid
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
\fBjmap\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE: This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP
|
||||
.LP
|
||||
.LP
|
||||
\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.br
|
||||
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\fBjmap\fR [ \fIoptions\fR ] [ \fIpid\fR ] \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID for which the memory map is to be printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file for which the memory map is to be printed\&.
|
||||
.TP
|
||||
\fIremote-hostname-or-IP\fR
|
||||
The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID to use when multiple debug servers are running on the same remote host\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jmap\fR command prints shared object memory maps or heap memory details of a specified process, core file, or remote debug server\&. If the specified process is running on a 64-bit Java Virtual Machine (JVM), then you might need to specify the \f3-J-d64\fR option, for example: \f3jmap\fR\f3-J-d64 -heap pid\fR\&.
|
||||
.PP
|
||||
\fINote:\fR This utility is unsupported and might not be available in future releases of the JDK\&. On Windows Systems where the \f3dbgeng\&.dll\fR file is not present, Debugging Tools For Windows must be installed to make these tools work\&. The \f3PATH\fR environment variable should contain the location of the \f3jvm\&.dll\fR file that is used by the target process or the location from which the crash dump file was produced, for example: \f3set PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
<no option>
|
||||
When no option is used jmap prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility.
|
||||
When no option is used, the \f3jmap\fR command prints shared object mappings\&. For each shared object loaded in the target JVM, the start address, size of the mapping, and the full path of the shared object file are printed\&. This behavior is similar to the Oracle Solaris \f3pmap\fR utility\&.
|
||||
.TP
|
||||
-dump:[live,] format=b, file=\fIfilename\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-dump:[live,]format=b,file=<filename>
|
||||
Dumps the Java heap in hprof binary format to filename. The \f2live\fP suboption is optional. If specified, only the live objects in the heap are dumped. To browse the heap dump, you can use jhat(1) (Java Heap Analysis Tool) to read the generated file.
|
||||
Dumps the Java heap in \f3hprof\fR binary format to \f3filename\fR\&. The \f3live\fR suboption is optional, but when specified, only the active objects in the heap are dumped\&. To browse the heap dump, you can use the jhat(1) command to read the generated file\&.
|
||||
.TP
|
||||
-finalizerinfo
|
||||
.br
|
||||
.TP 3
|
||||
\-finalizerinfo
|
||||
Prints information on objects awaiting finalization.
|
||||
Prints information about objects that are awaiting finalization\&.
|
||||
.TP
|
||||
-heap
|
||||
.br
|
||||
.TP 3
|
||||
\-heap
|
||||
Prints a heap summary. GC algorithm used, heap configuration and generation wise heap usage are printed.
|
||||
Prints a heap summary of the garbage collection used, the head configuration, and generation-wise heap usage\&. In addition, the number and size of interned Strings are printed\&.
|
||||
.TP
|
||||
-histo[:live]
|
||||
.br
|
||||
.TP 3
|
||||
\-histo[:live]
|
||||
Prints a histogram of the heap. For each Java class, number of objects, memory size in bytes, and fully qualified class names are printed. VM internal class names are printed with '*' prefix. If the \f2live\fP suboption is specified, only live objects are counted.
|
||||
Prints a histogram of the heap\&. For each Java class, the number of objects, memory size in bytes, and the fully qualified class names are printed\&. The JVM internal class names are printed with an asterisk (*) prefix\&. If the \f3live\fR suboption is specified, then only active objects are counted\&.
|
||||
.TP
|
||||
-clstats
|
||||
.br
|
||||
.TP 3
|
||||
\-permstat
|
||||
Prints class loader wise statistics of permanent generation of Java heap. For each class loader, its name, liveness, address, parent class loader, and the number and size of classes it has loaded are printed. In addition, the number and size of interned Strings are printed.
|
||||
Prints class loader wise statistics of Java heap\&. For each class loader, its name, how active it is, address, parent class loader, and the number and size of classes it has loaded are printed\&.
|
||||
.TP
|
||||
-F
|
||||
.br
|
||||
.TP 3
|
||||
\-F
|
||||
Force. Use with jmap \-dump or jmap \-histo option if the pid does not respond. The \f2live\fP suboption is not supported in this mode.
|
||||
Force\&. Use this option with the \f3jmap -dump\fR or \f3jmap -histo\fR option when the pid does not respond\&. The \f3live\fR suboption is not supported in this mode\&.
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
.TP 3
|
||||
\-h
|
||||
Prints a help message.
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-help
|
||||
Prints a help message.
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Passes <flag> to the Java virtual machine on which jmap is run.
|
||||
.br
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
pmap(1)
|
||||
.TP 2
|
||||
o
|
||||
Passes \f3flag\fR to the Java Virtual Machine where the \f3jmap\fR command is running\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jhat(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,250 +1,205 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jps 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Monitoring Tools
|
||||
.\" Title: jps.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jps 1 "21 November 2013" "JDK 8" "Monitoring Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jps \- Java Virtual Machine Process Status Tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps\fP [ \f2options\fP ] [ \f2hostid\fP ]
|
||||
.SH NAME
|
||||
jps \- Lists the instrumented Java Virtual Machines (JVMs) on the target system\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjps\fR [ \fIoptions\fR ] [ \fIhostid\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIhostid\fR
|
||||
The identifier of the host for which the process report should be generated\&. The \f3hostid\fR can include optional components that indicate the communications protocol, port number, and other implementation specific data\&. See Host Identifier\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jps\fR command lists the instrumented Java HotSpot VMs on the target system\&. The command is limited to reporting information on JVMs for which it has the access permissions\&.
|
||||
.PP
|
||||
If the \f3jps\fR command is run without specifying a \f3hostid\fR, then it searches for instrumented JVMs on the local host\&. If started with a \f3hostid\fR, then it searches for JVMs on the indicated host, using the specified protocol and port\&. A \f3jstatd\fR process is assumed to be running on the target host\&.
|
||||
.PP
|
||||
The \f3jps\fR command reports the local JVM identifier, or \f3lvmid\fR, for each instrumented JVM found on the target system\&. The \f3lvmid\fR is typically, but not necessarily, the operating system\&'s process identifier for the JVM process\&. With no options, \f3jps\fR lists each Java application\&'s \f3lvmid\fR followed by the short form of the application\&'s class name or jar file name\&. The short form of the class name or JAR file name omits the class\&'s package information or the JAR files path information\&.
|
||||
.PP
|
||||
The \f3jps\fR command uses the Java launcher to find the class name and arguments passed to the main method\&. If the target JVM is started with a custom launcher, then the class or JAR file name and the arguments to the \f3main\fR method are not available\&. In this case, the \f3jps\fR command outputs the string \f3Unknown\fR for the class name or JAR file name and for the arguments to the \f3main\fR method\&.
|
||||
.PP
|
||||
The list of JVMs produced by the \f3jps\fR command can be limited by the permissions granted to the principal running the command\&. The command only lists the JVMs for which the principle has access rights as determined by operating system-specific access control mechanisms\&.
|
||||
.SH OPTIONS
|
||||
The \f3jps\fR command supports a number of options that modify the output of the command\&. These options are subject to change or removal in the future\&.
|
||||
.TP
|
||||
-q
|
||||
.br
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
hostid
|
||||
The host identifier of the host for which the process report should be generated. The \f2hostid\fP may include optional components that indicate the communications protocol, port number, and other implementation specific data.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions.
|
||||
.LP
|
||||
.LP
|
||||
If \f3jps\fP is run without specifying a \f2hostid\fP, it will look for instrumented JVMs on the local host. If started with a \f2hostid\fP, it will look for JVMs on the indicated host, using the specified protocol and port. A \f3jstatd\fP process is assumed to be running on the target host.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP command will report the local VM identifier, or \f2lvmid\fP, for each instrumented JVM found on the target system. The \f3lvmid\fP is typically, but not necessarily, the operating system's process identifier for the JVM process. With no options, \f3jps\fP will list each Java application's \f2lvmid\fP followed by the short form of the application's class name or jar file name. The short form of the class name or JAR file name omits the class's package information or the JAR files path information.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP command uses the \f3java\fP launcher to find the class name and arguments passed to the \f2main\fP method. If the target JVM is started with a custom launcher, the class name (or JAR file name) and the arguments to the \f2main\fP method will not be available. In this case, the \f3jps\fP command will output the string \f2Unknown\fP for the class name or JAR file name and for the arguments to the main method.
|
||||
.LP
|
||||
.LP
|
||||
The list of JVMs produced by the \f3jps\fP command may be limited by the permissions granted to the principal running the command. The command will only list the JVMs for which the principle has access rights as determined by operating system specific access control mechanisms.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This utility is unsupported and may not be available in future versions of the JDK. It is not currently available on Windows 98 and Windows ME platforms.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP command supports a number of options that modify the output of the command. These options are subject to change or removal in the future.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-q
|
||||
Suppress the output of the class name, JAR file name, and arguments passed to the \f2main\fP method, producing only a list of local VM identifiers.
|
||||
.TP 3
|
||||
\-m
|
||||
Output the arguments passed to the main method. The output may be null for embedded JVMs.
|
||||
.TP 3
|
||||
\-l
|
||||
Output the full package name for the application's main class or the full path name to the application's JAR file.
|
||||
.TP 3
|
||||
\-v
|
||||
Output the arguments passed to the JVM.
|
||||
.TP 3
|
||||
\-V
|
||||
Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the \-XX:Flags=<\f2filename\fP> argument).
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the \f3java\fP launcher called by \f3jps\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
HOST IDENTIFIER
|
||||
.LP
|
||||
.LP
|
||||
The host identifier, or \f2hostid\fP is a string that indicates the target system. The syntax of the \f2hostid\fP string largely corresponds to the syntax of a URI:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
[\fP\f4protocol\fP\f3:][[//]\fP\f4hostname\fP\f3][:\fP\f4port\fP\f3][/\fP\f4servername\fP\f3]\fP
|
||||
Suppresses the output of the class name, JAR file name, and arguments passed to the \f3main\fR method, producing only a list of local JVM identifiers\&.
|
||||
.TP
|
||||
-m
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
protocol
|
||||
The communications protocol. If the \f2protocol\fP is omitted and a \f2hostname\fP is not specified, the default protocol is a platform specific, optimized, local protocol. If the \f2protocol\fP is omitted and a \f2hostname\fP is specified, then the default protocol is \f3rmi\fP.
|
||||
.TP 3
|
||||
Displays the arguments passed to the \f3main\fR method\&. The output may be \f3null\fR for embedded JVMs\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
Displays the full package name for the application\&'s \f3main\fR class or the full path name to the application\&'s JAR file\&.
|
||||
.TP
|
||||
-v
|
||||
.br
|
||||
Displays the arguments passed to the JVM\&.
|
||||
.TP
|
||||
-V
|
||||
.br
|
||||
Suppresses the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local JVM identifiers\&.
|
||||
.TP
|
||||
-J\f3option\fR
|
||||
.br
|
||||
Passes \f3option\fR to the JVM, where option is one of the \f3options\fR described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH HOST\ IDENTIFIER
|
||||
The host identifier, or \f3hostid\fR is a string that indicates the target system\&. The syntax of the \f3hostid\fR string corresponds to the syntax of a URI:
|
||||
.sp
|
||||
.nf
|
||||
\f3[protocol:][[//]hostname][:port][/servername]\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIprotocol\fR
|
||||
The communications protocol\&. If the \f3protocol\fR is omitted and a \f3hostname\fR is not specified, then the default protocol is a platform-specific, optimized, local protocol\&. If the protocol is omitted and a host name is specified, then the default protocol is \f3rmi\fR\&.
|
||||
.TP
|
||||
hostname
|
||||
A hostname or IP address indicating the target host. If \f2hostname\fP is omitted, then the target host is the local host.
|
||||
.TP 3
|
||||
A hostname or IP address that indicates the target host\&. If you omit the \f3hostname\fR parameter, then the target host is the local host\&.
|
||||
.TP
|
||||
port
|
||||
The default port for communicating with the remote server. If the \f2hostname\fP is omitted or the \f2protocol\fP specifies an optimized, local protocol, then \f2port\fP is ignored. Otherwise, treatment of the \f2port\fP parameter is implementation specific. For the default \f3rmi\fP protocol the \f2port\fP indicates the port number for the rmiregistry on the remote host. If \f2port\fP is omitted, and \f2protocol\fP indicates \f3rmi\fP, then the default rmiregistry port (1099) is used.
|
||||
.TP 3
|
||||
The default port for communicating with the remote server\&. If the \f3hostname\fR parameter is omitted or the \f3protocol\fR parameter specifies an optimized, local protocol, then the \f3port\fR parameter is ignored\&. Otherwise, treatment of the \f3port\fR parameter is implementation specific\&. For the default \f3rmi\fR protocol, the \f3port\fR parameter indicates the port number for the rmiregistry on the remote host\&. If the \f3port\fR parameter is omitted, and the \f3protocol\fR parameter indicates \f3rmi\fR, then the default rmiregistry port (1099) is used\&.
|
||||
.TP
|
||||
servername
|
||||
The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the \f3rmi\fP protocol, this parameter is a string representing the name of the RMI remote object on the remote host. See the \f3\-n\fP option for the jstatd(1) command.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "OUTPUT FORMAT"
|
||||
.LP
|
||||
.LP
|
||||
The output of the \f3jps\fP command follows the following pattern:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f4lvmid\fP\f3 [ [ \fP\f4classname\fP\f3 | \fP\f4JARfilename\fP\f3 | "Unknown"] [ \fP\f4arg\fP\f3* ] [ \fP\f4jvmarg\fP\f3* ] ]\fP
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Where all output tokens are separated by white space. An \f2arg\fP that includes embedded white space will introduce ambiguity when attempting to map arguments to their actual positional parameters.
|
||||
.br
|
||||
.br
|
||||
\f3NOTE\fP: You are advised not to write scripts to parse \f3jps\fP output since the format may change in future releases. If you choose to write scripts that parse \f3jps\fP output, expect to modify them for future releases of this tool.
|
||||
.br
|
||||
|
||||
.LP
|
||||
.SH "EXAMPLES"
|
||||
.LP
|
||||
.LP
|
||||
This section provides examples of the \f3jps\fP command.
|
||||
.LP
|
||||
.LP
|
||||
Listing the instrumented JVMs on the local host:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps\fP
|
||||
.br
|
||||
|
||||
.fl
|
||||
18027 Java2Demo.JAR
|
||||
.br
|
||||
|
||||
.fl
|
||||
18032 jps
|
||||
.br
|
||||
|
||||
.fl
|
||||
18005 jstat
|
||||
.br
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Listing the instrumented JVMs on a remote host:
|
||||
.LP
|
||||
.LP
|
||||
This example assumes that the \f3jstat\fP server and either the its internal RMI registry or a separate external \f3rmiregistry\fP process are running on the remote host on the default port (port 1099). It also assumes that the local host has appropriate permissions to access the remote host. This example also includes the \f2\-l\fP option to output the long form of the class names or JAR file names.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps \-l remote.domain\fP
|
||||
.br
|
||||
|
||||
.fl
|
||||
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
|
||||
.br
|
||||
|
||||
.fl
|
||||
2857 sun.tools.jstatd.jstatd
|
||||
.br
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Listing the instrumented JVMs on a remote host with a non\-default port for the RMI registry
|
||||
.LP
|
||||
.LP
|
||||
This example assumes that the \f3jstatd\fP server, with an internal RMI registry bound to port 2002, is running on the remote host. This example also uses the \f2\-m\fP option to include the arguments passed to the \f2main\fP method of each of the listed Java applications.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps \-m remote.domain:2002\fP
|
||||
.br
|
||||
|
||||
.fl
|
||||
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
|
||||
.br
|
||||
|
||||
.fl
|
||||
3102 sun.tools.jstatd.jstatd \-p 2002
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
java(1) \- the Java Application Launcher
|
||||
.TP 2
|
||||
o
|
||||
jstat(1) \- the Java virtual machine Statistics Monitoring Tool
|
||||
.TP 2
|
||||
o
|
||||
jstatd(1) \- the jstat daemon
|
||||
.TP 2
|
||||
o
|
||||
rmiregistry(1) \- the Java Remote Object Registry
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
The treatment of this parameter depends on the implementation\&. For the optimized, local protocol, this field is ignored\&. For the \f3rmi\fR protocol, this parameter is a string that represents the name of the RMI remote object on the remote host\&. See the \f3jstatd\fR command \f3-n\fRoption for more information\&.
|
||||
.SH OUTPUT\ FORMAT
|
||||
The output of the \f3jps\fR command follows the following pattern:
|
||||
.sp
|
||||
.nf
|
||||
\f3lvmid [ [ classname | JARfilename | "Unknown"] [ arg* ] [ jvmarg* ] ]\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
All output tokens are separated by white space\&. An \f3arg\fR value that includes embedded white space introduces ambiguity when attempting to map arguments to their actual positional parameters\&.
|
||||
.PP
|
||||
\fINote:\fR It is recommended that you do not write scripts to parse \f3jps\fR output because the format might change in future releases\&. If you write scripts that parse \f3jps\fR output, then expect to modify them for future releases of this tool\&.
|
||||
.SH EXAMPLES
|
||||
This section provides examples of the \f3jps\fR command\&.
|
||||
.PP
|
||||
List the instrumented JVMs on the local host:
|
||||
.sp
|
||||
.nf
|
||||
\f3jps\fP
|
||||
.fi
|
||||
.nf
|
||||
\f318027 Java2Demo\&.JAR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f318032 jps\fP
|
||||
.fi
|
||||
.nf
|
||||
\f318005 jstat\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following example lists the instrumented JVMs on a remote host\&. This example assumes that the \f3jstat\fR server and either the its internal RMI registry or a separate external rmiregistry process are running on the remote host on the default port (port 1099)\&. It also assumes that the local host has appropriate permissions to access the remote host\&. This example also includes the \f3-l\fR option to output the long form of the class names or JAR file names\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jps \-l remote\&.domain\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33002 /opt/jdk1\&.7\&.0/demo/jfc/Java2D/Java2Demo\&.JAR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f32857 sun\&.tools\&.jstatd\&.jstatd\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following example lists the instrumented JVMs on a remote host with a non-default port for the RMI registry\&. This example assumes that the \f3jstatd\fR server, with an internal RMI registry bound to port 2002, is running on the remote host\&. This example also uses the \f3-m\fR option to include the arguments passed to the \f3main\fR method of each of the listed Java applications\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jps \-m remote\&.domain:2002\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33002 /opt/jdk1\&.7\&.0/demo/jfc/Java2D/Java2Demo\&.JAR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33102 sun\&.tools\&.jstatd\&.jstatd \-p 2002\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstat(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstatd(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
rmiregistry(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,187 +1,196 @@
|
||||
." Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jrunscript 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Scripting Tools
|
||||
.\" Title: jrunscript.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jrunscript 1 "21 November 2013" "JDK 8" "Scripting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jrunscript \- command line script shell
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jrunscript\fP [ \f2options\fP ] [ arguments... ]
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Options, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
arguments
|
||||
Arguments, if used, should follow immediately after options or command name.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jrunscript\fP is a command line script shell. jrunscript supports both an interactive (read\-eval\-print) mode and a batch (\-f option) mode of script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the \-l option can be used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming" style.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specify where to find the user's .class files that are accessed by the script.
|
||||
.TP 3
|
||||
\-cp path
|
||||
This is a synonym for \-classpath \f2path\fP
|
||||
.TP 3
|
||||
\-Dname=value
|
||||
Set a Java system property.
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Pass <flag> directly to the Java virtual machine on which jrunscript is run.
|
||||
.TP 3
|
||||
\-l language
|
||||
Use the specified scripting language. By default, JavaScript is used. Note that to use other scripting languages, you also need to specify the corresponding script engine's jar file using \-cp or \-classpath option.
|
||||
.TP 3
|
||||
\-e script
|
||||
Evaluate the given script. This option can be used to run "one liner" scripts specified completely on the command line.
|
||||
.TP 3
|
||||
\-encoding encoding
|
||||
Specify the character encoding used while reading script files.
|
||||
.TP 3
|
||||
\-f script\-file
|
||||
Evaluate the given script file (batch mode).
|
||||
.TP 3
|
||||
\-f \-
|
||||
Read and evaluate a script from standard input (interactive mode).
|
||||
.TP 3
|
||||
\-help\
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-?\
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-q\
|
||||
List all script engines available and exit.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ARGUMENTS"
|
||||
.LP
|
||||
.LP
|
||||
If [arguments...] are present and if no \f3\-e\fP or \f3\-f\fP option is used, then the first argument is the script file and the rest of the arguments, if any, are passed as script arguments. If [arguments..] and \f3\-e\fP or \f3\-f\fP option are used, then all [arguments..] are passed as script arguments. If [arguments..], \f3\-e\fP and \f3\-f\fP are missing, interactive mode is used. Script arguments are available to a script in an engine variable named "arguments" of type String array.
|
||||
.LP
|
||||
.SH "EXAMPLES"
|
||||
.LP
|
||||
.SS
|
||||
Executing inline scripts
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript \-e "print('hello world')"
|
||||
.fl
|
||||
jrunscript \-e "cat('http://java.sun.com')"
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Use specified language and evaluate given script file
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript \-l js \-f test.js
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Interactive mode
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript
|
||||
.fl
|
||||
js> print('Hello World\\n');
|
||||
.fl
|
||||
Hello World
|
||||
.fl
|
||||
js> 34 + 55
|
||||
.fl
|
||||
89.0
|
||||
.fl
|
||||
js> t = new java.lang.Thread(function() { print('Hello World\\n'); })
|
||||
.fl
|
||||
Thread[Thread\-0,5,main]
|
||||
.fl
|
||||
js> t.start()
|
||||
.fl
|
||||
js> Hello World
|
||||
.fl
|
||||
|
||||
.fl
|
||||
js>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Run script file with script arguments
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript test.js arg1 arg2 arg3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "arguments" array.
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in
|
||||
.na
|
||||
\f2jsdocs\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/share/jsdocs/allclasses\-noframe.html.
|
||||
.LP
|
||||
.SH NAME
|
||||
jrunscript \- Runs a command-line script shell that supports interactive and batch modes\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjrunscript\fR [\fIoptions\fR] [\fIarguments\fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIarguments\fR
|
||||
Arguments, when used, follow immediately after options or the command name\&. See Arguments\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jrunscript\fR command is a language-independent command-line script shell\&. The \f3jrunscript\fR command supports both an interactive (read-eval-print) mode and a batch (\f3-f\fR option) mode of script execution\&. By default, JavaScript is the language used, but the \f3-l\fR option can be used to specify a different language\&. By using Java to scripting language communication, the \f3jrunscript\fR command supports an exploratory programming style\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
Indicate where any class files are that the script needs to access\&.
|
||||
.TP
|
||||
-cp \fIpath\fR
|
||||
.br
|
||||
Same as \f3-classpath\fR\f3path\fR\&.
|
||||
.TP
|
||||
-D\fIname\fR=\fIvalue\fR
|
||||
.br
|
||||
Sets a Java system property\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
Passes \f3flag\fR directly to the Java Virtual Machine where the \f3jrunscript\fR command is running\&.
|
||||
.TP
|
||||
-I \fIlanguage\fR
|
||||
.br
|
||||
Uses the specified scripting language\&. By default, JavaScript is used\&. To use other scripting languages, you must specify the corresponding script engine\&'s JAR file with the \f3-cp\fR or \f3-classpath\fR option\&.
|
||||
.TP
|
||||
-e \fIscript\fR
|
||||
.br
|
||||
Evaluates the specified script\&. This option can be used to run one-line scripts that are specified completely on the command line\&.
|
||||
.TP
|
||||
-encoding \fIencoding\fR
|
||||
.br
|
||||
Specifies the character encoding used to read script files\&.
|
||||
.TP
|
||||
-f \fIscript-file\fR
|
||||
.br
|
||||
Evaluates the specified script file (batch mode)\&.
|
||||
.TP
|
||||
-f -
|
||||
.br
|
||||
Reads and evaluates a script from standard input (interactive mode)\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message and exits\&.
|
||||
.TP
|
||||
-?
|
||||
.br
|
||||
Displays a help message and exits\&.
|
||||
.TP
|
||||
-q
|
||||
.br
|
||||
Lists all script engines available and exits\&.
|
||||
.SH ARGUMENTS
|
||||
If arguments are present and if no \f3-e\fR or \f3-f\fR option is used, then the first argument is the script file and the rest of the arguments, if any, are passed to the script\&. If arguments and \f3-e\fR or the \f3-f\fR option are used, then all arguments are passed to the script\&. If arguments, \f3-e\fR and \f3-f\fR are missing, then interactive mode is used\&. Script arguments are available to a script in an engine variable named \f3arguments\fR of type \f3String\fR array\&.
|
||||
.SH EXAMPLES
|
||||
.SS EXECUTE\ INLINE\ SCRIPTS
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript \-e "print(\&'hello world\&')"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jrunscript \-e "cat(\&'http://www\&.example\&.com\&')"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS USE\ SPECIFIED\ LANGUAGE\ AND\ EVALUATE\ THE\ SCRIPT\ FILE
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript \-l js \-f test\&.js\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS INTERACTIVE\ MODE
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> print(\&'Hello World\en\&');\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Hello World\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> 34 + 55\fP
|
||||
.fi
|
||||
.nf
|
||||
\f389\&.0\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> t = new java\&.lang\&.Thread(function() { print(\&'Hello World\en\&'); })\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Thread[Thread\-0,5,main]\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> t\&.start()\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> Hello World\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS RUN\ SCRIPT\ FILE\ WITH\ SCRIPT\ ARGUMENTS
|
||||
The test\&.js file is the script file\&. The \f3arg1\fR, \f3arg2\fR and \f3arg3\fR arguments are passed to the script\&. The script can access these arguments with an arguments array\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript test\&.js arg1 arg2 arg3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
If JavaScript is used, then before it evaluates a user defined script, the \f3jrunscript\fR command initializes certain built-in functions and objects\&. These JavaScript built-ins are documented in JsDoc-Toolkit at http://code\&.google\&.com/p/jsdoc-toolkit/
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,109 +1,109 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jsadebugd 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jsadebugd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jsadebugd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jsadebugd \- Serviceability Agent Debug Daemon
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jsadebugd\fP pid [ server\-id ]
|
||||
.fl
|
||||
\f3jsadebugd\fP executable core [ server\-id ]
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jsadebugd \- Attaches to a Java process or core file and acts as a debug server\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
pid
|
||||
process id of the process to which the debug server should attach. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. At most one instance of the debug server may be attached to a single process.
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced
|
||||
.TP 3
|
||||
core
|
||||
Core file to which the debug server should attach.
|
||||
.TP 3
|
||||
server\-id
|
||||
Optional unique id, needed if multiple debug servers are started on the same machine. This ID must be used by remote clients to identify the particular debug server to attach. Within a single machine, this ID must be unique.
|
||||
.RE
|
||||
\fBjsadebugd\fR \fIpid\fR [ \fIserver\-id\fR ]
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jsadebugd\fP attaches to a Java process or core file and acts as a debug server. Remote clients such as jstack(1), jmap(1), and jinfo(1) can attach to the server using Java Remote Method Invocation (RMI). Before starting \f2jsadebugd\fP,
|
||||
.na
|
||||
\f2rmiregistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi must be started with:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f4rmiregistry \-J\-Xbootclasspath/p:$JAVA_HOME/lib/sajdi.jar\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
where \f2$JAVA_HOME\fP is the JDK installation directory. If rmiregistry was not started, jsadebugd will start an rmiregistry in a standard (1099) port internally. Debug server may be stopped by sending SIGINT (pressing Ctrl\-C) to it.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced.
|
||||
.LP
|
||||
.LP
|
||||
For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\fBjsadebugd\fR \fIexecutable\fR \fIcore\fR [ \fIserver\-id\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID of the process to which the debug server attaches\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&. At most one instance of the debug server can be attached to a single process\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file to which the debug server should attach\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID that is needed when multiple debug servers are started on the same machine\&. This ID must be used by remote clients to identify the particular debug server to which to attach\&. Within a single machine, this ID must be unique\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jsadebugd\fR command attaches to a Java process or core file and acts as a debug server\&. Remote clients such as \f3jstack\fR, \f3jmap\fR, and \f3jinfo\fR can attach to the server through Java Remote Method Invocation (RMI)\&. Before you start the \f3jsadebugd\fR command, start the RMI registry with the \f3rmiregistry\fR command as follows where \fI$JAVA_HOME\fR is the JDK installation directory:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry \-J\-Xbootclasspath/p:$JAVA_HOME/lib/sajdi\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
If the RMI registry was not started, then the \f3jsadebugd\fR command starts an RMI registry in a standard (1099) port internally\&. The debug server can be stopped by sending a \f3SIGINT\fR to it\&. To send a SIGINT press \fICtrl+C\fR\&.
|
||||
.PP
|
||||
\fINote:\fR This utility is unsupported and may or may not be available in future releases of the JDK\&. In Windows Systems where \f3dbgeng\&.dll\fR is not present, Debugging Tools For Windows must be installed to have these tools working\&. The \f3PATH\fR environment variable should contain the location of jvm\&.dll used by the target process or the location from which the crash dump file was produced\&. For example, \f3s\fR\f3et PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jinfo(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jmap(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstack(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2rmiregistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
rmiregistry(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,148 +1,138 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jstack 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jstack.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jstack 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jstack \- Stack Trace
|
||||
.br
|
||||
.SH NAME
|
||||
jstack \- Prints Java thread stack traces for a Java process, core file, or remote debug server\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jstack\fP [ option ] pid
|
||||
.fl
|
||||
\f3jstack\fP [ option ] executable core
|
||||
.fl
|
||||
\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
|
||||
.fl
|
||||
.fi
|
||||
\fBjstack\fR [ \fIoptions\fR ] \fIpid\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.LP
|
||||
Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
pid
|
||||
process id for which the stack trace is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
|
||||
.RE
|
||||
\fBjstack\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced.
|
||||
\fBjstack\fR [ \fIoptions\fR ] [ \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID for which the stack trace is printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file for which the stack trace is to be printed\&.
|
||||
.TP
|
||||
\fIremote-hostname-or-IP\fR
|
||||
The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID to use when multiple debug servers are running on the same remote host\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jstack\fR command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server\&. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed\&. With the \f3-m\fR option, the \f3jstack\fR command prints both Java and native frames of all threads with the program counter (PC)\&. For each native frame, the closest native symbol to PC, when available, is printed\&. C++ mangled names are not demangled\&. To demangle C++ names, the output of this command can be piped to \f3c++filt\fR\&. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the \f3-J-d64\fR option, for example: \f3jstack -J-d64 -m pid\fR\&.
|
||||
.PP
|
||||
\fINote:\fR This utility is unsupported and might not be available in future release of the JDK\&. In Windows Systems where the dbgeng\&.dll file is not present, Debugging Tools For Windows must be installed so these tools work\&. The \f3PATH\fR environment variable needs to contain the location of the jvm\&.dll that is used by the target process, or the location from which the crash dump file was produced\&. For example:
|
||||
.sp
|
||||
.nf
|
||||
\f3set PATH=<jdk>\ejre\ebin\eclient;%PATH%\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-F
|
||||
.br
|
||||
.TP 3
|
||||
core
|
||||
core file for which the stack trace is to be printed.
|
||||
Force a stack dump when \f3jstack\fR [\f3-l\fR] \f3pid\fR does not respond\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
.TP 3
|
||||
remote\-hostname\-or\-IP
|
||||
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
||||
Long listing\&. Prints additional information about locks such as a list of owned \f3java\&.util\&.concurrent\fR ownable synchronizers\&. See the \f3AbstractOwnableSynchronizer\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer\&.html
|
||||
.TP
|
||||
-m
|
||||
.br
|
||||
.TP 3
|
||||
server\-id
|
||||
optional unique id, if multiple debug servers are running on the same remote host.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jstack\fP prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, 'bci' (byte code index) and line number, if available, are printed. With the \-m option, jstack prints both Java and native frames of all threads along with the 'pc' (program counter). For each native frame, the closest native symbol to 'pc', if available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command may be piped to \f3c++filt\fP. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
|
||||
Prints a mixed mode stack trace that has both Java and native C/C++ frames\&.
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstack \-J\-d64 \-m pid
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced.
|
||||
.LP
|
||||
.LP
|
||||
For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-F
|
||||
Force a stack dump when 'jstack [\-l] pid' does not respond.
|
||||
.TP 3
|
||||
\-l
|
||||
Long listing. Prints additional information about locks such as list of owned java.util.concurrent
|
||||
.na
|
||||
\f2ownable synchronizers\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html.
|
||||
.TP 3
|
||||
\-m
|
||||
prints mixed mode (both Java and native C/C++ frames) stack trace.
|
||||
.TP 3
|
||||
\-h
|
||||
prints a help message.
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-help
|
||||
prints a help message
|
||||
.br
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Prints a help message\&.
|
||||
.SH KNOWN\ BUGS
|
||||
In mixed mode stack trace, the \f3-m\fR option does not work with the remote debug server\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
pstack(1)
|
||||
.TP 2
|
||||
o
|
||||
c++filt(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
C++filt(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "KNOWN BUGS"
|
||||
.LP
|
||||
.LP
|
||||
Mixed mode stack trace, the \-m option, does not work with the remote debug server.
|
||||
.LP
|
||||
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,257 +1,210 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jstatd 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Monitoring Tools
|
||||
.\" Title: jstatd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jstatd 1 "21 November 2013" "JDK 8" "Monitoring Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jstatd \- Virtual Machine jstat Daemon
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd [ \fP\f4options\fP\f3 ]\fP
|
||||
.SH NAME
|
||||
jstatd \- Monitors Java Virtual Machines (JVMs) and enables remote monitoring tools to attach to JVMs\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjstatd\fR [ \fIoptions\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jstatd\fR command is an RMI server application that monitors for the creation and termination of instrumented Java HotSpot VMs and provides an interface to enable remote monitoring tools to attach to JVMs that are running on the local host\&.
|
||||
.PP
|
||||
The \f3jstatd\fR server requires an RMI registry on the local host\&. The \f3jstatd\fR server attempts to attach to the RMI registry on the default port, or on the port you specify with the \f3-p\fR\f3port\fR option\&. If an RMI registry is not found, then one is created within the \f3jstatd\fR application that is bound to the port that is indicated by the \f3-p\fR\f3port\fR option or to the default RMI registry port when the \f3-p\fR\f3port\fR option is omitted\&. You can stop the creation of an internal RMI registry by specifying the \f3-nr\fR option\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-nr
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options. The options may be in any order. If there are redundant or contradictory options, the last option specified will take precedence.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP tool is an RMI server application that monitors for the creation and termination of instrumented HotSpot Java virtual machines (JVMs) and provides a interface to allow remote monitoring tools to attach to JVMs running on the local host.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server requires the presence of an RMI registry on the local host. The \f3jstatd\fP server will attempt to attach to the RMI registry on the default port, or on the port indicated by the \f2\-p port\fP option. If an RMI registry is not found, one will be created within the \f3jstatd\fP application bound to the port indicated by the \f2\-p port\fP option or to the default RMI registry port if \f2\-p port\fP is omitted. Creation of an internal RMI registry can be inhibited by specifying the \f2\-nr\fP option.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This utility is unsupported and may or may not be available in future versions of the JDK. It is not currently available on the Windows 98 and Windows ME platforms.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP command supports the following options:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-nr
|
||||
Do not attempt to create an internal RMI registry within the \f2jstatd\fP process when an existing RMI registry is not found.
|
||||
.TP 3
|
||||
\-p\ port
|
||||
Port number where the RMI registry is expected to be found, or, if not found, created if \f2\-nr\fP is not specified.
|
||||
.TP 3
|
||||
\-n\ rminame
|
||||
Name to which the remote RMI object is bound in the RMI registry. The default name is \f2JStatRemoteHost\fP. If multiple \f3jstatd\fP servers are started on the same host, the name of the exported RMI object for each server can be made unique by specifying this option. However, doing so will require that the unique server name be included in the monitoring client's \f2hostid\fP and \f2vmid\fP strings.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SECURITY"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server can only monitor JVMs for which it has the appropriate native access permissions. Therefor the \f3jstatd\fP process must be running with the same user credentials as the target JVMs. Some user credentials, such as the \f2root\fP user in UNIX(TM) based systems, have permission to access the instrumentation exported by any JVM on the system. A \f3jstatd\fP process running with such credentials can monitor any JVM on the system, but introduces additional security concerns.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server does not provide any authentication of remote clients. Therefore, running a \f3jstatd\fP server process exposes the instrumentation export by all JVMs for which the \f3jstatd\fP process has access permissions to any user on the network. This exposure may be undesireable in your environment and local security policies should be considered before starting the \f3jstatd\fP process, particularly in production environments or on unsecure networks.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server installs an instance of RMISecurityPolicy if no other security manager has been installed and therefore requires a security policy file to be specified. The policy file must conform to the default policy implementation's
|
||||
.na
|
||||
\f2Policy File Syntax\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html.
|
||||
.LP
|
||||
.LP
|
||||
The following policy file will allow the \f3jstatd\fP server to run without any security exceptions. This policy is less liberal then granting all permissions to all codebases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fP server.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant codebase "file:${java.home}/../lib/tools.jar" {\fP
|
||||
Does not attempt to create an internal RMI registry within the \f3jstatd\fR process when an existing RMI registry is not found\&.
|
||||
.TP
|
||||
-p \fIport\fR
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
permission java.security.AllPermission;\fP
|
||||
The port number where the RMI registry is expected to be found, or when not found, created if the \f3-nr\fR option is not specified\&.
|
||||
.TP
|
||||
-n \fIrminame\fR
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
};\fP
|
||||
Name to which the remote RMI object is bound in the RMI registry\&. The default name is \f3JStatRemoteHost\fR\&. If multiple \f3jstatd\fR servers are started on the same host, then the name of the exported RMI object for each server can be made unique by specifying this option\&. However, doing so requires that the unique server name be included in the monitoring client\&'s \f3hostid\fR and \f3vmid\fR strings\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To use this policy, copy the text into a file called \f2jstatd.all.policy\fP and run the \f3jstatd\fP server as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=jstatd.all.policy\fP
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP addreess spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fP server and use the \f3jstat\fP and \f3jps\fP tools locally.
|
||||
.LP
|
||||
.SH "REMOTE INTERFACE"
|
||||
.LP
|
||||
.LP
|
||||
The interface exported by the \f3jstatd\fP process is proprietary and is guaranteed to change. Users and developers are discouraged from writing to this interface.
|
||||
.LP
|
||||
.SH "EXAMPLES"
|
||||
.LP
|
||||
.LP
|
||||
Here are some examples of starting \f3jstatd\fP. Note that the \f3jstatd\fP scripts automatically start the server in the background.
|
||||
.LP
|
||||
.SS
|
||||
Using Internal RMI Registry
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with an internal RMI registry. This example assumes that no other server is bound to the default RMI Registry port (port 1099).
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Using External RMI Registry
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with a external RMI registry.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry&
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with an external RMI registry server on port 2020.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry 2020&
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-p 2020
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with an external RMI registry on port 2020, bound to name AlternateJstatdServerName.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry 2020&
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-p 2020 \-n AlternateJstatdServerName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Inhibiting creation of an in\-process RMI registry
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP such that it will not create a RMI registry if one is not found. This example assumes an RMI registry is already running. If it is not, an appropriate error message is emitted.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-nr
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Enabling RMI logging capabilities.
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-J\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
java(1) \- the Java Application Launcher
|
||||
.TP 2
|
||||
o
|
||||
jps(1) \- the Java Process Status Application
|
||||
.TP 2
|
||||
o
|
||||
jstat(1) \- the Java Virtual Machine Statistics Monitoring Tool
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2rmiregistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Passes \f3option\fR to the JVM, where option is one of the \f3options\fR described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH SECURITY
|
||||
The \f3jstatd\fR server can only monitor JVMs for which it has the appropriate native access permissions\&. Therefore, the \f3jstatd\fR process must be running with the same user credentials as the target JVMs\&. Some user credentials, such as the root user in UNIX-based systems, have permission to access the instrumentation exported by any JVM on the system\&. A \f3jstatd\fR process running with such credentials can monitor any JVM on the system, but introduces additional security concerns\&.
|
||||
.PP
|
||||
The \f3jstatd\fR server does not provide any authentication of remote clients\&. Therefore, running a \f3jstatd\fR server process exposes the instrumentation export by all JVMs for which the \f3jstatd\fR process has access permissions to any user on the network\&. This exposure might be undesirable in your environment, and therefore, local security policies should be considered before you start the \f3jstatd\fR process, particularly in production environments or on networks that are not secure\&.
|
||||
.PP
|
||||
The \f3jstatd\fR server installs an instance of \f3RMISecurityPolicy\fR when no other security manager is installed, and therefore, requires a security policy file to be specified\&. The policy file must conform to Default Policy Implementation and Policy File Syntax at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyFiles\&.html
|
||||
.PP
|
||||
The following policy file allows the \f3jstatd\fR server to run without any security exceptions\&. This policy is less liberal than granting all permissions to all code bases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fR server\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3grant codebase "file:${java\&.home}/\&.\&./lib/tools\&.jar" { \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission java\&.security\&.AllPermission;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
To use this policy setting, copy the text into a file called \f3jstatd\&.all\&.policy\fR and run the \f3jstatd\fR server as follows:
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=jstatd\&.all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP address spoofing attacks\&. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fR server and use the \f3jstat\fR and \f3jps\fR tools locally\&.
|
||||
.SH REMOTE\ INTERFACE
|
||||
The interface exported by the \f3jstatd\fR process is proprietary and guaranteed to change\&. Users and developers are discouraged from writing to this interface\&.
|
||||
.SH EXAMPLES
|
||||
The following are examples of the \f3jstatd\fR command\&. The \f3jstatd\fR scripts automatically start the server in the background
|
||||
.SS INTERNAL\ RMI\ REGISTRY
|
||||
This example shows hos to start a \f3jstatd\fR session with an internal RMI registry\&. This example assumes that no other server is bound to the default RMI registry port (port 1099)\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS EXTERNAL\ RMI\ REGISTRY
|
||||
This example starts a \f3jstatd\fR session with a external RMI registry\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This example starts a \f3jstatd\fR session with an external RMI registry server on port 2020\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jrmiregistry 2020&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy \-p 2020\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This example starts a \f3jstatd\fR session with an external RMI registry on port 2020 that is bound to \f3AlternateJstatdServerName\fR\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry 2020&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy \-p 2020\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-n AlternateJstatdServerName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS STOP\ THE\ CREATION\ OF\ AN\ IN-PROCESS\ RMI\ REGISTRY
|
||||
This example starts a \f3jstatd\fR session that does not create an RMI registry when one is not found\&. This example assumes an RMI registry is already running\&. If an RMI registry is not running, then an error message is displayed\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy \-nr\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS ENABLE\ RMI\ LOGGING
|
||||
This example starts a \f3jstatd\fR session with RMI logging capabilities enabled\&. This technique is useful as a troubleshooting aid or for monitoring server activities\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-J\-Djava\&.rmi\&.server\&.logCalls=true\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstat(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
rmiregistry(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,72 +1,87 @@
|
||||
." Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH native2ascii 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Internationalization Tools
|
||||
.\" Title: native2ascii.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH native2ascii 1 "21 November 2013" "JDK 8" "Internationalization Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
native2ascii \- Native\-to\-ASCII Converter
|
||||
.LP
|
||||
.LP
|
||||
Converts a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes, or visa versa.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f4native2ascii\fP\f2 [options] [inputfile [outputfile]]\fP
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
native2ascii \- Creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes or vice versa\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f2native2ascii\fP converts files that are encoded to any character encoding that is supported by the Java runtime environment to files encoded in ASCII, using Unicode escapes ("\\uxxxx" notation) for all characters that are not part of the ASCII character set. This process is required for properties files containing characters not in ISO\-8859\-1 character sets. The tool can also perform the reverse conversion.
|
||||
.LP
|
||||
.LP
|
||||
If \f2outputfile\fP is omitted, standard output is used for output. If, in addition, \f2inputfile\fP is omitted, standard input is used for input.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-reverse
|
||||
Perform the reverse operation: Convert a file encoded in ISO\-8859\-1 with Unicode escapes to a file in any character encoding supported by the Java runtime environment.
|
||||
\fBnative2ascii\fR [ \fIinputfile\fR ] [ \fIoutputfile\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIinputfile\fR
|
||||
The encoded file to be converted to ASCII\&.
|
||||
.TP
|
||||
\fIoutputfile\fR
|
||||
The converted ASCII file\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3native2ascii\fR command converts encoded files supported by the Java Runtime Environment (JRE) to files encoded in ASCII, using Unicode escapes (\f3\eu\fR\fIxxxx\fR) notation for all characters that are not part of the ASCII character set\&. This process is required for properties files that contain characters not in ISO-8859-1 character sets\&. The tool can also perform the reverse conversion\&.
|
||||
.PP
|
||||
If the \f3outputfile\fR value is omitted, then standard output is used for output\&. If, in addition, the \f3inputfile\fR value is omitted, then standard input is used for input\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-reverse
|
||||
.br
|
||||
Perform the reverse operation: Converts a file encoded in ISO-8859-1 with Unicode escapes to a file in any character encoding supported by the JRE\&.
|
||||
.TP
|
||||
-encoding \fIencoding_name\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-encoding encoding_name
|
||||
Specifies the name of the character encoding to be used by the conversion procedure. If this option is not present, the default character encoding (as determined by the \f2java.nio.charset.Charset.defaultCharset\fP method) is used. The \f2encoding_name\fP string must be the name of a character encoding that is supported by the Java runtime environment \- see the
|
||||
.na
|
||||
\f4Supported Encodings\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html document.
|
||||
Specifies the name of the character encoding to be used by the conversion procedure\&. If this option is not present, then the default character encoding (as determined by the \f3java\&.nio\&.charset\&.Charset\&.defaultCharset\fR method) is used\&. The \f3encoding_name\fR string must be the name of a character encoding that is supported by the JRE\&. See Supported Encodings at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/intl/encoding\&.doc\&.html
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Passes \f3option\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,368 +1,214 @@
|
||||
." Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH orbd 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java IDL and RMI-IIOP Tools
|
||||
.\" Title: orbd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH orbd 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
orbd \- The Object Request Broker Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment.
|
||||
.LP
|
||||
.LP
|
||||
\f3See also:\fP
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd <\fP\f3options\fP\f3>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
orbd \- Enables clients to locate and call persistent objects on servers in the CORBA environment\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The Server Manager included with the \f3orbd\fP tool is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. The persistent servers, while publishing the persistent object references in the Naming Service, include the port number of the ORBD in the object reference instead of the port number of the Server. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
The object reference in the Naming Service remains independent of the server life cycle. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shutdown, the ORBD will always return the correct object reference to the invoking client.
|
||||
.TP 2
|
||||
o
|
||||
The client needs to lookup the object reference in the Naming Service only once, and can keep re\-using this reference independent of the changes introduced due to server life cycle.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To access ORBD's Server Manager, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. For more information on the Server Manager, see the section in this document titled \f2Server Manager\fP.
|
||||
.LP
|
||||
.LP
|
||||
When \f2orbd\fP starts up, it also starts a naming service. For more information on the naming service, link to
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.SS
|
||||
Required Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialPort nameserverport
|
||||
Specifies the port on which the name server should be started. Once started, \f2orbd\fP will listen for incoming requests on this port. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. (required)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.SS
|
||||
OTHER OPTIONS
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-port port
|
||||
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects. The default value for this port is 1049. This port number is added to the port field of the persistent Interoperable Object References (IOR). (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-defaultdb directory
|
||||
Specifies the base where the ORBD persistent storage directory \f2orb.db\fP is created. If this option is not specified, the default value is "./orb.db". (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverPollingTime milliseconds
|
||||
Specifies how often ORBD checks for the health of persistent servers registered via \f2servertool\fP. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverStartupDelay milliseconds
|
||||
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered via \f2servertool\fP is restarted. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.TP 3
|
||||
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Starting and Stopping the Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
A Naming Service is a CORBA service that allows
|
||||
.na
|
||||
\f2CORBA objects\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The
|
||||
.na
|
||||
\f2name binding\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference.
|
||||
.LP
|
||||
.LP
|
||||
Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service.
|
||||
.LP
|
||||
.LP
|
||||
The \f4Persistent\fP\f3 Naming Service\fP provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, the Persistent Naming Service will restore the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
For backward compatibility, \f2tnameserv\fP, a \f4Transient\fP\f3 Naming Service\fP shipped with older versions of the JDK, is also included in this release of J2SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, the naming context graph is lost.
|
||||
.LP
|
||||
.LP
|
||||
The \f2\-ORBInitialPort\fP argument is a required command\-line argument for \f2orbd\fP, and is used to set the port number on which the Naming Service will run. The following instructions assume you can use port 1050 for the Java\ IDL Object Request Broker Daemon. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. You can substitute a different port if necessary.
|
||||
.LP
|
||||
.LP
|
||||
To start \f2orbd\fP from a UNIX command shell, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Now that ORBD is running, you can run your server and client applications. When running the client and server applications, they must be made aware of the port number (and machine name, if applicable) where the Naming Service is running. One way to do this is to add the following code to your application:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
In this example, the Naming Service is running on port 1050 on host "MyHost". Another way is to specify the port number and/or machine name when running the server or client application from the command line. For example, you would start your "HelloApplication" with the following command line:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To stop the naming service, use the relevant operating system command, such as \f2pkill orbd\fP on Solaris, or \f2Ctrl+C\fP in the DOS window in which \f2orbd\fP is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped.
|
||||
.LP
|
||||
.LP
|
||||
For more information on the Naming Service included with ORBD, see
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html.
|
||||
.LP
|
||||
.SH "Server Manager"
|
||||
.LP
|
||||
.LP
|
||||
To access ORBD's Server Manager and run a persistent server, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. When a server is started using \f2servertool\fP, it must be started on the same host and port on which \f2orbd\fP is executing. If the server is run on a different port, the information stored in the database for local contexts will be invalid and the service will not work properly.
|
||||
.LP
|
||||
.SS
|
||||
Server Manager: an Example
|
||||
.LP
|
||||
.LP
|
||||
Using the
|
||||
.na
|
||||
\f2sample tutorial\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application:
|
||||
.LP
|
||||
.LP
|
||||
Start \f2orbd\fP.
|
||||
.LP
|
||||
.LP
|
||||
To start \f2orbd\fP from a UNIX command shell, enter:
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Note that \f21050\fP is the port on which you want the name server to run. \f2\-ORBInitialPort\fP is a required command\-line argument. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.
|
||||
.LP
|
||||
.LP
|
||||
Start the \f2servertool\fP:
|
||||
.LP
|
||||
.LP
|
||||
To start the Hello server, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Make sure the name server (\f2orbd\fP) port is the same as in the previous step, for example, \f2\-ORBInitialPort 1050\fP. The \f2servertool\fP must be started on the same port as the name server.
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP command line interface appears.
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Start the Hello server from the \f2servertool\fP prompt:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool > register \-server HelloServer \-classpath . \-applicationName
|
||||
.fl
|
||||
HelloServerApName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP registers the server, assigns it the name of "HelloServerApName", and displays its server id, along with a listing of all registered servers.
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Run the client application from another terminal window or prompt:
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For this example, you can omit \f2\-ORBInitialHost localhost\fP since the name server is running on the same host as the Hello client. If the name server is running on a different host, use \f2\-ORBInitialHost\fP \f2nameserverhost\fP to specify the host on which the IDL name server is running.
|
||||
.LP
|
||||
.LP
|
||||
Specify the name server (\f2orbd\fP) port as done in the previous step, for example, \f2\-ORBInitialPort 1050\fP.
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
When you have finished experimenting with the Server Manager, be sure to shut down or kill the name server (\f2orbd\fP) and \f2servertool\fP.
|
||||
.LP
|
||||
.LP
|
||||
To shut down \f2orbd\fP from a DOS prompt, select the window that is running the server and enter \f2Ctrl+C\fP to shut it down. To shut down \f2orbd\fPfrom a Unix shell, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped.
|
||||
.LP
|
||||
.LP
|
||||
To shut down the \f2servertool\fP, type \f2quit\fP and press the \f2Enter\fP key on the keyboard.
|
||||
.LP
|
||||
.SH "See Also"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
\fBorbd\fR [ \fIoptions\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3orbd\fR command enables clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The Server Manager included with the orbd tool is used to enable clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The persistent servers, while publishing the persistent object references in the naming service, include the port number of the ORBD in the object reference instead of the port number of the server\&. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The object reference in the naming service remains independent of the server life cycle\&. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shut down, the ORBD returns the correct object reference to the calling client\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The client needs to look up the object reference in the naming service only once, and can keep reusing this reference independent of the changes introduced due to server life cycle\&.
|
||||
.PP
|
||||
To access the ORBD Server Manager, the server must be started using \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. For more information on the Server Manager, see Server Manager\&.
|
||||
.PP
|
||||
When \f3orbd\fR starts, it also starts a naming service\&. For more information about the naming service\&. See Start and Stop the Naming Service\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-ORBInitialPort \fInameserverport\fR
|
||||
.br
|
||||
.TP 2
|
||||
o
|
||||
Required\&. Specifies the port on which the name server should be started\&. After it is started, \f3orbd\fR listens for incoming requests on this port\&. On Oracle Solaris software, you must become the root user to start a process on a port below 1024\&. For this reason, Oracle recommends that you use a port number above or equal to 1024\&.
|
||||
.SS NONREQUIRED\ OPTIONS
|
||||
.TP
|
||||
-port \fIport\fR
|
||||
.br
|
||||
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects\&. The default value for this port is 1049\&. This port number is added to the port field of the persistent Interoperable Object References (IOR)\&.
|
||||
.TP
|
||||
-defaultdb \fIdirectory\fR
|
||||
.br
|
||||
Specifies the base where the ORBD persistent storage directory, \f3orb\&.db\fR, is created\&. If this option is not specified, then the default value is \f3\&./orb\&.db\fR\&.
|
||||
.TP
|
||||
-serverPollingTime \fImilliseconds\fR
|
||||
.br
|
||||
Specifies how often ORBD checks for the health of persistent servers registered through \f3servertool\fR\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
|
||||
.TP
|
||||
-serverStartupDelay milliseconds
|
||||
.br
|
||||
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through \f3servertool\fR is restarted\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SS START\ AND\ STOP\ THE\ NAMING\ SERVICE
|
||||
A naming service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference\&. The name binding can be stored in the naming service, and a client can supply the name to obtain the desired object reference\&.
|
||||
.PP
|
||||
Before running a client or a server, you will start ORBD\&. ORBD includes a persistent naming service and a transient naming service, both of which are an implementation of the COS Naming Service\&.
|
||||
.PP
|
||||
The Persistent Naming Service provides persistence for naming contexts\&. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure\&. If ORBD is restarted, then the Persistent Naming Service restores the naming context graph, so that the binding of all clients\&' and servers\&' names remains intact (persistent)\&.
|
||||
.PP
|
||||
For backward compatibility, \f3tnameserv\fR, a Transient Naming Service that shipped with earlier releases of the JDK, is also included in this release of Java SE\&. A transient naming service retains naming contexts as long as it is running\&. If there is a service interruption, then the naming context graph is lost\&.
|
||||
.PP
|
||||
The \f3-ORBInitialPort\fR argument is a required command-line argument for \f3orbd\fR, and is used to set the port number on which the naming service runs\&. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon\&. When using Oracle Solaris software, you must become a root user to start a process on a port lower than 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&. You can substitute a different port when necessary\&.
|
||||
.PP
|
||||
To start \f3orbd\fR from a UNIX command shell, enter:
|
||||
.sp
|
||||
.nf
|
||||
\f3orbd \-ORBInitialPort 1050&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
From an MS-DOS system prompt (Windows), enter:
|
||||
.sp
|
||||
.nf
|
||||
\f3start orbd \-ORBInitialPort 1050\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Now that ORBD is running, you can run your server and client applications\&. When running the client and server applications, they must be made aware of the port number (and machine name, when applicable) where the Naming Service is running\&. One way to do this is to add the following code to your application:
|
||||
.sp
|
||||
.nf
|
||||
\f3Properties props = new Properties();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialHost", "MyHost");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3ORB orb = ORB\&.init(args, props);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
In this example, the naming service is running on port 1050 on host \f3MyHost\fR\&. Another way is to specify the port number and/or machine name when running the server or client application from the command line\&. For example, you would start your \f3HelloApplication\fR with the following command line:
|
||||
.sp
|
||||
.nf
|
||||
\f3java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
To stop the naming service, use the relevant operating system command, such as \f3pkill\fR\f3orbd\fR on Oracle Solaris, or \fICtrl+C\fR in the DOS window in which \f3orbd\fR is running\&. Note that names registered with the naming service can disappear when the service is terminated because of a transient naming service\&. The Java IDL naming service will run until it is explicitly stopped\&.
|
||||
.PP
|
||||
For more information about the naming service included with ORBD, see Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
||||
.SH SERVER\ MANAGER
|
||||
To access the ORBD Server Manager and run a persistent server, the server must be started with \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. When a server is started using \f3servertool\fR, it must be started on the same host and port on which \f3orbd\fR is executing\&. If the server is run on a different port, then the information stored in the database for local contexts will be invalid and the service will not work properly\&.
|
||||
.PP
|
||||
See Java IDL: The "Hello World" Example at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlExample\&.html
|
||||
.PP
|
||||
In this example, you run the \f3idlj\fR compiler and \f3javac\fR compiler as shown in the tutorial\&. To run the ORBD Server Manager, follow these steps for running the application:
|
||||
.PP
|
||||
Start \f3orbd\fR\&.
|
||||
.PP
|
||||
UNIX command shell, enter: \f3orbd -ORBInitialPort 1050\fR\&.
|
||||
.PP
|
||||
MS-DOS system prompt (Windows), enter: \f3s\fR\f3tart orbd -ORBInitialPort 105\fR\f30\fR\&.
|
||||
.PP
|
||||
Port 1050 is the port on which you want the name server to run\&. The \f3-ORBInitialPort\fR option is a required command-line argument\&. When using Oracle Solaris software, you must become a root user to start a process on a port below 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&.
|
||||
.PP
|
||||
Start the \f3servertool\fR: \f3servertool -ORBInitialPort 1050\fR\&.
|
||||
.PP
|
||||
Make sure the name server (\f3orbd\fR) port is the same as in the previous step, for example, \f3-ORBInitialPort 1050\&.\fR The \f3servertool\fR must be started on the same port as the name server\&.
|
||||
.PP
|
||||
In the \f3servertool\fR command line interface, start the \f3Hello\fR server from the \f3servertool\fR prompt:
|
||||
.sp
|
||||
.nf
|
||||
\f3servertool > register \-server HelloServer \-classpath \&. \-applicationName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 HelloServerApName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The \f3servertool\fR registers the server, assigns it the name \f3HelloServerApName\fR, and displays its server ID with a listing of all registered servers\&.Run the client application from another terminal window or prompt:
|
||||
.sp
|
||||
.nf
|
||||
\f3java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
For this example, you can omit \f3-ORBInitialHost localhost\fR because the name server is running on the same host as the \f3Hello\fR client\&. If the name server is running on a different host, then use the -\f3ORBInitialHost nameserverhost\fR option to specify the host on which the IDL name server is running\&.Specify the name server (\f3orbd\fR) port as done in the previous step, for example, \f3-ORBInitialPort 1050\fR\&. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (\f3orbd\fR) and \f3servertool\fR\&. To shut down \f3orbd\fR from am MS-DOS prompt, select the window that is running the server and enter \fICtrl+C\fR to shut it down\&.
|
||||
.PP
|
||||
To shut down \f3orbd\fR from an Oracle Solaris shell, find the process, and terminate with the \f3kill\fR command\&. The server continues to wait for invocations until it is explicitly stopped\&. To shut down the \f3servertool\fR, type \fIquit\fR and press the \fIEnter\fR key\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
servertool(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,340 +1,291 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH pack200 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Deployment Tools
|
||||
.\" Title: pack200.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH pack200 1 "21 November 2013" "JDK 8" "Java Deployment Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
pack200 \- JAR Packing tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Options may be in any order. The last option on the command line or in a properties file supersedes all previously specified options.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
output\-file
|
||||
Name of the output file.
|
||||
.TP 3
|
||||
JAR\-file
|
||||
Name of the input file.
|
||||
.RE
|
||||
.SH NAME
|
||||
pack200 \- Packages a JAR file into a compressed pack200 file for web deployment\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f2pack200\fP tool is a Java application that transforms a JAR file into a compressed \f2pack200\fP file using the Java \f2gzip\fP compressor. The \f2pack200\fP files are highly compressed files that can be directly deployed, saving bandwidth and reducing download time.
|
||||
.LP
|
||||
.LP
|
||||
The \f2pack200\fP tool uses several options to fine\-tune and set the compression engine.
|
||||
.LP
|
||||
.SS
|
||||
Typical usage:
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
In this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-repack\fP
|
||||
.LP
|
||||
.LP
|
||||
Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. The resulting file can be used as an input to the \f2jarsigner(1)\fP tool.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-g \-\-no\-gzip\fP
|
||||
.LP
|
||||
.LP
|
||||
Produces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-G \-\-strip\-debug\fP
|
||||
.LP
|
||||
.LP
|
||||
Strips attributes used for debugging from the output. These include \f2SourceFile\fP, \f2LineNumberTable\fP, \f2LocalVariableTable\fP and \f2LocalVariableTypeTable\fP. Removing these attributes reduces the size of both downloads and installations but reduces the usefulness of debuggers.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
Preserve the order of files in the input file; this is the default behavior.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-O \-\-no\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
The packer will reorder and transmit all elements. Additionally, the packer may remove JAR directory names. This will reduce the download size; however, certain JAR file optimizations, such as indexing, may not work correctly.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires
|
||||
\fBpack200\fR [\fIoptions\fR] \fIoutput\-file\fR \fIJAR\-file\fR
|
||||
.fi
|
||||
.sp
|
||||
Options can be in any order\&. The last option on the command line or in a properties file supersedes all previously specified options\&.
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIoutput-file\fR
|
||||
Name of the output file\&.
|
||||
.TP
|
||||
\fIJAR-file\fR
|
||||
Name of the input file\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3pack200\fR command is a Java application that transforms a JAR file into a compressed pack200 file with the Java gzip compressor\&. The pack200 files are highly compressed files that can be directly deployed to save bandwidth and reduce download time\&.
|
||||
.PP
|
||||
The \f3pack200\fR command has several options to fine-tune and set the compression engine\&. The typical usage is shown in the following example, where \f3myarchive\&.pack\&.gz\fR is produced with the default \f3pack200\fR command settings:
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 myarchive\&.pack\&.gz myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-r, --repack
|
||||
.br
|
||||
more than N bytes, it will be given its own archive segment. As a special case, a value of \f2\-1\fP will produce a single large segment with all input files, while a value of \f20\fP will produce one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.
|
||||
.LP
|
||||
.LP
|
||||
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties.
|
||||
.LP
|
||||
.LP
|
||||
The default is \-1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.
|
||||
.LP
|
||||
.LP
|
||||
A 10MB JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit).
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Evalue \-\-effort=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
If the value is set to a single decimal digit, the packer will use the indicated amount of effort in compressing the archive. Level \f21\fP may produce somewhat larger size and faster compression speed, while level \f29\fP will take much longer but may produce better compression. The special value \f20\fP instructs the packer to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass\-through of the entire archive.
|
||||
.LP
|
||||
.LP
|
||||
The default is \f25\fP, investing a modest amount of time to produce reasonable compression.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
Overrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
true
|
||||
.TP 3
|
||||
false
|
||||
In either case, the packer will set the deflation hint accordingly in the output archive, and will not transmit the individual deflation hints of archive elements.
|
||||
.RE
|
||||
Produces a JAR file by packing and unpacking a JAR file\&. The resulting file can be used as an input to the \f3jarsigner\fR(1) tool\&. The following example packs and unpacks the myarchive\&.jar file:
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 \-\-repack myarchive\-packer\&.jar myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3pack200 \-\-repack myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
keep
|
||||
Preserve deflation hints observed in the input JAR. (This is the default.)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-mvalue \-\-modification\-time=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
The possible values are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
latest
|
||||
The packer will attempt to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment. This single value will be transmitted as part of the segment and applied to all the entries in each segment. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date.
|
||||
.TP 3
|
||||
keep
|
||||
Preserves modification times observed in the input JAR. (This is the default.)
|
||||
.RE
|
||||
The following example preserves the order of files in the input file\&.
|
||||
.TP
|
||||
-g, --no-gzip
|
||||
.br
|
||||
Produces a \f3pack200\fR file\&. With this option, a suitable compressor must be used, and the target system must use a corresponding decompresser\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 \-\-no\-gzip myarchive\&.pack myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Pfile \-\-pass\-file=\fP\f2file\fP
|
||||
.LP
|
||||
.LP
|
||||
Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files may be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator "\f2/\fP". The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, all files under that directory will be passed.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
|
||||
.LP
|
||||
.LP
|
||||
Overrides the default behavior; i.e., the classfile containing the unknown attribute will be passed through with the specified action. The possible values for actions are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
error
|
||||
The \f2pack200\fP operation as a whole will fail with a suitable explanation.
|
||||
.TP 3
|
||||
strip
|
||||
The attribute will be dropped. Note: Removing the required VM attributes may cause Class Loader failures.
|
||||
.TP 3
|
||||
pass
|
||||
Upon encountering this attribute, the entire class will be transmitted as though it is a resource.
|
||||
.RE
|
||||
.TP
|
||||
-G, --strip-debug
|
||||
.br
|
||||
Strips debugging attributes from the output\&. These include \f3SourceFile\fR, \f3LineNumberTable\fR, \f3LocalVariableTable\fR and \f3LocalVariableTypeTable\fR\&. Removing these attributes reduces the size of both downloads and installations, but reduces the usefulness of debuggers\&.
|
||||
.TP
|
||||
--keep-file-order
|
||||
.br
|
||||
Preserve the order of files in the input file\&. This is the default behavior\&.
|
||||
.TP
|
||||
-O, --no-keep-file-order
|
||||
.br
|
||||
The packer reorders and transmits all elements\&. The packer can also remove JAR directory names to reduce the download size\&. However, certain JAR file optimizations, such as indexing, might not work correctly\&.
|
||||
.TP
|
||||
-S\fIvalue\fR , --segment-limit=\fIvalue\fR
|
||||
.br
|
||||
The value is the estimated target size \fIN\fR (in bytes) of each archive segment\&. If a single input file requires more than \fIN\fR bytes, then its own archive segment is provided\&. As a special case, a value of \f3-1\fR produces a single large segment with all input files, while a value of 0 produces one segment for each class\&. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory\&.
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.LP
|
||||
.LP
|
||||
With the above four options, the attribute layout can be specified for a class entity, such as Class attribute, Field attribute, Method attribute, and Code attribute. The attribute\-name is the name of the attribute for which the layout or action is being defined. The possible values for action are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
some\-layout\-string
|
||||
The layout language is defined in the JSR 200 specification.
|
||||
.LP
|
||||
Example: \f2\-\-class\-attribute=SourceFile=RUH\fP
|
||||
.TP 3
|
||||
error
|
||||
Upon encountering this attribute, the pack200 operation will fail with a suitable explanation.
|
||||
.TP 3
|
||||
strip
|
||||
Upon encountering this attribute, the attribute will be removed from the output. Note: removing VM\-required attributes may cause Class Loader failures.
|
||||
.RE
|
||||
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment with the size of its name and other transmitted properties\&.
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Example: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing this attribute to be passed through without further action by the packer.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
|
||||
.LP
|
||||
.LP
|
||||
A configuration file, containing Java properties to initialize the packer, may be specified on the command line.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
|
||||
The default is -1, which means that the packer creates a single segment output file\&. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs\&.
|
||||
|
||||
A 10 MB JAR packed without this limit typically packs about 10 percent smaller, but the packer might require a larger Java heap (about 10 times the segment limit)\&.
|
||||
.TP
|
||||
-E\fIvalue\fR , --effort=\fIvalue\fR
|
||||
.br
|
||||
\f2% more pack.properties\fP
|
||||
If the value is set to a single decimal digit, then the packer uses the indicated amount of effort in compressing the archive\&. Level 1 might produce somewhat larger size and faster compression speed, while level 9 takes much longer, but can produce better compression\&. The special value 0 instructs the \f3pack200\fR command to copy through the original JAR file directly with no compression\&. The JSR 200 standard requires any unpacker to understand this special case as a pass-through of the entire archive\&.
|
||||
|
||||
The default is 5, to invest a modest amount of time to produce reasonable compression\&.
|
||||
.TP
|
||||
-H\fIvalue\fR , --deflate-hint=\fIvalue\fR
|
||||
.br
|
||||
\f2# Generic properties for the packer.\fP
|
||||
Overrides the default, which preserves the input information, but can cause the transmitted archive to be larger\&. The possible values are: \f3true\fR, \f3false\fR, or \f3keep\fR\&.
|
||||
|
||||
If the \f3value\fR is \f3true\fR or false, then the \f3packer200\fR command sets the deflation hint accordingly in the output archive and does not transmit the individual deflation hints of archive elements\&.
|
||||
|
||||
The \f3keep\fR value preserves deflation hints observed in the input JAR\&. This is the default\&.
|
||||
.TP
|
||||
-m\fIvalue\fR , --modification-time=\fIvalue\fR
|
||||
.br
|
||||
\f2modification.time=latest\fP
|
||||
The possible values are \f3latest\fR and \f3keep\fR\&.
|
||||
|
||||
If the value is latest, then the packer attempts to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment\&. This single value is transmitted as part of the segment and applied to all the entries in each segment\&. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date\&.
|
||||
|
||||
If the value is \f3keep\fR, then modification times observed in the input JAR are preserved\&. This is the default\&.
|
||||
.TP
|
||||
-P\fIfile\fR , --pass-file=\fIfile\fR
|
||||
.br
|
||||
\f2deflate.hint=false\fP
|
||||
Indicates that a file should be passed through bytewise with no compression\&. By repeating the option, multiple files can be specified\&. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator forward slash (/)\&. The resulting file names must match exactly as strings with their occurrences in the JAR file\&. If \f3file\fR is a directory name, then all files under that directory are passed\&.
|
||||
.TP
|
||||
-U\fIaction\fR , --unknown-attribute=\fIaction\fR
|
||||
.br
|
||||
\f2keep.file.order=false\fP
|
||||
Overrides the default behavior, which means that the class file that contains the unknown attribute is passed through with the specified \f3action\fR\&. The possible values for actions are \f3error\fR, \f3strip\fR, or \f3pass\fR\&.
|
||||
|
||||
If the value is \f3error\fR, then the entire \f3pack200\fR command operation fails with a suitable explanation\&.
|
||||
|
||||
If the value is \f3strip\fR, then the attribute is dropped\&. Removing the required Java Virtual Machine (JVM) attributes can cause class loader failures\&.
|
||||
|
||||
If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&.
|
||||
.TP
|
||||
.nf
|
||||
-C\fIattribute-name\fR=\fIlayout\fR , --class-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
\f2# This option will cause the files bearing new attributes to\fP
|
||||
.fi
|
||||
See next option\&.
|
||||
.TP
|
||||
.nf
|
||||
-F\fIattribute-name\fR=\fIlayout\fR , --field-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
\f2# be reported as an error rather than passed uncompressed.\fP
|
||||
.fi
|
||||
See next option\&.
|
||||
.TP
|
||||
.nf
|
||||
-M\fIattribute-name\fR=\fIlayout\fR , --method-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
\f2unknown.attribute=error\fP
|
||||
.fi
|
||||
See next option\&.
|
||||
.TP
|
||||
.nf
|
||||
-D\fIattribute-name\fR=\fIlayout\fR , --code-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
\f2# Change the segment limit to be unlimited.\fP
|
||||
.fi
|
||||
With the previous four options, the attribute layout can be specified for a class entity, such as \f3class-attribute\fR, \f3field-attribute\fR, \f3method-attribute\fR, and \f3code-attribute\fR\&. The \fIattribute-name\fR is the name of the attribute for which the layout or action is being defined\&. The possible values for \fIaction\fR are \f3some-layout-string\fR, \f3error\fR, \f3strip\fR, \f3pass\fR\&.
|
||||
|
||||
\f3some-layout-string\fR: The layout language is defined in the JSR 200 specification, for example: \f3--class-attribute=SourceFile=RUH\fR\&.
|
||||
|
||||
If the value is \f3error\fR, then the \f3pack200\fR operation fails with an explanation\&.
|
||||
|
||||
If the value is \f3strip\fR, then the attribute is removed from the output\&. Removing JVM-required attributes can cause class loader failures\&. For example, \f3--class-attribute=CompilationID=pass\fR causes the class file that contains this attribute to be passed through without further action by the packer\&.
|
||||
|
||||
If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&.
|
||||
.TP
|
||||
-f \fIpack\&.properties\fR , --config-file=\fIpack\&.properties\fR
|
||||
.br
|
||||
\f2segment.limit=\-1\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
Outputs minimal messages. Multiple specification of this option will output more verbose messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies quiet operation with no messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies a log file to output messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints help information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints version information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
Passes \f2option\fP to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.LP
|
||||
.SH "EXIT STATUS"
|
||||
.LP
|
||||
.LP
|
||||
The following exit values are returned:
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP for successful completion;
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP if an error occurs.
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
A configuration file, containing Java properties to initialize the packer, can be specified on the command line\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 \-f pack\&.properties myarchive\&.pack\&.gz myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3more pack\&.properties\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# Generic properties for the packer\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3modification\&.time=latest\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3deflate\&.hint=false\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3keep\&.file\&.order=false\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# This option will cause the files bearing new attributes to\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# be reported as an error rather than passed uncompressed\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3unknown\&.attribute=error\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# Change the segment limit to be unlimited\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3segment\&.limit=\-1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-v, --verbose
|
||||
.br
|
||||
Outputs minimal messages\&. Multiple specification of this option will create more verbose messages\&.
|
||||
.TP
|
||||
-q, --quiet
|
||||
.br
|
||||
Specifies quiet operation with no messages\&.
|
||||
.TP
|
||||
-l\fIfilename\fR , --log-file=\fIfilename\fR
|
||||
.br
|
||||
Specifies a log file to output messages\&.
|
||||
.TP
|
||||
-?, -h, --help
|
||||
.br
|
||||
Prints help information about this command\&.
|
||||
.TP
|
||||
-V, --version
|
||||
.br
|
||||
Prints version information about this command\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes the specified option to the Java Virtual Machine\&. For more information, see the reference page for the java(1) command\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&.
|
||||
.SH EXIT\ STATUS
|
||||
The following exit values are returned: 0 for successful completion and a number greater than 0 when an error occurs\&.
|
||||
.SH NOTES
|
||||
This command should not be confused with \f3pack\fR(1)\&. The \f3pack\fR and \f3pack200\fR commands are separate products\&.
|
||||
.PP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, when there are discrepancies\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
unpack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SE Documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Deployment Guide \- Pack200\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archive Tool
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR Signer tool
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fP man page
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
This command should not be confused with \f2pack(1)\fP. They are distinctly separate products.
|
||||
.LP
|
||||
.LP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
|
||||
.LP
|
||||
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jar(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jarsigner(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,89 +1,115 @@
|
||||
." Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH policytool 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Security Tools
|
||||
.\" Title: policytool.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH policytool 1 "21 November 2013" "JDK 8" "Security Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
policytool \- PolicyTool Administration GUI Utility
|
||||
.LP
|
||||
\f3policytool\fP reads and writes a plain text policy file based on user input via the utility GUI.
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\
|
||||
.TP 3
|
||||
Run the policytool Administrator's utility
|
||||
\f4policytool\fP
|
||||
.TP 3
|
||||
Run policytool and load the specified policy file
|
||||
\f4policytool\fP\f2[\-file\ \fP\f2filename\fP\f2]\fP
|
||||
.TP 3
|
||||
\
|
||||
.TP 3
|
||||
where:
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
directs \f2policytool\fP to load a local policy file
|
||||
.TP 3
|
||||
filename
|
||||
The file name
|
||||
.RE
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
\f3policytool\fP is a GUI that allows users to create and manage policy files. For details, see
|
||||
.na
|
||||
\f2the Policytool Users Guide\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html.
|
||||
.SH "OPTIONS"
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
Loads \f2filename\fP.
|
||||
.SH "SEE ALSO"
|
||||
.na
|
||||
\f2Default Policy Implementation and Syntax\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html
|
||||
.br
|
||||
.na
|
||||
\f2Policy Tool Users' Guide\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html
|
||||
.br
|
||||
.na
|
||||
\f2Security Permissions\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/permissions.html
|
||||
.br
|
||||
.na
|
||||
\f2Security Overview\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html
|
||||
.br
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH NAME
|
||||
policytool \- Reads and writes a plain text policy file based on user input through the utility GUI\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBpolicytool\fR [ \fB\-file\fR ] [ \fIfilename\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
-file
|
||||
.br
|
||||
Directs the \f3policytool\fR command to load a policy file\&.
|
||||
.TP
|
||||
\fIfilename\fR
|
||||
The name of the file to be loaded\&.
|
||||
.PP
|
||||
\fIExamples\fR:
|
||||
.PP
|
||||
Run the policy tool administrator utility:
|
||||
.sp
|
||||
.nf
|
||||
\f3policytool\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Run the \f3policytool\fR command and load the specified file:
|
||||
.sp
|
||||
.nf
|
||||
\f3policytool\-file mypolicyfile\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH DESCRIPTION
|
||||
The \f3policytool\fR command calls an administrator\&'s GUI that enables system administrators to manage the contents of local policy files\&. A policy file is a plain-text file with a \f3\&.policy\fR extension, that maps remote requestors by domain, to permission objects\&. For details, see Default Policy Implementation and Policy File Syntax at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyFiles\&.html
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-file
|
||||
.br
|
||||
Directs the \f3policytool\fR command to load a policy file\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Default Policy Implementation and Policy File Syntax at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyFiles\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Policy File Creation and Management at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyGuide\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Permissions in Java SE Development Kit (JDK) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/permissions\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Java Security Overview at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/overview/jsoverview\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Java Cryptography Architecture (JCA) Reference Guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,227 +1,224 @@
|
||||
." Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH rmic 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Remote Method Invocation (RMI) Tools
|
||||
.\" Title: rmic.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH rmic 1 "21 November 2013" "JDK 8" "Remote Method Invocation (RMI) Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmic \- The Java RMI Compiler
|
||||
.LP
|
||||
.LP
|
||||
\f3rmic\fP generates stub, skeleton, and tie classes for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmic [ \fP\f3options\fP\f3 ] \fP\f4package\-qualified\-class\-name(s)\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
rmic \- Generates stub, skeleton, and tie classes for remote objects that use the Java Remote Method Protocol (JRMP) or Internet Inter-Orb protocol (IIOP)\&. Also generates Object Management Group (OMG) Interface Definition Language (IDL)
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmic\fP compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface \f2java.rmi.Remote\fP. The class names in the \f3rmic\fP command must be for classes that have been compiled successfully with the \f3javac\fP command and must be fully package qualified. For example, running \f3rmic\fP on the class file name \f2HelloImpl\fP as shown here:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmic hello.HelloImpl
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
\fBrmic\fR [ \fIoptions\fR ] \fIpackage\-qualified\-class\-names\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line \f3options\fR\&. See Options\&.
|
||||
.TP
|
||||
\fIpackage-qualified-class-names\fR
|
||||
Class names that include their packages, for example, \f3java\&.awt\&.Color\fR\&.
|
||||
.SH DESCRIPTION
|
||||
\fIDeprecation Note:\fR Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated\&. Oracle recommends that you use dynamically generated JRMP stubs instead, eliminating the need to use this tool for JRMP-based applications\&. See the \f3java\&.rmi\&.server\&.UnicastRemoteObject\fR specification at http://docs\&.oracle\&.com/javase/8/docs/api/java/rmi/server/UnicastRemoteObject\&.html for further information\&.
|
||||
.PP
|
||||
The \f3rmic\fR compiler generates stub and skeleton class files using the Java Remote Method Protocol (JRMP) and stub and tie class files (IIOP protocol) for remote objects\&. These class files are generated from compiled Java programming language classes that are remote object implementation classes\&. A remote implementation class is a class that implements the interface \f3java\&.rmi\&.Remote\fR\&. The class names in the \f3rmic\fR command must be for classes that were compiled successfully with the \f3javac\fR command and must be fully package qualified\&. For example, running the \f3rmic\fR command on the class file name \f3HelloImpl\fR as shown here creates the \f3HelloImpl_Stub\&.class\fRfile in the hello subdirectory (named for the class\&'s package):
|
||||
.sp
|
||||
.nf
|
||||
\f3rmic hello\&.HelloImpl\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
A skeleton for a remote object is a JRMP protocol server-side entity that has a method that dispatches calls to the remote object implementation\&.
|
||||
.PP
|
||||
A tie for a remote object is a server-side entity similar to a skeleton, but communicates with the client with the IIOP protocol\&.
|
||||
.PP
|
||||
A stub is a client-side proxy for a remote object that is responsible for communicating method invocations on remote objects to the server where the actual remote object implementation resides\&. A client\&'s reference to a remote object, therefore, is actually a reference to a local stub\&.
|
||||
.PP
|
||||
By default, the \f3rmic\fR command generates stub classes that use the 1\&.2 JRMP stub protocol version only, as though the \f3-v1\&.2\fR option was specified\&. The \f3-vcompat\fR option was the default in releases before 5\&.0\&. Use the \f3-iiop\fR option to generate stub and tie classes for the IIOP protocol\&. See Options\&.
|
||||
.PP
|
||||
A stub implements only the remote interfaces, and not any local interfaces that the remote object also implements\&. Because a JRMP stub implements the same set of remote interfaces as the remote object, a client can use the Java programming language built-in operators for casting and type checking\&. For IIOP, the \f3PortableRemoteObject\&.narrow\fR method must be used\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-bootclasspath \fIpath\fR
|
||||
.br
|
||||
Overrides the location of bootstrap class files\&.
|
||||
.TP
|
||||
-classpath path
|
||||
.br
|
||||
Specifies the path the \f3rmic\fR command uses to look up classes\&. This option overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons\&. The general format for path is: \f3\&.:<your_path>\fR, for example: \f3\&.:/usr/local/java/classes\fR\&.
|
||||
.TP
|
||||
-d \fIdirectory\fR
|
||||
.br
|
||||
Specifies the root destination directory for the generated class hierarchy\&. You can use this option to specify a destination directory for the stub, skeleton, and tie files\&. For example, the following command places the stub and skeleton classes derived from MyClass into the directory /java/classes/exampleclass\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmic \-d /java/classes exampleclass\&.MyClass\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
creates the \f2HelloImpl_Stub.class\fP file in the \f2hello\fP subdirectory (named for the class's package).
|
||||
.LP
|
||||
.LP
|
||||
A \f2skeleton\fP for a remote object is a JRMP protocol server\-side entity that has a method that dispatches calls to the actual remote object implementation.
|
||||
.LP
|
||||
.LP
|
||||
A \f2tie\fP for a remote object is a server\-side entity similar to a skeleton, but which communicates with the client using the IIOP protocol.
|
||||
.LP
|
||||
.LP
|
||||
A \f2stub\fP is a client\-side proxy for a remote object which is responsible for communicating method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub.
|
||||
.LP
|
||||
.LP
|
||||
By default, \f3rmic\fP generates stub classes that use the 1.2 JRMP stub protocol version only, as if the \f2\-v1.2\fP option had been specified. (Note that the \f2\-vcompat\fP option was the default in releases prior to 5.0.) Use the \f2\-iiop\fP option to generate stub and tie classes for the IIOP protocol.
|
||||
.LP
|
||||
.LP
|
||||
A stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built\-in operators for casting and type checking. For IIOP, the \f2PortableRemoteObject.narrow\fP method must be used.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-bootclasspath path
|
||||
Overrides location of bootstrap class files
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specifies the path \f3rmic\fP uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:<your_path>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-d directory
|
||||
Specifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the command
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% rmic \-d /java/classes foo.MyClass
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
would place the stub and skeleton classes derived from \f2MyClass\fP into the directory \f2/java/classes/foo\fP. If the \f2\-d\fP option is not specified, the default behavior is as if \f2"\-d\ ."\fP were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. (Note that in some previous versions of \f3rmic\fP, if \f2\-d\fP was not specified, then the package hierarchy was \f2not\fP created, and all of the output files were placed directly in the current directory.)
|
||||
.br
|
||||
\
|
||||
.TP 3
|
||||
\-extdirs path
|
||||
Overrides location of installed extensions
|
||||
.TP 3
|
||||
\-g
|
||||
Enables generation of all debugging information, including local variables. By default, only line number information is generated.
|
||||
.TP 3
|
||||
\-idl
|
||||
Causes \f2rmic\fP to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language\-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the
|
||||
.na
|
||||
\f2Java Language to IDL Mapping\fP @
|
||||
.fi
|
||||
http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description.
|
||||
.br
|
||||
.br
|
||||
When the \f2\-idl\fP option is used, other options also include:
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-always or \-alwaysgenerate
|
||||
Forces re\-generation even when existing stubs/ties/IDL are newer than the input class.
|
||||
.TP 3
|
||||
\-factory
|
||||
Uses factory keyword in generated IDL.
|
||||
.TP 3
|
||||
\-idlModule\ fromJavaPackage[.class]\ toIDLModule
|
||||
Specifies IDLEntity package mapping. For example:\ \f2\-idlModule foo.bar my::real::idlmod\fP.
|
||||
.TP 3
|
||||
\-idlFile\ fromJavaPackage[.class]\ toIDLFile
|
||||
Specifies IDLEntity file mapping. For example:\ \f2\-idlFile test.pkg.X TEST16.idl\fP.\
|
||||
.RE
|
||||
.TP 3
|
||||
\-iiop
|
||||
Causes \f2rmic\fP to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.
|
||||
.br
|
||||
.br
|
||||
Invoking \f2rmic\fP with the \f2\-iiop\fP generates stubs and ties that conform to this naming convention:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
_<implementationName>_stub.class
|
||||
.fl
|
||||
_<interfaceName>_tie.class
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
When the \f2\-iiop\fP option is used, other options also include:
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-always or \-alwaysgenerate
|
||||
Forces re\-generation even when existing stubs/ties/IDL are newer than the input class.
|
||||
.TP 3
|
||||
\-nolocalstubs
|
||||
Do not create stubs optimized for same\-process clients and servers.
|
||||
.TP 3
|
||||
\-noValueMethods
|
||||
Must be used with the \f2\-idl\fP option. Prevents addition of \f2valuetype\fP methods and initializers to emitted IDL. These methods and initializers are optional for \f2valuetype\fPs, and are generated unless the \f2\-noValueMethods\fP option is specified when using the \f2\-idl\fP option.
|
||||
.TP 3
|
||||
\-poa
|
||||
Changes the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. The \f2PortableServer\fP module for the
|
||||
.na
|
||||
\f2Portable Object Adapter\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf.
|
||||
.RE
|
||||
.TP 3
|
||||
\-J
|
||||
Used in conjunction with any \f2java\fP option, it passes the option following the \f2\-J\fP (no spaces between the \-J and the option) on to the \f2java\fP interpreter.
|
||||
.TP 3
|
||||
\-keep or \-keepgenerated
|
||||
Retains the generated \f2.java\fP source files for the stub, skeleton, and/or tie classes and writes them to the same directory as the \f2.class\fP files.
|
||||
.TP 3
|
||||
\-nowarn
|
||||
Turns off warnings. If used the compiler does not print out any warnings.
|
||||
.TP 3
|
||||
\-nowrite
|
||||
Does not write compiled classes to the file system.
|
||||
.TP 3
|
||||
\-vcompat
|
||||
Generates stub and skeleton classes compatible with both the 1.1 and 1.2 JRMP stub protocol versions. (This option was the default in releases prior to 5.0.) The generated stub classes will use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and will use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes will support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large in order to support both modes of operation.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.
|
||||
.TP 3
|
||||
\-v1.1
|
||||
Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. Note that this option is only useful for generating stub classes that are serialization\-compatible with pre\-existing, statically\-deployed stub classes that were generated by the \f3rmic\fP tool from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used).
|
||||
.TP 3
|
||||
\-v1.2
|
||||
(default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated with this option because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes will not work if they are loaded into a JDK 1.1 virtual machine.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
If the \f3-d\fR option is not specified, then the default behavior is as if \f3-d \&.\fR was specified\&. The package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it\&. In some earlier releases of the \f3rmic\fR command, if the \f3-d\fR option was not specified, then the package hierarchy was not created, and all of the output files were placed directly in the current directory\&.
|
||||
.TP
|
||||
-extdirs \fIpath\fR
|
||||
.br
|
||||
Overrides the location of installed extensions\&.
|
||||
.TP
|
||||
-g
|
||||
.br
|
||||
Enables the generation of all debugging information, including local variables\&. By default, only line number information is generated\&.
|
||||
.TP
|
||||
-idl
|
||||
.br
|
||||
Causes the \f3rmic\fR command to generate OMG IDL for the classes specified and any classes referenced\&. IDL provides a purely declarative, programming language-independent way to specify an API for an object\&. The IDL is used as a specification for methods and data that can be written in and called from any language that provides CORBA bindings\&. This includes Java and C++ among others\&. See Java IDL: IDL to Java Language Mapping at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping\&.html
|
||||
|
||||
When the \f3-idl\fR option is used, other options also include:
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-always\fR or \f3-alwaysgenerate\fR options force regeneration even when existing stubs/ties/IDL are newer than the input class\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-factory\fR option uses the \f3factory\fR keyword in generated IDL\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-idlModule\fR from J\f3avaPackage[\&.class]\fR\f3toIDLModule\fR specifies \f3IDLEntity\fR package mapping, for example: \f3-idlModule\fR\f3my\&.module my::real::idlmod\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\f3-idlFile\fR\f3fromJavaPackage[\&.class] toIDLFile\fR specifies \f3IDLEntity\fR file mapping, for example: \f3-idlFile test\&.pkg\&.X TEST16\&.idl\fR\&.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
-iiop
|
||||
.br
|
||||
Causes the \f3rmic\fR command to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes\&. A stub class is a local proxy for a remote object and is used by clients to send calls to a server\&. Each remote interface requires a stub class, which implements that remote interface\&. A client reference to a remote object is a reference to a stub\&. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class\&. Each implementation class requires a tie class\&.
|
||||
|
||||
If you call the \f3rmic\fR command with the \f3-iiop\fR, then it generates stubs and ties that conform to this naming convention:
|
||||
.sp
|
||||
.nf
|
||||
\f3_<implementationName>_stub\&.class\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3_<interfaceName>_tie\&.class\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
When you use the \f3-iiop\fR option, other options also include:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-always\fR or \f3-alwaysgenerate\fR options force regeneration even when existing stubs/ties/IDL are newer than the input class\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-nolocalstubs\fR option means do not create stubs optimized for same-process clients and servers\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-noValueMethods\fR option must be used with the \f3-idl\fR option\&. The \f3-noValueMethods\fR option prevents the addition of \f3valuetype\fR methods and initializers to emitted IDL\&. These methods and initializers are optional for valuetypes, and are generated unless the \f3-noValueMethods\fR option is specified with the \f3-idl\fR option\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-poa\fR option changes the inheritance from \f3org\&.omg\&.CORBA_2_3\&.portable\&.ObjectImpl\fR to \f3org\&.omg\&.PortableServer\&.Servant\fR\&. The \f3PortableServer\fR module for the Portable Object Adapter (POA) defines the native \f3Servant\fR type\&. In the Java programming language, the \f3Servant\fR type is mapped to the \f3Java org\&.omg\&.PortableServer\&.Servant\fR class\&. It serves as the base class for all POA servant implementations and provides a number of methods that can be called by the application programmer, and methods that are called by the POA and that can be overridden by the user to control aspects of servant behavior\&. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2\&.3\&.1 ptc/00-01-08\&.pdf\&..RE
|
||||
|
||||
.TP
|
||||
-J
|
||||
.br
|
||||
Used with any Java command, the \f3-J\fR option passes the argument that follows the \f3-J\fR (no spaces between the \f3-J\fRand the argument) to the Java interpreter
|
||||
.TP
|
||||
-keep or -keepgenerated
|
||||
.br
|
||||
Retains the generated \f3\&.java\fR source files for the stub, skeleton, and tie classes and writes them to the same directory as the\f3\&.class\fR files\&.
|
||||
.TP
|
||||
-nowarn
|
||||
.br
|
||||
Turns off warnings\&. When the \f3-nowarn\fR options is used\&. The compiler does not print out any warnings\&.
|
||||
.TP
|
||||
-nowrite
|
||||
.br
|
||||
Does not write compiled classes to the file system\&.
|
||||
.TP
|
||||
-vcompat (deprecated)
|
||||
.br
|
||||
Generates stub and skeleton classes that are compatible with both the 1\&.1 and 1\&.2 JRMP stub protocol versions\&. This option was the default in releases before 5\&.0\&. The generated stub classes use the 1\&.1 stub protocol version when loaded in a JDK 1\&.1 virtual machine and use the 1\&.2 stub protocol version when loaded into a 1\&.2 (or later) virtual machine\&. The generated skeleton classes support both 1\&.1 and 1\&.2 stub protocol versions\&. The generated classes are relatively large to support both modes of operation\&. Note: This option has been deprecated\&. See Description\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded\&.
|
||||
.TP
|
||||
-v1\&.1 (deprecated)
|
||||
.br
|
||||
Generates stub and skeleton classes for the 1\&.1 JRMP stub protocol version only\&. The \f3-v1\&.1\fR option is only useful for generating stub classes that are serialization-compatible with preexisting, statically deployed stub classes that were generated by the \f3rmic\fR command from JDK 1\&.1 and that cannot be upgraded (and dynamic class loading is not being used)\&. Note: This option has been deprecated\&. See Description\&.
|
||||
.TP
|
||||
-v1\&.2 (deprecated)
|
||||
.br
|
||||
(Default) Generates stub classes for the 1\&.2 JRMP stub protocol version only\&. No skeleton classes are generated because skeleton classes are not used with the 1\&.2 stub protocol version\&. The generated stub classes do not work when they are loaded into a JDK 1\&.1 virtual machine\&. Note: This option has been deprecated\&. See Description\&.
|
||||
.SH ENVIRONMENT\ VARIABLES
|
||||
.TP
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example,
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
java(1), javac(1),
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath
|
||||
.LP
|
||||
|
||||
Used to provide the system a path to user-defined classes\&. Directories are separated by colons, for example: \f3\&.:/usr/local/java/classes\fR\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javac(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Setting the Class Path
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,328 +1,315 @@
|
||||
." Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH rmid 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Remote Method Invocation (RMI) Tools
|
||||
.\" Title: rmid.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH rmid 1 "21 November 2013" "JDK 8" "Remote Method Invocation (RMI) Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmid \- The Java RMI Activation System Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fP starts the activation system daemon that allows objects to be registered and activated in a virtual machine (VM).
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid [options]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
rmid \- Starts the activation system daemon that enables objects to be registered and activated in a Java Virtual Machine (JVM)\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmid\fP tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a VM. See the
|
||||
.na
|
||||
\f2Java RMI Specification\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.html and
|
||||
.na
|
||||
\f2Activation tutorials\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects.
|
||||
.LP
|
||||
.LP
|
||||
The daemon can be started by executing the \f2rmid\fP command, and specifying a security policy file, as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3Note:\fP When running Sun's implementation of \f2rmid\fP, by default you will need to specify a security policy file so that \f2rmid\fP can verify whether or not the information in each \f2ActivationGroupDesc\fP is allowed to be used to launch a VM for an activation group. Specifically, the command and options specified by the \f2CommandEnvironment\fP and any \f2Properties\fP passed to an \f2ActivationGroupDesc\fP's constructor must now be explicitly allowed in the security policy file for \f2rmid\fP. The value of the \f2sun.rmi.activation.execPolicy\fP property dictates the policy that \f2rmid\fP uses to determine whether or not the information in an \f2ActivationGroupDesc\fP may be used to launch a VM for an activation group.
|
||||
.LP
|
||||
.LP
|
||||
Executing \f2rmid\fP by default
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
starts the Activator and an internal registry on the default port, 1098, and
|
||||
.TP 2
|
||||
o
|
||||
binds an \f2ActivationSystem\fP to the name \f2java.rmi.activation.ActivationSystem\fP in this internal registry.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To specify an alternate port for the registry, you must specify the \f2\-port\fP option when starting up \f2rmid\fP. For example,
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy \-port 1099
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
starts the activation system daemon and a registry on the registry's default port, 1099.
|
||||
.LP
|
||||
.SS
|
||||
Starting rmid from inetd/xinetd
|
||||
.LP
|
||||
.LP
|
||||
An alternative to starting \f2rmid\fP from the command line is to configure \f2inetd\fP (Solaris) or \f2xinetd\fP (Bsd) to start \f2rmid\fP on demand.
|
||||
.LP
|
||||
.LP
|
||||
When \f2rmid\fP starts up, it attempts to obtain an inherited channel (inherited from \f2inetd\fP/\f2xinetd\fP) by invoking the \f2System.inheritedChannel\fP method. If the inherited channel is \f2null\fP or not an instance of \f2java.nio.channels.ServerSocketChannel\fP, then \f2rmid\fP assumes that it was not started by \f2inetd\fP/\f2xinetd\fP, and it starts up as described above.
|
||||
.LP
|
||||
.LP
|
||||
If the inherited channel is a \f2ServerSocketChannel\fP instance, then \f2rmid\fP uses the \f2java.net.ServerSocket\fP obtained from the \f2ServerSocketChannel\fP as the server socket that accepts requests for the remote objects it exports, namely the registry in which the \f2java.rmi.activation.ActivationSystem\fP is bound and the \f2java.rmi.activation.Activator\fP remote object. In this mode, \f2rmid\fP behaves the same as when it is started from the command line, \f2except\fP:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Output printed to \f2System.err\fP is redirected to a file. This file is located in the directory specified by the \f2java.io.tmpdir\fP system property (typically \f2/var/tmp\fP or \f2/tmp\fP) with the prefix \f2"rmid\-err"\fP and the suffix \f2"tmp"\fP.
|
||||
.TP 2
|
||||
o
|
||||
The \f2\-port\fP option is disallowed. If this option is specified, \f2rmid\fP will exit with an error message.
|
||||
.TP 2
|
||||
o
|
||||
The \f2\-log\fP option is required. If this option is not specified, \f2rmid\fP will exit with an error message.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
See the man pages for \f2inetd\fP (Solaris) or \f2xinetd\fP (Bsd) for details on how to configure services to be started on demand.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-C<someCommandLineOption>
|
||||
Specifies an option that is passed as a command\-line argument to each child process (activation group) of \f2rmid\fP when that process is created. For example, you could pass a property to each virtual machine spawned by the activation system daemon:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Dsome.property=value
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
This ability to pass command\-line arguments to child processes can be useful for debugging. For example, the following command:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
will enable server\-call logging in all child VMs.
|
||||
.LP
|
||||
.TP 3
|
||||
\-J<someCommandLineOption>
|
||||
Specifies an option that is passed to the \f2java\fP interpreter running \f2rmid\fP. For example, to specify that \f2rmid\fP use a policy file named \f2rmid.policy\fP, the \f2\-J\fP option can be used to define the \f2java.security.policy\fP property on \f2rmid\fP's command line, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-J\-Dsun.rmi.activation.execPolicy=<policy>
|
||||
Specifies the policy that \f2rmid\fP employs to check commands and command\-line options used to launch the VM in which an activation group runs. Please note that this option exists only in Sun's implementation of the Java RMI activation daemon. If this property is not specified on the command line, the result is the same as if \f2\-J\-Dsun.rmi.activation.execPolicy=default\fP were specified. The possible values of \f2<policy>\fP can be \f2default\fP, \f2<policyClassName>\fP, or \f2none\fP:
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3default (or if this property is \fP\f4unspecified\fP\f3)\fP
|
||||
.LP
|
||||
The default \f2execPolicy\fP allows \f2rmid\fP to execute commands with specific command\-line options only if \f2rmid\fP has been granted permission to execute those commands and options in the security policy file that \f2rmid\fP uses. Only the default activation group implementation can be used with the \f2default\fP execution policy.
|
||||
.LP
|
||||
\f2rmid\fP launches a VM for an activation group using the information in the group's registered activation group descriptor, an \f2ActivationGroupDesc\fP. The group descriptor specifies an optional \f2ActivationGroupDesc.CommandEnvironment\fP which includes the \f2command\fP to execute to start the activation group as well as any command line \f2options\fP to be added to the command line. By default, \f2rmid\fP uses the \f2java\fP command found in \f2java.home\fP. The group descriptor also contains \f2properties\fP overrides that are added to the command line as options defined as:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-D\fP\f4<property>\fP\f3=\fP\f4<value>\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.LP
|
||||
The permission \f2com.sun.rmi.rmid.ExecPermission\fP is used to grant \f2rmid\fP permission to execute a command, specified in the group descriptor's \f2CommandEnvironment\fP to launch an activation group. The permission \f2com.sun.rmi.rmid.ExecOptionPermission\fP is used to allow \f2rmid\fP to use command\-line options, specified as properties overrides in the group descriptor or as options in the \f2CommandEnvironment\fP, when launching the activation group.
|
||||
.LP
|
||||
When granting \f2rmid\fP permission to execute various commands and options, the permissions \f2ExecPermission\fP and \f2ExecOptionPermission\fP need to be granted universally (i.e., granted to all code sources).
|
||||
.RS 3
|
||||
.TP 3
|
||||
ExecPermission
|
||||
The \f2ExecPermission\fP class represents permission for \f2rmid\fP to execute a specific \f2command\fP to launch an activation group.
|
||||
.LP
|
||||
\f3Syntax\fP
|
||||
\fBrmid\fR [\fIoptions\fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3rmid\fR command starts the activation system daemon\&. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a JVM\&. For details on how to write programs that use activatable objects, the \fIUsing Activation\fR tutorial at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/rmi/activation/overview\&.html
|
||||
.PP
|
||||
Start the daemon by executing the \f3rmid\fR command and specifying a security policy file, as follows:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-J\-Djava\&.security\&.policy=rmid\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
When you run Oracle\(cqs implementation of the \f3rmid\fR command, by default you must specify a security policy file so that the \f3rmid\fR command can verify whether or not the information in each \f3ActivationGroupDesc\fR is allowed to be used to start a JVM for an activation group\&. Specifically, the command and options specified by the \f3CommandEnvironment\fR and any properties passed to an \f3ActivationGroupDesc\fR constructor must now be explicitly allowed in the security policy file for the \f3rmid\fR command\&. The value of the \f3sun\&.rmi\&.activation\&.execPolicy\fR property dictates the policy that the \f3rmid\fR command uses to determine whether or not the information in an \f3ActivationGroupDesc\fR can be used to start a JVM for an activation group\&. For more information see the description of the -J-Dsun\&.rmi\&.activation\&.execPolicy=policy option\&.
|
||||
.PP
|
||||
Executing the \f3rmid\fR command starts the Activator and an internal registry on the default port1098 and binds an \f3ActivationSystem\fR to the name \f3java\&.rmi\&.activation\&.ActivationSystem\fR in this internal registry\&.
|
||||
.PP
|
||||
To specify an alternate port for the registry, you must specify the \f3-port\fR option when you execute the \f3rmid\fR command\&. For example, the following command starts the activation system daemon and a registry on the registry\&'s default port, 1099\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-J\-Djava\&.security\&.policy=rmid\&.policy \-port 1099\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH START\ RMID\ ON\ DEMAND
|
||||
An alternative to starting \f3rmid\fR from the command line is to configure \f3inetd\fR (Oracle Solaris) or \f3xinetd\fR (Linux) to start \f3rmid\fR on demand\&.
|
||||
.PP
|
||||
When RMID starts, it attempts to obtain an inherited channel (inherited from \f3inetd\fR/\f3xinetd\fR) by calling the \f3System\&.inheritedChannel\fR method\&. If the inherited channel is null or not an instance of \f3java\&.nio\&.channels\&.ServerSocketChannel\fR, then RMID assumes that it was not started by \f3inetd\fR/\f3xinetd\fR, and it starts as previously described\&.
|
||||
.PP
|
||||
If the inherited channel is a \f3ServerSocketChannel\fR instance, then RMID uses the \f3java\&.net\&.ServerSocket\fR obtained from the \f3ServerSocketChannel\fR as the server socket that accepts requests for the remote objects it exports: The registry in which the \f3java\&.rmi\&.activation\&.ActivationSystem\fR is bound and the \f3java\&.rmi\&.activation\&.Activator\fR remote object\&. In this mode, RMID behaves the same as when it is started from the command line, except in the following cases:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Output printed to \f3System\&.err\fR is redirected to a file\&. This file is located in the directory specified by the \f3java\&.io\&.tmpdir\fR system property (typically \f3/var/tmp\fR or \f3/tmp\fR) with the prefix \f3rmid-err\fR and the suffix \f3tmp\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-port\fR option is not allowed\&. If this option is specified, then RMID exits with an error message\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-log\fR option is required\&. If this option is not specified, then RMID exits with an error message
|
||||
.PP
|
||||
See the man pages for \f3inetd\fR (Oracle Solaris) or \f3xinetd\fR (Linux) for details on how to configure services to be started on demand\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-C\fIoption\fR
|
||||
.br
|
||||
The \f2name\fP of an \f2ExecPermission\fP is the path name of a command to grant \f2rmid\fP permission to execute. A path name that ends in "/*" indicates all the files contained in that directory (where "/" is the file\-separator character, \f2File.separatorChar\fP). A path name that ends with "/\-" indicates all files and subdirectories contained in that directory (recursively). A path name consisting of the special token "<<ALL FILES>>" matches \f3any\fP file.
|
||||
.LP
|
||||
\f3Note:\fP A path name consisting of a single "*" indicates all the files in the current directory, while a path name consisting of a single "\-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.
|
||||
.TP 3
|
||||
ExecOptionPermission
|
||||
The \f2ExecOptionPermission\fP class represents permission for \f2rmid\fP to use a specific command\-line \f2option\fP when launching an activation group. The \f2name\fP of an \f2ExecOptionPermission\fP is the value of a command line option.
|
||||
.LP
|
||||
\f3Syntax\fP
|
||||
Specifies an option that is passed as a command-line argument to each child process (activation group) of the \f3rmid\fR command when that process is created\&. For example, you could pass a property to each virtual machine spawned by the activation system daemon:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-C\-Dsome\&.property=value\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
This ability to pass command-line arguments to child processes can be useful for debugging\&. For example, the following command enables server-call logging in all child JVMs\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-C\-Djava\&.rmi\&.server\&.logCalls=true\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Options support a limited wildcard scheme. An asterisk signifies a wildcard match, and it may appear as the option name itself (i.e., it matches any option), or an asterisk may appear at the end of the option name only if the asterisk follows either a "." or "=".
|
||||
.LP
|
||||
For example: "*" or "\-Dfoo.*" or "\-Da.b.c=*" is valid, "*foo" or "\-Da*b" or "ab*" is not.
|
||||
.TP 3
|
||||
Policy file for rmid
|
||||
When granting \f2rmid\fP permission to execute various commands and options, the permissions \f2ExecPermission\fP and \f2ExecOptionPermission\fP need to be granted universally (i.e., granted to all code sources). It is safe to grant these permissions universally because only \f2rmid\fP checks these permissions.
|
||||
.LP
|
||||
An example policy file that grants various execute permissions to \f2rmid\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant {
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/java/jdk1.7.0/solaris/bin/java";
|
||||
.fl
|
||||
Specifies an option that is passed to the Java interpreter running RMID\&. For example, to specify that the \f3rmid\fR command use a policy file named \f3rmid\&.policy\fR, the \f3-J\fR option can be used to define the \f3java\&.security\&.policy\fR property on the \f3rmid\fR command line, for example:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-J\-Djava\&.security\&.policy\-rmid\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/rmidcmds/*";
|
||||
.fl
|
||||
.TP
|
||||
-J-Dsun\&.rmi\&.activation\&.execPolicy=\fIpolicy\fR
|
||||
.br
|
||||
Specifies the policy that RMID employs to check commands and command-line options used to start the JVM in which an activation group runs\&. Please note that this option exists only in Oracle\&'s implementation of the Java RMI activation daemon\&. If this property is not specified on the command line, then the result is the same as though \f3-J-Dsun\&.rmi\&.activation\&.execPolicy=default\fR were specified\&. The possible values of \f3policy\fR can be \f3default\fR, \f3policyClassName\fR, or \f3none\fR\&.
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
default
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.policy=/files/policies/group.policy";
|
||||
.fl
|
||||
The \f3default\fR or unspecified value \f3execPolicy\fR allows the \f3rmid\fR command to execute commands with specific command-line options only when the \f3rmid\fR command was granted permission to execute those commands and options in the security policy file that the \f3rmid\fR command uses\&. Only the default activation group implementation can be used with the default execution policy\&.
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.debug=*";
|
||||
.fl
|
||||
The \f3rmid\fR command starts a JVM for an activation group with the information in the group\&'s registered activation group descriptor, an \f3ActivationGroupDesc\fR\&. The group descriptor specifies an optional \f3ActivationGroupDesc\&.CommandEnvironment\fR that includes the command to execute to start the activation group and any command-line options to be added to the command line\&. By default, the \f3rmid\fR command uses the \f3java\fR command found in \f3java\&.home\fR\&. The group descriptor also contains properties overrides that are added to the command line as options defined as: \f3-D<property>=<value>\fR\&.The \f3com\&.sun\&.rmi\&.rmid\&.ExecPermission\fR permission grants the \f3rmid\fR command permission to execute a command that is specified in the group descriptor\&'s \f3CommandEnvironment\fR to start an activation group\&. The \f3com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fR permission enables the \f3rmid\fR command to use command-line options, specified as properties overrides in the group descriptor or as options in the \f3CommandEnvironment\fR when starting the activation group\&.When granting the \f3rmid\fR command permission to execute various commands and options, the permissions \f3ExecPermission\fR and \f3ExecOptionPermission\fR must be granted to all code sources\&.
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Dsun.rmi.*";
|
||||
.fl
|
||||
};
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The first permission granted allow \f2rmid\fP to execute the 1.7.0 version of the \f2java\fP command, specified by its explicit path name. Note that by default, the version of the \f2java\fP command found in \f2java.home\fP is used (the same one that \f2rmid\fP uses), and does not need to be specified in the policy file. The second permission allows \f2rmid\fP to execute any command in the directory \f2/files/apps/rmidcmds\fP.
|
||||
.LP
|
||||
The third permission granted, an \f2ExecOptionPermission\fP, allows \f2rmid\fP to launch an activation group that defines the security policy file to be \f2/files/policies/group.policy\fP. The next permission allows the \f2java.security.debug\fP property to be used by an activation group. The last permission allows any property in the \f2sun.rmi\fP property name hierarchy to be used by activation groups.
|
||||
.LP
|
||||
To start \f2rmid\fP with a policy file, the \f2java.security.policy\fP property needs to be specified on \f2rmid\fP's command line, for example:
|
||||
.LP
|
||||
\f2rmid \-J\-Djava.security.policy=rmid.policy\fP
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
\f4<policyClassName>\fP
|
||||
.LP
|
||||
If the default behavior is not flexible enough, an administrator can provide, when starting \f2rmid\fP, the name of a class whose \f2checkExecCommand\fP method is executed in order to check commands to be executed by rmid.
|
||||
.LP
|
||||
The \f2policyClassName\fP specifies a public class with a public, no\-argument constructor and an implementation of the following \f2checkExecCommand\fP method:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
public void checkExecCommand(ActivationGroupDesc desc,
|
||||
.fl
|
||||
String[] command)
|
||||
.fl
|
||||
throws SecurityException;
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
Before launching an activation group, \f2rmid\fP calls the policy's \f2checkExecCommand\fP method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the \f2checkExecCommand\fP throws a \f2SecurityException\fP, \f2rmid\fP will not launch the activation group and an \f2ActivationException\fP will be thrown to the caller attempting to activate the object.
|
||||
.TP 2
|
||||
o
|
||||
\f3none\fP
|
||||
.LP
|
||||
If the \f2sun.rmi.activation.execPolicy\fP property value is "none", then \f2rmid\fP will not perform any validation of commands to launch activation groups.
|
||||
.RE
|
||||
.LP
|
||||
.TP 3
|
||||
\-log dir
|
||||
Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, \f2log\fP, in the directory in which the \f2rmid\fP command was executed.
|
||||
.LP
|
||||
.TP 3
|
||||
\-port port
|
||||
Specifies the port \f2rmid\fP's registry uses. The activation system daemon binds the \f2ActivationSystem\fP, with the name \f2java.rmi.activation.ActivationSystem\fP, in this registry. Thus, the \f2ActivationSystem\fP on the local machine can be obtained using the following \f2Naming.lookup\fP method call:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.rmi.*;
|
||||
.fl
|
||||
import java.rmi.activation.*;
|
||||
.fl
|
||||
\fIExecPermission\fR
|
||||
|
||||
.fl
|
||||
ActivationSystem system; system = (ActivationSystem)
|
||||
.fl
|
||||
Naming.lookup("//:\fP\f4port\fP/java.rmi.activation.ActivationSystem");
|
||||
.fl
|
||||
.fi
|
||||
.TP 3
|
||||
\-stop
|
||||
Stops the current invocation of \f2rmid\fP, for a port specified by the \f2\-port\fP option. If no port is specified, it will stop the \f2rmid\fP running on port 1098.
|
||||
.RE
|
||||
The \f3ExecPermission\fR class represents permission for the \f3rmid\fR command to execute a specific command to start an activation group\&.
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\fISyntax\fR: The name of an \f3ExecPermission\fR is the path name of a command to grant the \f3rmid\fR command permission to execute\&. A path name that ends in a slash (/) and an asterisk (*) indicates that all of the files contained in that directory where slash is the file-separator character, \f3File\&.separatorChar\fR\&. A path name that ends in a slash (/) and a minus sign (-) indicates all files and subdirectories contained in that directory (recursively)\&. A path name that consists of the special token \f3<<ALL FILES>>\fR matches any file\&.
|
||||
|
||||
A path name that consists of an asterisk (*) indicates all the files in the current directory\&. A path name that consists of a minus sign (-) indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory\&.
|
||||
|
||||
\fIExecOptionPermission\fR
|
||||
|
||||
The \f3ExecOptionPermission\fR class represents permission for the \f3rmid\fR command to use a specific command-line option when starting an activation group\&. The name of an \f3ExecOptionPermission\fR is the value of a command-line option\&.
|
||||
|
||||
\fISyntax\fR: Options support a limited wild card scheme\&. An asterisk signifies a wild card match, and it can appear as the option name itself (matches any option), or an asterisk (*) can appear at the end of the option name only when the asterisk (*) follows a dot (\&.) or an equals sign (=)\&.
|
||||
|
||||
For example: \f3*\fR or \f3-Dmydir\&.*\fR or \f3-Da\&.b\&.c=*\fR is valid, but \f3*mydir\fR or \f3-Da*b\fR or \f3ab*\fR is not\&.
|
||||
|
||||
\fIPolicy file for rmid\fR
|
||||
|
||||
When you grant the \f3rmid\fR command permission to execute various commands and options, the permissions \f3ExecPermission\fR and \f3ExecOptionPermission\fR must be granted to all code sources (universally)\&. It is safe to grant these permissions universally because only the \f3rmid\fR command checks these permissions\&.
|
||||
|
||||
An example policy file that grants various execute permissions to the \f3rmid\fR command is:
|
||||
.sp
|
||||
.nf
|
||||
\f3grant {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "/files/apps/java/jdk1\&.7\&.0/solaris/bin/java";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "/files/apps/rmidcmds/*";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "\-Djava\&.security\&.policy=/files/policies/group\&.policy";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "\-Djava\&.security\&.debug=*";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "\-Dsun\&.rmi\&.*";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
The first permission granted allows the \f3rmid\fR tcommand o execute the 1\&.7\&.0 release of the \f3java\fR command, specified by its explicit path name\&. By default, the version of the \f3java\fR command found in \f3java\&.home\fR is used (the same one that the \f3rmid\fR command uses), and does not need to be specified in the policy file\&. The second permission allows the \f3rmid\fR command to execute any command in the directory \f3/files/apps/rmidcmds\fR\&.
|
||||
|
||||
The third permission granted, an \f3ExecOptionPermission\fR, allows the \f3rmid\fR command to start an activation group that defines the security policy file to be \f3/files/policies/group\&.policy\fR\&. The next permission allows the \f3java\&.security\&.debug property\fR to be used by an activation group\&. The last permission allows any property in the \f3sun\&.rmi property\fR name hierarchy to be used by activation groups\&.
|
||||
|
||||
To start the \f3rmid\fR command with a policy file, the \f3java\&.security\&.policy\fR property needs to be specified on the \f3rmid\fR command line, for example:
|
||||
|
||||
\f3rmid -J-Djava\&.security\&.policy=rmid\&.policy\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
<policyClassName>
|
||||
|
||||
If the default behavior is not flexible enough, then an administrator can provide, when starting the \f3rmid\fR command, the name of a class whose \f3checkExecCommand\fR method is executed to check commands to be executed by the \f3rmid\fR command\&.
|
||||
|
||||
The \f3policyClassName\fR specifies a public class with a public, no-argument constructor and an implementation of the following \f3checkExecCommand\fR method:
|
||||
.sp
|
||||
.nf
|
||||
\f3 public void checkExecCommand(ActivationGroupDesc desc, String[] command)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 throws SecurityException;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
Before starting an activation group, the \f3rmid\fR command calls the policy\&'s \f3checkExecCommand\fR method and passes to it the activation group descriptor and an array that contains the complete command to start the activation group\&. If the \f3checkExecCommand\fR throws a \f3SecurityException\fR, then the \f3rmid\fR command does not start the activation group and an \f3ActivationException\fR is thrown to the caller attempting to activate the object\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
none
|
||||
|
||||
If the \f3sun\&.rmi\&.activation\&.execPolicy\fR property value is \f3none\fR, then the \f3rmid\fR command does not perform any validation of commands to start activation groups\&.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
-log \fIdir\fR
|
||||
.br
|
||||
Specifies the name of the directory the activation system daemon uses to write its database and associated information\&. The log directory defaults to creating a log, in the directory in which the \f3rmid\fR command was executed\&.
|
||||
.TP
|
||||
-port \fIport\fR
|
||||
.br
|
||||
Specifies the port the registry uses\&. The activation system daemon binds the \f3ActivationSystem\fR, with the name \f3java\&.rmi\&.activation\&.ActivationSystem\fR, in this registry\&. The \f3ActivationSystem\fR on the local machine can be obtained using the following \f3Naming\&.lookup\fR method call:
|
||||
.sp
|
||||
.nf
|
||||
\f3import java\&.rmi\&.*; \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 import java\&.rmi\&.activation\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ActivationSystem system; system = (ActivationSystem)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Naming\&.lookup("//:port/java\&.rmi\&.activation\&.ActivationSystem");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-stop
|
||||
.br
|
||||
Stops the current invocation of the \f3rmid\fR command for a port specified by the \f3-port\fR option\&. If no port is specified, then this option stops the \f3rmid\fR invocation running on port 1098\&.
|
||||
.SH ENVIRONMENT\ VARIABLES
|
||||
.TP
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
rmic(1),
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath, java(1)
|
||||
.LP
|
||||
|
||||
Used to provide the system a path to user-defined classes\&. Directories are separated by colons, for example: \f3\&.:/usr/local/java/classes\fR\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Setting the Class Path
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,83 +1,99 @@
|
||||
." Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH rmiregistry 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Remote Method Invocation (RMI) Tools
|
||||
.\" Title: rmiregistry.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH rmiregistry 1 "21 November 2013" "JDK 8" "Remote Method Invocation (RMI) Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmiregistry \- The Java Remote Object Registry
|
||||
.LP
|
||||
.RS 3
|
||||
The \f3rmiregistry\fP command starts a remote object registry on the specified port on the current host.
|
||||
.RE
|
||||
.SH NAME
|
||||
rmiregistry \- Starts a remote object registry on the specified port on the current host\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry [\fP\f4port\fP\f3]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmiregistry\fP command creates and starts a remote object registry on the specified \f2port\fP on the current host. If \f2port\fP is omitted, the registry is started on port 1099. The \f3rmiregistry\fP command produces no output and is typically run in the background. For example:
|
||||
.LP
|
||||
.LP
|
||||
\f2rmiregistry &\fP
|
||||
.LP
|
||||
.LP
|
||||
A remote object registry is a bootstrap naming service that is used by RMI servers on the same host to bind remote objects to names. Clients on local and remote hosts can then look up remote objects and make remote method invocations.
|
||||
.LP
|
||||
.LP
|
||||
The registry is typically used to locate the first remote object on which an application needs to invoke methods. That object in turn will provide application\-specific support for finding other objects.
|
||||
.LP
|
||||
.LP
|
||||
The methods of the \f2java.rmi.registry.LocateRegistry\fP class are used to get a registry operating on the local host or local host and port.
|
||||
.LP
|
||||
.LP
|
||||
The URL\-based methods of the \f2java.rmi.Naming\fP class operate on a registry and can be used to look up a remote object on any host, and on the local host: bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-J
|
||||
Used in conjunction with any \f2java\fP option, it passes the option following the \f2\-J\fP (no spaces between the \-J and the option) on to the \f2java\fP interpreter.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
java(1),
|
||||
.na
|
||||
\f2java.rmi.registry.LocateRegistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/java/rmi/registry/LocateRegistry.html and
|
||||
.na
|
||||
\f2java.rmi.Naming\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/java/rmi/Naming.html
|
||||
\fBrmiregistry\fR [ \fIport\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIport\fR
|
||||
The number of a \f3port\fR on the current host at which to start the remote object registry\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3rmiregistry\fR command creates and starts a remote object registry on the specified port on the current host\&. If the port is omitted, then the registry is started on port 1099\&. The \f3rmiregistry\fR command produces no output and is typically run in the background, for example:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry &\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
A remote object registry is a bootstrap naming service that is used by RMI servers on the same host to bind remote objects to names\&. Clients on local and remote hosts can then look up remote objects and make remote method invocations\&.
|
||||
.PP
|
||||
The registry is typically used to locate the first remote object on which an application needs to call methods\&. That object then provides application-specific support for finding other objects\&.
|
||||
.PP
|
||||
The methods of the \f3java\&.rmi\&.registry\&.LocateRegistry\fR class are used to get a registry operating on the local host or local host and port\&.
|
||||
.PP
|
||||
The URL-based methods of the \f3java\&.rmi\&.Naming\fR class operate on a registry and can be used to look up a remote object on any host and on the local host\&. Bind a simple name (string) to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URL bound in the registry\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-J
|
||||
.br
|
||||
Used with any Java option to pass the option following the \f3-J\fR (no spaces between the \f3-J\fR and the option) to the Java interpreter\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\f3java\&.rmi\&.registry\&.LocateRegistry\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/rmi/registry/LocateRegistry\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\f3java\&.rmi\&.Naming class description\fR at http://docs\&.oracle\&.com/javase/8/docs/api/java/rmi/Naming\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,127 +1,122 @@
|
||||
." Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH schemagen 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Web Services Tools
|
||||
.\" Title: schemagen.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH schemagen 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
schemagen \- Java(TM) Architecture for XML Binding Schema Generator
|
||||
.LP
|
||||
.LP
|
||||
\f3Specification Version:\fP 2.1
|
||||
.SH NAME
|
||||
schemagen \- Generates a schema for every name space that is referenced in your Java classes\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBschemagen\fR [ \fIoptions\fR ] \fIjava\-files\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIjava-files\fR
|
||||
The Java class files to be processed\&.
|
||||
.SH DESCRIPTION
|
||||
The schema generator creates a schema file for each name space referenced in your Java classes\&. Currently, you cannot control the name of the generated schema files\&. To control the schema file names, see Using SchemaGen with Ant at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/schemagenTask\&.html
|
||||
.PP
|
||||
Start the schema generator with the appropriate \f3schemagen\fR shell script in the bin directory for your platform\&. The current schema generator can process either Java source files or class files\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3schemagen\&.sh Foo\&.java Bar\&.java \&.\&.\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Note: Writing schema1\&.xsd\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
If your java files reference other classes, then those classes must be accessible on your system \f3CLASSPATH\fR environment variable, or they need to be specified in the \f3schemagen\fR command line with the class path options\&. See Options\&. If the referenced files are not accessible or specified, then you get errors when you generate the schema\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-d \fIpath\fR
|
||||
.br
|
||||
\f3Implementation Version:\fP 2.1.3
|
||||
.LP
|
||||
.SH "Launching schemagen"
|
||||
.LP
|
||||
.LP
|
||||
The schema generator can be launched using the appropriate \f2schemagen\fP shell script in the \f2bin\fP directory for your platform.
|
||||
.LP
|
||||
.LP
|
||||
The current schema generator can process either Java source files or class files.
|
||||
.LP
|
||||
.LP
|
||||
We also provide an Ant task to run the schema generator \- see the instructions for
|
||||
.na
|
||||
\f2using schemagen with Ant\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% schemagen.sh Foo.java Bar.java ...
|
||||
.fl
|
||||
Note: Writing schema1.xsd
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need to be given to the tool by using the \f2\-classpath\fP/\f2\-cp\fP options. Otherwise you will see errors when generating your schema.
|
||||
.LP
|
||||
.SS
|
||||
Command Line Options
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Usage: schemagen [\-options ...] <java files>
|
||||
.fl
|
||||
|
||||
.fl
|
||||
Options:
|
||||
.fl
|
||||
\-d <path> : specify where to place processor and javac generated class files
|
||||
.fl
|
||||
\-cp <path> : specify where to find user specified files
|
||||
.fl
|
||||
\-classpath <path> : specify where to find user specified files
|
||||
.fl
|
||||
\-encoding <encoding> : specify encoding to be used for apt/javac invocation
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\-episode <file> : generate episode file for separate compilation
|
||||
.fl
|
||||
\-version : display version information
|
||||
.fl
|
||||
\-help : display this usage message
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "Generated Resource Files"
|
||||
.LP
|
||||
.LP
|
||||
The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control the name of the generated schema files at this time. For that purpose, use
|
||||
.na
|
||||
\f2the schema generator ant task\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html.
|
||||
.LP
|
||||
.SH "Name"
|
||||
See Also
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Running the schema generator (schemagen): [
|
||||
.na
|
||||
\f2command\-line instructions\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagen.html,
|
||||
.na
|
||||
\f2using the SchemaGen Ant task\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/schemagenTask.html]
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Architecture for XML Binding (JAXB)\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/xml/jaxb/index.html
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
The location where the \f3schemagen\fR command places processor-generated and \f3javac\fR-generated class files\&.
|
||||
.TP
|
||||
-cp \fIpath\fR
|
||||
.br
|
||||
The location where the \f3schemagen\fR command places user-specified files\&.
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
The location where the \f3schemagen\fR command places user-specified files\&.
|
||||
.TP
|
||||
-encoding \fIencoding\fR
|
||||
.br
|
||||
Specifies the encoding to use for \f3apt\fR or \f3javac\fR command invocations\&.
|
||||
.TP
|
||||
-episode \fIfile\fR
|
||||
.br
|
||||
Generates an episode file for separate compilation\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Displays release information\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Using SchemaGen with Ant at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/schemagenTask\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Java Architecture for XML Binding (JAXB) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/xml/jaxb/index\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,97 +1,111 @@
|
||||
." Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH serialver 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Remote Method Invocation (RMI) Tools
|
||||
.\" Title: serialver.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH serialver 1 "21 November 2013" "JDK 8" "Remote Method Invocation (RMI) Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
serialver \- The Serial Version Command
|
||||
.LP
|
||||
.LP
|
||||
The \f3serialver\fP command returns the \f2serialVersionUID\fP.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3serialver\fP [ options ] [ classnames ]
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options, as specified in this document.
|
||||
.TP 3
|
||||
classnames
|
||||
One or more class names
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3serialver\fP returns the \f2serialVersionUID\fP for one or more classes in a form suitable for copying into an evolving class. When invoked with no arguments it prints a usage line.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-classpath <directories and zip/jar files separated by :>
|
||||
Set search path for application classes and resources.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-show
|
||||
Displays a simple user interface. Enter the full class name and press either the Enter key or the Show button to display the serialVersionUID.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
The \f3serialver\fP command loads and initializes the specified classes in its virtual machine, and by default, it does not set a security manager. If \f3serialver\fP is to be run with untrusted classes, a security manager can be set with the following option:
|
||||
.LP
|
||||
.LP
|
||||
\f2\-J\-Djava.security.manager\fP
|
||||
.LP
|
||||
.LP
|
||||
and, if necessary, a security policy can be specified with the following option:
|
||||
.LP
|
||||
.LP
|
||||
\f2\-J\-Djava.security.policy=<policy file>\fP
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
.na
|
||||
\f2java.io.ObjectStreamClass\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/java/io/ObjectStreamClass.html
|
||||
.LP
|
||||
.SH NAME
|
||||
serialver \- Returns the serial version UID for specified classes\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBserialver\fR [ \fIoptions\fR ] [ \fIclassnames\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclassnames\fR
|
||||
The classes for which the \f3serialVersionUID\fR is to be returned\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3serialver\fR command returns the \f3serialVersionUID\fR for one or more classes in a form suitable for copying into an evolving class\&. When called with no arguments, the \f3serialver\fR command prints a usage line\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-classpath \fIpath-files\fR
|
||||
.br
|
||||
Sets the search path for application classes and resources\&. Separate classes and resources with a colon (:)\&.
|
||||
.TP
|
||||
-show
|
||||
.br
|
||||
Displays a simple user interface\&. Enter the full class name and press either the \fIEnter\fR key or the \fIShow\fR button to display the \f3serialVersionUID\fR\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where option is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH NOTES
|
||||
The \f3serialver\fR command loads and initializes the specified classes in its virtual machine, and by default, it does not set a security manager\&. If the \f3serialver\fR command is to be run with untrusted classes, then a security manager can be set with the following option:
|
||||
.sp
|
||||
.nf
|
||||
\f3\-J\-Djava\&.security\&.manager\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
When necessary, a security policy can be specified with the following option:
|
||||
.sp
|
||||
.nf
|
||||
\f3\-J\-Djava\&.security\&.policy=<policy file>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
policytool(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3java\&.io\&.ObjectStream\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/io/ObjectStreamClass\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,113 +1,138 @@
|
||||
." Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH servertool 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java IDL and RMI-IIOP Tools
|
||||
.\" Title: servertool.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH servertool 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
servertool \- The Java(TM) IDL Server Tool
|
||||
.LP
|
||||
\f3servertool\fP provides a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server.
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort \fP\f4nameserverport\fP\f3 \fP\f3options\fP\f3 [ \fP\f3commands\fP\f3 ]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
servertool \- Provides an easy-to-use interface for developers to register, unregister, start up, and shut down a persistent server\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If you did not enter a command when starting \f2servertool\fP, the command\-line tool displays with a \f2servertool >\fP prompt. Enter commands at the \f2servertool >\fP prompt.
|
||||
.LP
|
||||
.LP
|
||||
If you enter a command when starting \f2servertool\fP, the Java IDL Server Tool starts, runs the command, and exits.
|
||||
.LP
|
||||
.LP
|
||||
The \f2\-ORBInitialPort\fP \f2nameserverport\fP option is \f3required\fP. The value for \f2nameserverport\fP must specify the port on which \f2orbd\fP is running and listening for incoming requests. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024 for the \f2nameserverport\fP.
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP provides the command\-line interface for the application programmers to register, unregister, startup, and shutdown a persistent server. Other commands are provided to obtain various statistical information about the server.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialHost nameserverhost
|
||||
Specifies the host machine on which the name server is running and listening for incoming requests. The \f2nameserverhost\fP defaults to \f2localhost\fP if this option is not specified. If \f2orbd\fP and \f2servertool\fP are running on different machines, you must specify the name or IP address of the host on which \f2orbd\fP is running.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.RE
|
||||
\fBservertool\fR \-ORBInitialPort \fInameserverport\fR [ \fIoptions\fR ] [ \fIcommands \fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
commands
|
||||
The command-line commands\&. See Commands\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3servertool\fR command provides the command-line interface for developers to register, unregister, start up, and shut down a persistent server\&. Command-line commands let you obtain various statistical information about the server\&. See Commands\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-ORBInitialHost \fInameserverhost\fR
|
||||
.br
|
||||
This options is required\&. It specifies the host machine on which the name server runs and listens for incoming requests\&. The \f3nameserverhost\fR value must specify the port on which the \f3orb\fR is running and listening for requests\&. The value defaults to \f3localhost\fR when this option is not specified\&. If \f3orbd\fR and \f3servertool\fR are running on different machines, then you must specify the name or IP address of the host on which \f3orbd\fR is running\&.
|
||||
|
||||
.LP
|
||||
.SH "COMMANDS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
register \-server\ <server\ class\ name> \ \-classpath\ <classpath\ to\ server> [\ \-applicationName\ <application\ name> \-args\ <args\ to\ server> \-vmargs\ <flags\ to\ be\ passed\ to\ Java\ VM> \ ]
|
||||
Register a new persistent server with the Object Request Broker Daemon (ORBD). If the server is not already registered, it is registered and activated. This command causes an install method to be invoked in the main class of the server identified by the \f2\-server\fP option. The install method must be \f2public static void install(org.omg.CORBA.ORB)\fP. The install method is optional and enables the developer to provide their own server installation behavior (for example, creating database schema).
|
||||
.TP 3
|
||||
unregister \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Unregister a server from the ORBD by using either its server id or its application name. This command causes an uninstall method to be invoked in the main class of the server identified by the \f2\-server\fP option. The uninstall method must be \f2public static void uninstall(org.omg.CORBA.ORB)\fP. The uninstall method is optional and enables the developer to provide their own server uninstall behavior (for example, undoing the behavior of the install method).
|
||||
.TP 3
|
||||
getserverid \-applicationName\ <application\ name>
|
||||
Return the server id that corresponds with an application.
|
||||
.TP 3
|
||||
\fINote:\fR On Oracle Solaris, you must become a root user to start a process on a port below 1024\&. Oracle recommends that you use a port number above or equal to 1024 for the \f3nameserverport\fR value\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH COMMANDS
|
||||
You can start the \f3servertool\fR command with or without a command-line command\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
If you did not specify a command when you started \f3servertool\fR, then the command-line tool displays the \f3servertool\fR prompt where you can enter commands: \f3servertool >\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
If you specify a command when you start \f3servertool\fR, then the Java IDL Server Tool starts, executes the command, and exits\&.
|
||||
.TP
|
||||
.ll 180
|
||||
register -server \fIserver-class-name\fR -classpath \fIclasspath-to-server\fR [ -applicationName \fIapplication-name\fR -args \fIargs-to-server\fR -vmargs \fIflags-for-JVM\fR ]
|
||||
Registers a new persistent server with the Object Request Broker Daemon (ORBD)\&. If the server is not already registered, then it is registered and activated\&. This command causes an installation method to be called in the \f3main\fR class of the server identified by the \f3-server\fR option\&. The installation method must be \f3public static void install(org\&.omg\&.CORBA\&.ORB)\fR\&. The install method is optional and lets developers provide their own server installation behavior, such as creating a database schema\&.
|
||||
.TP
|
||||
.ll 180
|
||||
unregister -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR
|
||||
Unregisters a server from the ORBD with either its server ID or its application name\&. This command causes an uninstallation method to be called in the \f3main\fR class of the server identified by the \f3-server\fR option\&. The \f3uninstall\fR method must be \f3public static void uninstall(org\&.omg\&.CORBA\&.ORB)\fR\&. The \f3uninstall\fR method is optional and lets developers provide their own server uninstallation behavior, such as undoing the behavior of the \f3install\fR method\&.
|
||||
.TP
|
||||
getserverid -applicationName \fIapplication-name\fR
|
||||
Returns the server ID that corresponds to the \f3application-name\fR value\&.
|
||||
.TP
|
||||
list
|
||||
List information about all persistent servers registered with the ORBD.
|
||||
.TP 3
|
||||
Lists information about all persistent servers registered with the ORBD\&.
|
||||
.TP
|
||||
listappnames
|
||||
List the application names for all servers currently registered with the ORBD.
|
||||
.TP 3
|
||||
Lists the application names for all servers currently registered with the ORBD\&.
|
||||
.TP
|
||||
listactive
|
||||
List information about all persistent servers that have been launched by the ORBD and are currently running.
|
||||
.TP 3
|
||||
locate \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-endpointType\ <endpointType>\ ]
|
||||
Locate the endpoints (ports) of a specific type for all ORBs created by a registered server. If a server is not already running, it is activated. If an endpoint type is not specified, then the plain/non\-protected endpoint associated with each ORB in a server is returned.
|
||||
.TP 3
|
||||
locateperorb \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-orbid\ <ORB\ name>\ ]
|
||||
Locate all the endpoints (ports) registered by a specific ORB of registered server. If a server is not already running, then it is activated. If an \f2orbid\fP is not specified, the default value of "" is assigned to the \f2orbid\fP. If any ORBs are created with an \f2orbid\fP of empty string, all ports registered by it are returned.
|
||||
.TP 3
|
||||
orblist \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Lists the ORBId of the ORBs defined on a server. An ORBId is the string name for the ORB created by the server. If the server is not already running, it is activated.
|
||||
.TP 3
|
||||
shutdown \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Shutdown an active server that is registered with ORBD. During execution of this command, the \f2shutdown()\fP method defined in the class specified by either the \f2\-serverid\fP or \f2\-applicationName\fP parameter is also invoked to shutdown the server process appropriately.
|
||||
.TP 3
|
||||
startup \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Startup or activate a server that is registered with ORBD. If the server is not running, this command launches the server. If the server is already running, an error message is returned to the user.
|
||||
.TP 3
|
||||
Lists information about all persistent servers that were started by the ORBD and are currently running\&.
|
||||
.TP
|
||||
.ll 180
|
||||
locate -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR [ -endpointType \fIendpointType\fR ]
|
||||
Locates the endpoints (ports) of a specific type for all ORBs created by a registered server\&. If a server is not already running, then it is activated\&. If an \f3endpointType\fR value is not specified, then the plain/non-protected endpoint associated with each ORB in a server is returned\&.
|
||||
.TP
|
||||
.ll 180
|
||||
locateperorb -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR [ -orbid \fIORB-name\fR ]
|
||||
Locates all the endpoints (ports) registered by a specific Object Request Broker (ORB) of registered server\&. If a server is not already running, then it is activated\&. If an \f3orbid\fR is not specified, then the default value of \f3""\fR is assigned to the \f3orbid\fR\&. If any ORBs are created with an \f3orbid\fR of empty string, then all ports registered by it are returned\&.
|
||||
.TP
|
||||
orblist -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR
|
||||
Lists the \f3ORBId\fR of the ORBs defined on a server\&. An \f3ORBId\fR is the string name for the ORB created by the server\&. If the server is not already running, then it is activated\&.
|
||||
.TP
|
||||
shutdown -serverid \fIserver-id\fR | -applicationName application-name
|
||||
Shut down an active server that is registered with ORBD\&. During execution of this command, the \f3shutdown\fR method defined in the class specified by either the \f3-serverid\fR or \f3-applicationName\fR parameter is also called to shut down the server process\&.
|
||||
.TP
|
||||
startup -serverid \fIserver-id\fR | -applicationName application-name
|
||||
Starts up or activate a server that is registered with ORBD\&. If the server is not running, then this command starts the server\&. If the server is already running, then an error message is displayed\&.
|
||||
.TP
|
||||
help
|
||||
List all the commands available to the server through the server tool.
|
||||
.TP 3
|
||||
Lists all the commands available to the server through the \f3servertool\fR command\&.
|
||||
.TP
|
||||
quit
|
||||
Exit the server tool.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
Exits the \f3servertool\fR command\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
orbd(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,494 +1,489 @@
|
||||
." Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH tnameserv 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java IDL and RMI-IIOP Tools
|
||||
.\" Title: tnameserv.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH tnameserv 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
Java IDL: Transient Naming Service \- \f2tnameserv\fP
|
||||
.LP
|
||||
.LP
|
||||
This document discusses using the Java IDL Transient Naming Service, \f2tnameserv\fP. Java IDL also includes the Object Request Broker Daemon (ORBD). ORBD is a daemon process containing a Bootstrap Service, a Transient Naming Service, a \f3Persistent\fP Naming Service, and a Server Manager. The Java IDL tutorials all use ORBD, however, you can substitute \f2tnameserv\fP for \f2orbd\fP in any of the examples that use a Transient Naming Service. For documentation on the \f2orbd\fP tool, link to its orbd(1) or the
|
||||
.na
|
||||
\f2Java IDL Naming Service Included with ORBD\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html topic.
|
||||
.LP
|
||||
.LP
|
||||
Topics in this section include:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL Transient Naming Service
|
||||
.TP 2
|
||||
o
|
||||
Starting the Java\ IDL Transient Naming Service
|
||||
.TP 2
|
||||
o
|
||||
Stopping the Java\ IDL Transient Naming Service
|
||||
.TP 2
|
||||
o
|
||||
Sample Client: Adding Objects to the Namespace
|
||||
.TP 2
|
||||
o
|
||||
Sample Client: Browsing the Namespace
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Java\ IDL Transient Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
The CORBA COS (Common Object Services) Naming Service provides a tree\-like directory for object references much like a filesystem provides a directory structure for files. The Transient Naming Service provided with Java IDL, \f2tnameserv\fP, is a simple implementation of the COS Naming Service specification.
|
||||
.LP
|
||||
.LP
|
||||
Object references are stored in the namespace by name and each object reference\-name pair is called a name \f2binding\fP. Name bindings may be organized under \f2naming contexts\fP. Naming contexts are themselves name bindings and serve the same organizational function as a file system subdirectory. All bindings are stored under the \f2initial naming context\fP. The initial naming context is the only persistent binding in the namespace; the rest of the namespace is lost if the Java IDL naming service process halts and restarts.
|
||||
.LP
|
||||
.LP
|
||||
For an applet or application to use COS naming, its ORB must know the port of a host running a naming service or have access to a stringified initial naming context for that naming service. The naming service can either be the Java\ IDL naming service or another COS\-compliant naming service.
|
||||
.LP
|
||||
.SH "Starting the Java\ IDL Transient Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
You must start the Java\ IDL naming service before an application or applet that uses its naming service. Installation of the Java\ IDL product creates a script (Solaris: \f2tnameserv\fP) or executable file (Windows NT: \f2tnameserv.exe\fP) that starts the Java\ IDL naming service. Start the naming service so it runs in the background.
|
||||
.LP
|
||||
.LP
|
||||
If you do not specify otherwise, the Java\ IDL naming service listens on port 900 for the bootstrap protocol used to implement the ORB \f2resolve_initial_references()\fP and \f2list_initial_references()\fP methods, as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort \fP\f4nameserverport\fP\f3&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If you do not specify the name server port, port 900 is used by default. When running Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. To specify a different port, for example, 1050, and to run the naming service in the background, from a UNIX command shell, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Clients of the name server must be made aware of the new port number. Do this by setting the \f2org.omg.CORBA.ORBInitialPort\fP property to the new port number when creating the ORB object.
|
||||
.LP
|
||||
.SS
|
||||
Running the server and client on different hosts
|
||||
.LP
|
||||
.LP
|
||||
In most of the Java IDL and RMI\-IIOP tutorials, the Naming Service, Server, and Client are all running on the development machine. In real world deployment, it is likely that the client and server will run on different host machines than the Naming Service.
|
||||
.LP
|
||||
.LP
|
||||
For the client and server to find the Naming Service, they must be made aware of the port number and host on which the naming service is running. Do this by setting the \f2org.omg.CORBA.ORBInitialPort\fP and \f2org.omg.CORBA.ORBInitialHost\fP properties in the client and server files to the machine name and port number on which the Naming Service is running. An example of this is shown in
|
||||
.na
|
||||
\f2The Hello World Example Using RMI\-IIOP\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/rmi\-iiop/rmiiiopexample.html. You could also use the command line options \f2\-ORBInitialPort\fP \f2nameserverport#\fP and \f2\-ORBInitialHost\fP \f2nameserverhostname\fP to tell the client and server where to find the Naming Service.
|
||||
.na
|
||||
\f2Java IDL: Running the Hello World Example on TWO Machines\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/tutorial/jidl2machines.html shows one way of doing this using the command line option.
|
||||
.LP
|
||||
.LP
|
||||
For example, suppose the Transient Naming Service, \f2tnameserv\fP is running on port 1050 on host \f2nameserverhost\fP. The client is running on host \f2clienthost\fP and the server is running on host \f2serverhost\fP.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Start \f2tnameserv\fP on the host \f2nameserverhost\fP, as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
Start the server on the \f2serverhost\fP, as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
Start the client on the \f2clienthost\fP, as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
The \-J option
|
||||
.LP
|
||||
This command\-line option is available for use with \f2tnameserve\fP:
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Stopping the Java\ IDL Transient Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
To stop the Java\ IDL naming service, use the relevant operating system command, such as \f2kill\fP for a Unix process, or \f2Ctrl\-C\fP for a Windows process. The naming service will continue to wait for invocations until it is explicitly shutdown. Note that names registered with the Java\ IDL naming service disappear when the service is terminated.
|
||||
.LP
|
||||
.SH "Sample Client: Adding Objects to the Namespace"
|
||||
.LP
|
||||
.LP
|
||||
The following sample program illustrates how to add names to the namespace. It is a self\-contained Transient Naming Service client that creates the following simple tree.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f4Initial Naming Context\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
*
|
||||
\f3plans\fP
|
||||
.TP 2
|
||||
*
|
||||
\f4Personal\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
-
|
||||
\f3calendar\fP
|
||||
.TP 2
|
||||
-
|
||||
\f3schedule\fP
|
||||
.RE
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
In this example, \f3plans\fP is an object reference and \f3Personal\fP is a naming context that contains two object references: \f3calendar\fP and \f3schedule\fP.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClient
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
In the above section, Starting the Java IDL Transient Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code obtains the initial naming context and assigns it to \f3ctx\fP. The second line copies \f3ctx\fP into a dummy object reference \f3objref\fP that we'll attach to various names and add into the namespace.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext ctx =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
NamingContext objref = ctx;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code creates a name "plans" of type "text" and binds it to our dummy object reference. "plans" is then added under the initial naming context using \f2rebind\fP. The \f2rebind\fP method allows us to run this program over and over again without getting the exceptions we'd get from using \f2bind\fP.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc1 = new NameComponent("plans", "text");
|
||||
.fl
|
||||
NameComponent[] name1 = {nc1};
|
||||
.fl
|
||||
ctx.rebind(name1, objref);
|
||||
.fl
|
||||
System.out.println("plans rebind sucessful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code creates a naming context called "Personal" of type "directory". The resulting object reference, \f3ctx2\fP, is bound to the name and added under the initial naming context.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc2 = new NameComponent("Personal", "directory");
|
||||
.fl
|
||||
NameComponent[] name2 = {nc2};
|
||||
.fl
|
||||
NamingContext ctx2 = ctx.bind_new_context(name2);
|
||||
.fl
|
||||
System.out.println("new naming context added..");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The remainder of the code binds the dummy object reference using the names "schedule" and "calendar" under the "Personal" naming context (\f3ctx2\fP).
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc3 = new NameComponent("schedule", "text");
|
||||
.fl
|
||||
NameComponent[] name3 = {nc3};
|
||||
.fl
|
||||
ctx2.rebind(name3, objref);
|
||||
.fl
|
||||
System.out.println("schedule rebind sucessful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
NameComponent nc4 = new NameComponent("calender", "text");
|
||||
.fl
|
||||
NameComponent[] name4 = {nc4};
|
||||
.fl
|
||||
ctx2.rebind(name4, objref);
|
||||
.fl
|
||||
System.out.println("calender rebind sucessful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "Sample Client: Browsing the Namespace"
|
||||
.LP
|
||||
.LP
|
||||
The following sample program illustrates how to browse the namespace.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClientList
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
In the above section, Starting the Java IDL Transient Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The following code obtains the intial naming context.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext nc =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The \f2list\fP method lists the bindings in the naming context. In this case, up to 1000 bindings from the initial naming context will be returned in the BindingListHolder; any remaining bindings are returned in the BindingIteratorHolder.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
BindingListHolder bl = new BindingListHolder();
|
||||
.fl
|
||||
BindingIteratorHolder blIt= new BindingIteratorHolder();
|
||||
.fl
|
||||
nc.list(1000, bl, blIt);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code gets the array of bindings out of the returned BindingListHolder. If there are no bindings, the program ends.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Binding bindings[] = bl.value;
|
||||
.fl
|
||||
if (bindings.length == 0) return;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The remainder of the code loops through the bindings and prints the names out.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
for (int i=0; i < bindings.length; i++) {
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// get the object reference for each binding
|
||||
.fl
|
||||
org.omg.CORBA.Object obj = nc.resolve(bindings[i].binding_name);
|
||||
.fl
|
||||
String objStr = orb.object_to_string(obj);
|
||||
.fl
|
||||
int lastIx = bindings[i].binding_name.length\-1;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// check to see if this is a naming context
|
||||
.fl
|
||||
if (bindings[i].binding_type == BindingType.ncontext) {
|
||||
.fl
|
||||
System.out.println( "Context: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
} else {
|
||||
.fl
|
||||
System.out.println("Object: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH NAME
|
||||
tnameserv \- Interface Definition Language (IDL)\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBtnameserve\fR \fB\-ORBInitialPort\fR [ \fInameserverport\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
-ORBInitialPort \fInameserverport\fR
|
||||
.br
|
||||
The initial port where the naming service listens for the bootstrap protocol used to implement the ORB \f3resolve_initial_references\fR and \f3list_initial_references\fR methods\&.
|
||||
.SH DESCRIPTION
|
||||
Java IDL includes the Object Request Broker Daemon (ORBD)\&. ORBD is a daemon process that contains a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager\&. The Java IDL tutorials all use ORBD, but you can substitute the \f3tnameserv\fR command for the \f3orbd\fR command in any of the examples that use a Transient Naming Service\&.
|
||||
.PP
|
||||
See orbd(1) or Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
||||
.PP
|
||||
The CORBA Common Object Services (COS) Naming Service provides a tree-structure directory for object references similar to a file system that provides a directory structure for files\&. The Transient Naming Service provided with Java IDL, \f3tnameserv\fR, is a simple implementation of the COS Naming Service specification\&.
|
||||
.PP
|
||||
Object references are stored in the name space by name and each object reference-name pair is called a name binding\&. Name bindings can be organized under naming contexts\&. Naming contexts are name bindings and serve the same organizational function as a file system subdirectory\&. All bindings are stored under the initial naming context\&. The initial naming context is the only persistent binding in the name space\&. The rest of the name space is lost when the Java IDL naming service process stops and restarts\&.
|
||||
.PP
|
||||
For an applet or application to use COS naming, its ORB must know the port of a host running a naming service or have access to an initial naming context string for that naming service\&. The naming service can either be the Java IDL naming service or another COS-compliant naming service\&.
|
||||
.SS START\ THE\ NAMING\ SERVICE
|
||||
You must start the Java IDL naming service before an application or applet that uses its naming service\&. Installation of the Java IDL product creates a script (Oracle Solaris: \f3tnameserv\fR) or executable file (Windows: \f3tnameserv\&.exe\fR) that starts the Java IDL naming service\&. Start the naming service so it runs in the background\&.
|
||||
.PP
|
||||
If you do not specify otherwise, then the Java IDL naming service listens on port 900 for the bootstrap protocol used to implement the ORB \f3resolve_initial_references\fR and \f3list_initial_references methods\fR, as follows:
|
||||
.sp
|
||||
.nf
|
||||
\f3tnameserv \-ORBInitialPort nameserverport&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
If you do not specify the name server port, then port 900 is used by default\&. When running Oracle Solaris software, you must become the root user to start a process on a port below 1024\&. For this reason, it is recommended that you use a port number greater than or equal to 1024\&. To specify a different port, for example, 1050, and to run the naming service in the background, from a UNIX command shell, enter:
|
||||
.sp
|
||||
.nf
|
||||
\f3tnameserv \-ORBInitialPort 1050&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
From an MS-DOS system prompt (Windows), enter:
|
||||
.sp
|
||||
.nf
|
||||
\f3start tnameserv \-ORBInitialPort 1050\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Clients of the name server must be made aware of the new port number\&. Do this by setting the \f3org\&.omg\&.CORBA\&.ORBInitialPort\fR property to the new port number when you create the ORB object\&.
|
||||
.SS RUN\ THE\ SERVER\ AND\ CLIENT\ ON\ DIFFERENT\ HOSTS
|
||||
In most of the Java IDL and RMI-IIOP tutorials, the naming service, server, and client are all running on the development machine\&. In real-world deployment, the client and server probably run on different host machines from the Naming Service\&.
|
||||
.PP
|
||||
For the client and server to find the Naming Service, they must be made aware of the port number and host on which the naming service is running\&. Do this by setting the \f3org\&.omg\&.CORBA\&.ORBInitialPort\fR and \f3org\&.omg\&.CORBA\&.ORBInitialHost\fR properties in the client and server files to the machine name and port number on which the Naming Service is running\&. An example of this is shown in Getting Started Using RMI-IIOP at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/rmi-iiop/rmiiiopexample\&.html
|
||||
.PP
|
||||
You could also use the command-line options \f3-ORBInitialPort nameserverport#\fR and \f3-ORBInitialHost nameserverhostname\fR to tell the client and server where to find the naming service\&. For one example of doing this using the command-line option, see Java IDL: The Hello World Example on Two Machines at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/tutorial/jidl2machines\&.html
|
||||
.PP
|
||||
For example, suppose the Transient Naming Service, \f3tnameserv\fR is running on port 1050 on host \f3nameserverhost\fR\&. The client is running on host \f3clienthost,\fR and the server is running on host \f3serverhost\fR\&.
|
||||
.PP
|
||||
Start \f3tnameserv\fR on the host \f3nameserverhost\fR:
|
||||
.sp
|
||||
.nf
|
||||
\f3tnameserv \-ORBInitialPort 1050\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Start the server on the \f3serverhost\fR:
|
||||
.sp
|
||||
.nf
|
||||
\f3java Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Start the client on the \f3clienthost\fR:
|
||||
.sp
|
||||
.nf
|
||||
\f3java Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS STOP\ THE\ NAMING\ SERVICE
|
||||
To stop the Java IDL naming service, use the relevant operating system command, such as \f3kill\fR for a Unix process or \f3Ctrl+C\fR for a Windows process\&. The naming service continues to wait for invocations until it is explicitly shut down\&. Note that names registered with the Java IDL naming service disappear when the service is terminated\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH EXAMPLES
|
||||
.SS ADD\ OBJECTS\ TO\ THE\ NAME\ SPACE
|
||||
The following example shows how to add names to the name space\&. It is a self-contained Transient Naming Service client that creates the following simple tree\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3Initial Naming Context\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 plans\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Personal\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 calendar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 schedule\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
In this example, \f3plans\fR is an object reference and \f3Personal\fR is a naming context that contains two object references: \f3calendar\fR and \f3schedule\fR\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3import java\&.util\&.Properties;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3import org\&.omg\&.CORBA\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3import org\&.omg\&.CosNaming\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class NameClient {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public static void main(String args[]) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 try {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
In Start the Naming Service, the \f3nameserver\fR was started on port 1050\&. The following code ensures that the client program is aware of this port number\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 Properties props = new Properties();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ORB orb = ORB\&.init(args, props);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This code obtains the initial naming context and assigns it to \f3ctx\fR\&. The second line copies \f3ctx\fR into a dummy object reference \f3objref\fR that is attached to various names and added into the name space\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 NamingContext ctx =\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NamingContextHelper\&.narrow(\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 orb\&.resolve_initial_references("NameService"));\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NamingContext objref = ctx;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This code creates a name \f3plans\fR of type \f3text\fR and binds it to the dummy object reference\&. \f3plans\fR is then added under the initial naming context using the \f3rebind\fR method\&. The \f3rebind\fR method enables you to run this program over and over again without getting the exceptions from using the \f3bind\fR method\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 NameComponent nc1 = new NameComponent("plans", "text");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NameComponent[] name1 = {nc1};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ctx\&.rebind(name1, objref);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 System\&.out\&.println("plans rebind successful!");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This code creates a naming context called \f3Personal\fR of type \f3directory\fR\&. The resulting object reference, \f3ctx2\fR, is bound to the \f3name\fR and added under the initial naming context\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 NameComponent nc2 = new NameComponent("Personal", "directory");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NameComponent[] name2 = {nc2};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NamingContext ctx2 = ctx\&.bind_new_context(name2);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 System\&.out\&.println("new naming context added\&.\&.");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The remainder of the code binds the dummy object reference using the names \f3schedule\fR and \f3calendar\fR under the \f3Personal\fR naming context (\f3ctx2\fR)\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 NameComponent nc3 = new NameComponent("schedule", "text");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NameComponent[] name3 = {nc3};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ctx2\&.rebind(name3, objref);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 System\&.out\&.println("schedule rebind successful!");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NameComponent nc4 = new NameComponent("calender", "text");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NameComponent[] name4 = {nc4};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ctx2\&.rebind(name4, objref);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 System\&.out\&.println("calender rebind successful!");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 } catch (Exception e) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 e\&.printStackTrace(System\&.err);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS BROWSING\ THE\ NAME\ SPACE
|
||||
The following sample program shoes how to browse the name space\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3import java\&.util\&.Properties;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3import org\&.omg\&.CORBA\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3import org\&.omg\&.CosNaming\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class NameClientList {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public static void main(String args[]) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 try {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
In Start the Naming Service, the \f3nameserver\fR was started on port 1050\&. The following code ensures that the client program is aware of this port number\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 Properties props = new Properties();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ORB orb = ORB\&.init(args, props);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following code obtains the initial naming context\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 NamingContext nc =\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 NamingContextHelper\&.narrow(\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 orb\&.resolve_initial_references("NameService"));\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The \f3list\fR method lists the bindings in the naming context\&. In this case, up to 1000 bindings from the initial naming context will be returned in the \f3BindingListHolder\fR; any remaining bindings are returned in the \f3BindingIteratorHolder\fR\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 BindingListHolder bl = new BindingListHolder();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 BindingIteratorHolder blIt= new BindingIteratorHolder();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 nc\&.list(1000, bl, blIt);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This code gets the array of bindings out of the returned \f3BindingListHolder\fR\&. If there are no bindings, then the program ends\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 Binding bindings[] = bl\&.value;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 if (bindings\&.length == 0) return;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The remainder of the code loops through the bindings and prints outs the names\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3 for (int i=0; i < bindings\&.length; i++) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 // get the object reference for each binding\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 org\&.omg\&.CORBA\&.Object obj = nc\&.resolve(bindings[i]\&.binding_name);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 String objStr = orb\&.object_to_string(obj);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 int lastIx = bindings[i]\&.binding_name\&.length\-1;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 // check to see if this is a naming context\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 if (bindings[i]\&.binding_type == BindingType\&.ncontext) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 System\&.out\&.println("Context: " +\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 bindings[i]\&.binding_name[lastIx]\&.id);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 } else {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 System\&.out\&.println("Object: " +\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 bindings[i]\&.binding_name[lastIx]\&.id);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 } catch (Exception e) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 e\&.printStackTrace(System\&.err)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
orbd(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,156 +1,138 @@
|
||||
." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH unpack200 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Deployment Tools
|
||||
.\" Title: unpack200.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH unpack200 1 "21 November 2013" "JDK 8" "Java Deployment Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
unpack200 \- JAR Unpacking tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4unpack200\fP\f2 [ \fP\f2options\fP ] \f2input\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Options may be in any order. The last option on the command line supersedes all previously specified options.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
input\-file
|
||||
Name of the input file, which can be a pack200 gzip file or a pack200 file. The input could also be JAR file produced by pack200(1) with an effort of 0. In this case the contents of the input file will be copied to the output JAR file with the Pack200 marker.
|
||||
.TP 3
|
||||
JAR\-file
|
||||
Name of the output JAR file.
|
||||
.RE
|
||||
.SH NAME
|
||||
unpack200 \- Transforms a packed file produced by pack200(1) into a JAR file for web deployment\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f2unpack200\fP is a native implementation that transforms a packed file produced by \f2pack200\fP(1) into a JAR file. Typical usage:
|
||||
.LP
|
||||
.LP
|
||||
\f2% unpack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
In this example, the \f2myarchive.jar\fP is produced from \f2myarchive.pack.gz\fP using the default \f2unpack200\fP settings.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
Sets the deflation to be \f2true\fP, \f2false\fP, or \f2keep\fP on all entries within a JAR file. The default mode is \f2keep\fP. If \f2true\fP or \f2false\fP, overrides the default behavior and sets the deflation mode on all entries within the output JAR file.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-remove\-pack\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Removes the input packed file.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
Outputs minimal messages. Multiple specification of this option will output more verbose messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies quiet operation with no messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies a log file to output messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints help information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints version information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
Passes \f2option\fP to the Java launcher called by \f2unpack200\fP.
|
||||
.LP
|
||||
.SH "EXIT STATUS"
|
||||
.LP
|
||||
.LP
|
||||
The following exit values are returned:
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP if successful completion;
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP if an error occurred.
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\fBunpack200\fR [ \fIoptions\fR ] input\-file \fIJAR\-file\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIinput-file\fR
|
||||
Name of the input file, which can be a pack200 gzip file or a pack200 file\&. The input can also be JAR file produced by \f3pack200\fR(1) with an effort of \f30\fR, in which case the contents of the input file are copied to the output JAR file with the Pack200 marker\&.
|
||||
.TP
|
||||
\fIJAR-file\fR
|
||||
Name of the output JAR file\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3unpack200\fR command is a native implementation that transforms a packed file produced by \f3pack200\fR\f3(1)\fR into a JAR file\&. A typical usage follows\&. In the following example, the \f3myarchive\&.jar\fR file is produced from \f3myarchive\&.pack\&.gz\fR with the default \f3unpack200\fR command settings\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3unpack200 myarchive\&.pack\&.gz myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-Hvalue --deflate-hint=\fIvalue\fR
|
||||
.br
|
||||
Sets the deflation to be \f3true\fR, \f3false\fR, or \f3keep\fR on all entries within a JAR file\&. The default mode is \f3keep\fR\&. If the value is \f3true\fR or \f3false\fR, then the \f3--deflate=hint\fR option overrides the default behavior and sets the deflation mode on all entries within the output JAR file\&.
|
||||
.TP
|
||||
-r --remove-pack-file
|
||||
.br
|
||||
Removes the input pack file\&.
|
||||
.TP
|
||||
-v --verbose
|
||||
.br
|
||||
Displays minimal messages\&. Multiple specifications of this option displays more verbose messages\&.
|
||||
.TP
|
||||
-q --quiet
|
||||
.br
|
||||
Specifies quiet operation with no messages\&.
|
||||
.TP
|
||||
-lfilename --log-file=\fIfilename\fR
|
||||
.br
|
||||
Specifies a log file where output messages are logged\&.
|
||||
.TP
|
||||
-? -h --help
|
||||
.br
|
||||
Prints help information about the \f3unpack200\fR command\&.
|
||||
.TP
|
||||
-V --version
|
||||
.br
|
||||
Prints version information about the \f3unpack200\fR command\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes option to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH NOTES
|
||||
This command should not be confused with the \f3unpack\fR command\&. They are distinctly separate products\&.
|
||||
.PP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority in case of discrepancies\&.
|
||||
.SH EXIT\ STATUS
|
||||
The following exit values are returned: 0 for successful completion, and a value that is greater than 0 when an error occurred\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
pack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SE Documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Deployment Guide \- Pack200\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archive Tool
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR Signer tool
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fP man page
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
This command should not be confused with \f2unpack(1)\fP. They are distinctly separate products.
|
||||
.LP
|
||||
.LP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
|
||||
.LP
|
||||
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jar(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jarsigner(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Pack200 and Compression at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/deployment/deployment-guide/pack200\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The Java SE Technical Documentation page at http://docs\&.oracle\&.com/javase/
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,596 +1,176 @@
|
||||
." Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH wsgen 1 "10 May 2011"
|
||||
.SH "Name"
|
||||
wsgen \- Java(TM) API for XML Web Services (JAX\-WS) 2.0
|
||||
.LP
|
||||
\f3Specification Version:\fP 2.1
|
||||
.br
|
||||
\f3Implementation Version:\fP 2.1.1
|
||||
.LP
|
||||
The \f2wsgen\fP tool generates JAX\-WS portable artifacts used in JAX\-WS web services. The tool reads a web service endpoint implementation class (SEI) and generates all the required artifacts for web service deployment, and invocation
|
||||
.SH "Overview"
|
||||
.LP
|
||||
The \f2wsgen\fP tool generates JAX\-WS portable artifacts used in JAX\-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment, and invocation. JAXWS 2.1.1 RI also provides a wsgen ant task, see
|
||||
.na
|
||||
\f2Wsgen ant task\fP @
|
||||
.fi
|
||||
https://jax\-ws.dev.java.net/nonav/2.1.1/docs/wsgenant.html for details.
|
||||
.LP
|
||||
.SH "Launching wsgen"
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3Solaris/Bsd\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
*
|
||||
\f2export JAXWS_HOME=/pathto/jaxws\-ri\fP
|
||||
.TP 2
|
||||
*
|
||||
\f2$JAXWS_HOME/bin/wsgen.sh \-help\fP
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
\f3Windows\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
*
|
||||
\f2set JAXWS_HOME=c:\\pathto\\jaxws\-ri\fP
|
||||
.TP 2
|
||||
*
|
||||
\f2%JAXWS_HOME%\\bin\\wsgen.bat \-help\fP
|
||||
.RE
|
||||
.RE
|
||||
'\" t
|
||||
.\" Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Web Services Tools
|
||||
.\" Title: wsgen.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH wsgen 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Syntax"
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
wsgen [options] <SEI>\fP
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.LP
|
||||
The following table lists the \f2wsgen\fP options.
|
||||
.br
|
||||
.LP
|
||||
.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
|
||||
.de 35
|
||||
.ps \n(.s
|
||||
.vs \n(.vu
|
||||
.in \n(.iu
|
||||
.if \n(.u .fi
|
||||
.if \n(.j .ad
|
||||
.if \n(.j=0 .na
|
||||
..
|
||||
.nf
|
||||
.nr #~ 0
|
||||
.if n .nr #~ 0.6n
|
||||
.ds #d .d
|
||||
.if \(ts\n(.z\(ts\(ts .ds #d nl
|
||||
.fc
|
||||
.nr 33 \n(.s
|
||||
.rm 80 81
|
||||
.nr 34 \n(.lu
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di a+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Specify where to find input class files
|
||||
.br
|
||||
.di
|
||||
.nr a| \n(dn
|
||||
.nr a- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di b+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Same as \f2\-classpath <path>\fP
|
||||
.br
|
||||
.di
|
||||
.nr b| \n(dn
|
||||
.nr b- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di c+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Specify where to place generated output files
|
||||
.br
|
||||
.di
|
||||
.nr c| \n(dn
|
||||
.nr c- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di d+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
allow vendor extensions (functionality not specified by the specification). Use of extensions may result in applications that are not portable or may not interoperate with other implementations
|
||||
.br
|
||||
.di
|
||||
.nr d| \n(dn
|
||||
.nr d- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di e+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Used only in conjunction with the \-wsdl option. Specify where to place generated resource files such as WSDLs
|
||||
.br
|
||||
.di
|
||||
.nr e| \n(dn
|
||||
.nr e- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di f+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Specify where to place generated source files
|
||||
.br
|
||||
.di
|
||||
.nr f| \n(dn
|
||||
.nr f- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di g+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Output messages about what the compiler is doing
|
||||
.br
|
||||
.di
|
||||
.nr g| \n(dn
|
||||
.nr g- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di h+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Print version information. Use of this option will ONLY print version information. Normal processing will not occur.
|
||||
.br
|
||||
.di
|
||||
.nr h| \n(dn
|
||||
.nr h- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di i+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
By default \f2wsgen\fP does not generate a WSDL file. This flag is optional and will cause \f2wsgen\fP to generate a WSDL file and is usually only used so that the developer can look at the WSDL before the endpoint is deploy. The \f2protocol\fP is optional and is used to specify what protocol should be used in the \f2wsdl:binding\fP. Valid protocols include: \f2soap1.1\fP and \f2Xsoap1.2\fP. The default is \f2soap1.1\fP. \f2Xsoap1.2\fP is not standard and can only be used in conjunction with the \f2\-extension\fP option.
|
||||
.br
|
||||
.di
|
||||
.nr i| \n(dn
|
||||
.nr i- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di j+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Used only in conjunction with the \f2\-wsdl\fP option. Used to specify a particular \f2wsdl:service\fP name to be generated in the WSDL. Example, \f2\-servicename "{http://mynamespace/}MyService"\fP
|
||||
.br
|
||||
.di
|
||||
.nr j| \n(dn
|
||||
.nr j- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.eo
|
||||
.am 81
|
||||
.br
|
||||
.di k+
|
||||
.35
|
||||
.ft \n(.f
|
||||
.ll \n(34u*1u/3u
|
||||
.if \n(.l<\n(81 .ll \n(81u
|
||||
.in 0
|
||||
Used only in conjunction with the \f2\-wsdl\fP option. Used to specify a particular \f2wsdl:port\fP name to be generated in the WSDL. Example, \f2\-portname "{http://mynamespace/}MyPort"\fP
|
||||
.br
|
||||
.br
|
||||
.di
|
||||
.nr k| \n(dn
|
||||
.nr k- \n(dl
|
||||
..
|
||||
.ec \
|
||||
.35
|
||||
.nf
|
||||
.ll \n(34u
|
||||
.nr 80 0
|
||||
.nr 38 \w\f3Option\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-classpath <path>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-cp <path>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-d <directory>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-extension\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-help\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-keep\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-r <directory>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-s <directory>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-verbose\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-version\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-wsdl[:protocol]\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-servicename <name>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.nr 38 \w\f4\-portname <name>\fP
|
||||
.if \n(80<\n(38 .nr 80 \n(38
|
||||
.80
|
||||
.rm 80
|
||||
.nr 81 0
|
||||
.nr 38 \w\f3Description\fP
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \wDisplay help
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \wKeep generated files
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.81
|
||||
.rm 81
|
||||
.nr 38 \n(a-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(b-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(c-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(d-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(e-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(f-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(g-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(h-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(i-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(j-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.nr 38 \n(k-
|
||||
.if \n(81<\n(38 .nr 81 \n(38
|
||||
.35
|
||||
.nf
|
||||
.ll \n(34u
|
||||
.nr 38 1n
|
||||
.nr 79 0
|
||||
.nr 40 \n(79+(0*\n(38)
|
||||
.nr 80 +\n(40
|
||||
.nr 41 \n(80+(3*\n(38)
|
||||
.nr 81 +\n(41
|
||||
.nr TW \n(81
|
||||
.if t .if \n(TW>\n(.li .tm Table at line 133 file Input is too wide - \n(TW units
|
||||
.fc
|
||||
.nr #T 0-1
|
||||
.nr #a 0-1
|
||||
.eo
|
||||
.de T#
|
||||
.ds #d .d
|
||||
.if \(ts\n(.z\(ts\(ts .ds #d nl
|
||||
.mk ##
|
||||
.nr ## -1v
|
||||
.ls 1
|
||||
.ls
|
||||
..
|
||||
.ec
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f3Option\fP\h'|\n(41u'\f3Description\fP
|
||||
.ne \n(a|u+\n(.Vu
|
||||
.if (\n(a|+\n(#^-1v)>\n(#- .nr #- +(\n(a|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-classpath <path>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.a+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(b|u+\n(.Vu
|
||||
.if (\n(b|+\n(#^-1v)>\n(#- .nr #- +(\n(b|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-cp <path>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.b+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(c|u+\n(.Vu
|
||||
.if (\n(c|+\n(#^-1v)>\n(#- .nr #- +(\n(c|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-d <directory>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.c+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(d|u+\n(.Vu
|
||||
.if (\n(d|+\n(#^-1v)>\n(#- .nr #- +(\n(d|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-extension\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.d+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-help\fP\h'|\n(41u'Display help
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-keep\fP\h'|\n(41u'Keep generated files
|
||||
.ne \n(e|u+\n(.Vu
|
||||
.if (\n(e|+\n(#^-1v)>\n(#- .nr #- +(\n(e|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-r <directory>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.e+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(f|u+\n(.Vu
|
||||
.if (\n(f|+\n(#^-1v)>\n(#- .nr #- +(\n(f|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-s <directory>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.f+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(g|u+\n(.Vu
|
||||
.if (\n(g|+\n(#^-1v)>\n(#- .nr #- +(\n(g|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-verbose\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.g+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(h|u+\n(.Vu
|
||||
.if (\n(h|+\n(#^-1v)>\n(#- .nr #- +(\n(h|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-version\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.h+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(i|u+\n(.Vu
|
||||
.if (\n(i|+\n(#^-1v)>\n(#- .nr #- +(\n(i|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-wsdl[:protocol]\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.i+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(j|u+\n(.Vu
|
||||
.if (\n(j|+\n(#^-1v)>\n(#- .nr #- +(\n(j|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-servicename <name>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.j+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.ne \n(k|u+\n(.Vu
|
||||
.if (\n(k|+\n(#^-1v)>\n(#- .nr #- +(\n(k|+\n(#^-\n(#--1v)
|
||||
.ta \n(80u \n(81u
|
||||
.nr 31 \n(.f
|
||||
.nr 35 1m
|
||||
\&\h'|\n(40u'\f4\-portname <name>\fP\h'|\n(41u'
|
||||
.mk ##
|
||||
.nr 31 \n(##
|
||||
.sp |\n(##u-1v
|
||||
.nr 37 \n(41u
|
||||
.in +\n(37u
|
||||
.k+
|
||||
.in -\n(37u
|
||||
.mk 32
|
||||
.if \n(32>\n(31 .nr 31 \n(32
|
||||
.sp |\n(31u
|
||||
.fc
|
||||
.nr T. 1
|
||||
.T# 1
|
||||
.35
|
||||
.rm a+
|
||||
.rm b+
|
||||
.rm c+
|
||||
.rm d+
|
||||
.rm e+
|
||||
.rm f+
|
||||
.rm g+
|
||||
.rm h+
|
||||
.rm i+
|
||||
.rm j+
|
||||
.rm k+
|
||||
.if \n-(b.=0 .nr c. \n(.c-\n(d.-53
|
||||
.SH NAME
|
||||
wsgen \- Reads a web service endpoint implementation (SEI) class and generates all of the required artifacts for web service deployment, and invocation\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "Example"
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3wsgen \-d stock \-cp myclasspath stock.StockService\fP
|
||||
.fl
|
||||
.fi
|
||||
.LP
|
||||
This will generate the wrapper classes needed for StockService annotated with @WebService annotation inside \f3stock\fPdirectory.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3wsgen \-wsdl \-d stock \-cp myclasspath stock.StockService\fP
|
||||
.fl
|
||||
.fi
|
||||
.LP
|
||||
This will generate a SOAP 1.1 WSDL and schema for your Java class stock.StockService annotated with @WebService annotation.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3wsgen \-wsdl:Xsoap1.2 \-d stock \-cp myclasspath stock.StockService\fP
|
||||
.fl
|
||||
.fi
|
||||
.LP
|
||||
Will generate a SOAP 1.2 WSDL.
|
||||
.LP
|
||||
Note that you do not have to generate WSDL at the development time as JAXWS runtime will automatically generate a WSDL for you when you deploy your service.
|
||||
\fBwsgen\fR [ \fIoptions\fR ] \fISEI\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fISEI\fR
|
||||
The web service endpoint implementation class (SEI) to be read\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3wsgen\fR command generates JAX-WS portable artifacts used in JAX-WS web services\&. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment and invocation\&. JAXWS 2\&.1\&.1 RI also provides a \f3wsgen\fR Ant task, see the \fITools\fR tab of the JAX-WS (wsgen) page at http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsgenant\&.html
|
||||
.PP
|
||||
To start the \f3wsgen\fR command, do the following:
|
||||
.sp
|
||||
.nf
|
||||
\f3export JAXWS_HOME=/pathto/jaxws\-ri\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3$JAXWS_HOME/bin/wsgen\&.sh \-help\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
The location of the input class files\&.
|
||||
.TP
|
||||
-cp \fIpath\fR
|
||||
.br
|
||||
The location of the input class files\&.
|
||||
.TP
|
||||
-d \fIdirectory\fR
|
||||
.br
|
||||
The location for where to place generated output files\&.
|
||||
.TP
|
||||
-extension
|
||||
.br
|
||||
Allow vendor extensions\&. Use of extensions can result in applications that are not portable or that do not work with other implementations\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message about the \f3wsgen\fR command\&.
|
||||
.TP
|
||||
-keep
|
||||
.br
|
||||
Keeps the generated files\&.
|
||||
.TP
|
||||
-r \fIdirectory\fR
|
||||
.br
|
||||
Uses this option with the \f3-wsdl\fR option to specify where to place generated resource files such as WSDLs\&.
|
||||
.TP
|
||||
-s \fIdirectory\fR
|
||||
.br
|
||||
The location for where to place generated source files\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Displays compiler messages\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints release information\&.
|
||||
.TP
|
||||
-wsdl [ :protocol ] \fI\fR
|
||||
.br
|
||||
An optional command that generates a WSDL file to review before endpoint deployment\&. The WSDL files contains a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns\&.
|
||||
|
||||
By default the \f3wsgen\fR command does not generate a WSDL file\&. The \f3protocol\fR value is optional and is used to specify what protocol should be used for the WSDL binding (\f3wsdl:binding\fR)\&. Valid protocols are \f3soap1\&.1\fR and \f3Xsoap1\&.2\fR\&. The default is \f3soap1\&.1\fR\&. The \f3Xsoap1\&.2\fR protocol is not standard and can only be used with the \f3-extension\fR option\&.
|
||||
.TP
|
||||
-servicename \fIname\fR
|
||||
.br
|
||||
Used only with the \f3-wsdl\fR option to specify a particular WSDL service (\f3wsdl:service\fR) name to be generated in the WSDL, for example: \f3-servicename "{http://mynamespace/}MyService"\fR\&.
|
||||
.TP
|
||||
-portname \fIname\fR
|
||||
.br
|
||||
Used only with the \f3-wsdl\fR option to specify a particular WSDL port (\f3wsdl:port\fR) name to be generated in the WSDL, for example: \f3-portname "{http://mynamespace/}MyPort"\fR\&.
|
||||
.SH EXAMPLES
|
||||
The following example generates the wrapper classes for \f3StockService\fR with \f3@WebService\fR annotations inside stock directory\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3wsgen \-d stock \-cp myclasspath stock\&.StockService\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following example generates a SOAP 1\&.1 WSDL and schema for the \f3stock\&.StockService\fR class with \f3@WebService\fR annotations\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3wsgen \-wsdl \-d stock \-cp myclasspath stock\&.StockService\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following example generates a SOAP 1\&.2 WSDL\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3wsgen \-wsdl:Xsoap1\&.2 \-d stock \-cp myclasspath stock\&.StockService \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
\fINote:\fR You do not have to generate WSDL at development time because the JAXWS run time environment generates a WSDL for you when you deploy your service\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
wsimport(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIThe Tools\fR tab of the JAX-WS (wsgen) page http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsgenant\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,297 +1,233 @@
|
||||
." Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH xjc 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Web Services Tools
|
||||
.\" Title: xjc.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH xjc 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
xjc \- Java(TM) Architecture for XML Binding
|
||||
.SH NAME
|
||||
xjc \- Compiles an XML schema file into fully annotated Java classes\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBxjc\fR [ \fIoptions\fR ] \fBschema\fR \fIfile/URL/dir/jar\fR \&.\&.\&. [\fB\-b\fR \fIbindinfo\fR ] \&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
schema \fIfile/URL/dir/jar \&.\&.\&.\fR
|
||||
The location of the XML schema file\&. If \f3dir\fR is specified, then all schema files in it are compiled\&. If \f3jar\fR is specified, then the \f3/META-INF/sun-jaxb\&.episode\fR binding file is compiled\&.
|
||||
.TP
|
||||
-b \fIbindinfo\fR
|
||||
.br
|
||||
Binding Compiler
|
||||
.LP
|
||||
.LP
|
||||
\f3Specification Version:\fP 2.1
|
||||
The location of the bindings files\&.
|
||||
.SH DESCRIPTION
|
||||
Start the binding compiler with the appropriate \f3xjc\fR shell script in the bin directory for your platform\&. There is also an Ant task to run the binding complier\&. See Using the XJC with Ant at http://jaxb\&.java\&.net/nonav/2\&.1\&.3/docs/xjcTask\&.html
|
||||
.SH OPTIONS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
See also Nonstandard Options
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
See also Deprecated and Removed Options
|
||||
.TP
|
||||
-nv
|
||||
.br
|
||||
\f3Reference Implementation (RI) Version:\fP 2.1.3
|
||||
.LP
|
||||
.SH "Launching xjc"
|
||||
.LP
|
||||
.LP
|
||||
The binding compiler can be launched using the appropriate \f2xjc\fP shell script in the \f2bin\fP directory for your platform. We also provide an Ant task to run the binding complier \- see the instructions for
|
||||
.na
|
||||
\f2using the XJC Ant task\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/xjcTask.html.
|
||||
.LP
|
||||
.LP
|
||||
\f2% xjc \-help\fP
|
||||
.LP
|
||||
.SS
|
||||
Output
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Usage: xjc [\-options ...] <schema file/URL/dir/jar> ... [\-b <bindinfo>] ...
|
||||
.fl
|
||||
If dir is specified, all schema files in it will be compiled.
|
||||
.fl
|
||||
If jar is specified, /META\-INF/sun\-jaxb.episode binding file will be compiled.
|
||||
.fl
|
||||
Options:
|
||||
.fl
|
||||
\-nv : do not perform strict validation of the input schema(s)
|
||||
.fl
|
||||
\-extension : allow vendor extensions \- do not strictly follow the Compatibility Rules and App E.2 from the JAXB Spec
|
||||
.fl
|
||||
\-b <file/dir> : specify external bindings files (each <file> must have its own \-b); if a directory is given, **/*.xjb is searched
|
||||
.fl
|
||||
\-d <dir> : generated files will go into this directory
|
||||
.fl
|
||||
\-p <pkg> : specifies the target package
|
||||
.fl
|
||||
\-httpproxy <proxy> : set HTTP/HTTPS proxy; format is [user[:password]@]proxyHost:proxyPort
|
||||
.fl
|
||||
\-httpproxyfile <f> : works like \-httpproxy but takes the argument in a file to protect password
|
||||
.fl
|
||||
\-classpath <arg> : specify where to find user class files
|
||||
.fl
|
||||
\-catalog <file> : specify catalog files to resolve external entity references; support TR9401, XCatalog, and OASIS XML Catalog format
|
||||
.fl
|
||||
\-readOnly : generated files will be in read\-only mode
|
||||
.fl
|
||||
\-npa : suppress generation of package level annotations (**/package\-info.java)
|
||||
.fl
|
||||
\-no\-header : suppress generation of a file header with timestamp
|
||||
.fl
|
||||
\-target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features
|
||||
.fl
|
||||
\-xmlschema : treat input as W3C XML Schema (default)
|
||||
.fl
|
||||
\-relaxng : treat input as RELAX NG (experimental,unsupported)
|
||||
.fl
|
||||
\-relaxng\-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
|
||||
.fl
|
||||
\-dtd : treat input as XML DTD (experimental,unsupported)
|
||||
.fl
|
||||
\-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
|
||||
.fl
|
||||
\-verbose : be extra verbose
|
||||
.fl
|
||||
\-quiet : suppress compiler output
|
||||
.fl
|
||||
\-help : display this help message
|
||||
.fl
|
||||
\-version : display version information
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
Extensions:
|
||||
.fl
|
||||
\-Xlocator : enable source location support for generated code
|
||||
.fl
|
||||
\-Xsync\-methods : generate accessor methods with the 'synchronized' keyword
|
||||
.fl
|
||||
\-mark\-generated : mark the generated code as @javax.annotation.Generated
|
||||
.fl
|
||||
\-episode <FILE> : generate the episode file for separate compilation
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-nv
|
||||
By default, the XJC binding compiler performs strict validation of the source schema before processing it. Use this option to disable strict schema validation. This does not mean that the binding compiler will not perform any validation, it simply means that it will perform less\-strict validation.
|
||||
.TP 3
|
||||
\-extension
|
||||
By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification. Appendix E.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1.0. In some cases, you may be allowed to use them in the "\-extension" mode enabled by this switch. In the default (strict) mode, you are also limited to using only the binding customizations defined in the specification. By using the "\-extension" switch, you will be allowed to use the JAXB Vendor Extensions
|
||||
.TP 3
|
||||
\-b <file>
|
||||
Specify one or more external binding files to process. (Each binding file must have its own \f2"\-b"\fP switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizations into multiple bindings files: \f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings123.xjb\fP
|
||||
By default, the XJC binding compiler performs strict validation of the source schema before processing it\&. Use this option to disable strict schema validation\&. This does not mean that the binding compiler will not perform any validation, but means that it will perform a less-strict validation\&.
|
||||
.TP
|
||||
-extension
|
||||
.br
|
||||
\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings1.xjb \-b bindings2.xjb \-b bindings3.xjb\fP In addition, the ordering of the schema files and binding files on the command line does not matter.
|
||||
.TP 3
|
||||
\-d <dir>
|
||||
By default, the XJC binding compiler will generate the Java content classes in the current directory. Use this option to specify an alternate output directory. The output directory must already exist, the XJC binding compiler will not create it for you.
|
||||
.TP 3
|
||||
\-p <pkg>
|
||||
Specifying a target package via this command\-line option overrides any binding customization for package name and the default package name algorithm defined in the specification.
|
||||
.TP 3
|
||||
\-httpproxy <proxy>
|
||||
Specify the HTTP/HTTPS proxy. The format is [user[:password]@]proxyHost[:proxyPort]. The old \f2\-host\fP and \f2\-port\fP are still supported by the RI for backwards compatibility, but they have been deprecated. Note that the password specified with this option is an argument that is visible to other users who use the \f2top\fP command, for example. For greater security, use \f2\-httpproxyfile\fP, below.
|
||||
.TP 3
|
||||
\-httpproxyfile <file>
|
||||
Specify the HTTP/HTTPS proxy using a file. Same format as above, but the password specified in the file is not visible to other users.
|
||||
.TP 3
|
||||
\-classpath <arg>
|
||||
Specify where to find client application class files used by the \f2<jxb:javaType>\fP and \f2<xjc:superClass>\fP customizations.
|
||||
.TP 3
|
||||
\-catalog <file>
|
||||
Specify catalog files to resolve external entity references. Supports TR9401, XCatalog, and OASIS XML Catalog format. Please read the XML Entity and URI Resolvers document or the \f2catalog\-resolver\fP sample application.
|
||||
.TP 3
|
||||
\-readOnly
|
||||
By default, the XJC binding compiler does not write\-protect the Java source files it generates. Use this option to force the XJC binding compiler to mark the generated Java sources read\-only.
|
||||
.TP 3
|
||||
\-npa
|
||||
Supress the generation of package level annotations into **/package\-info.java. Using this switch causes the generated code to internalize those annotations into the other generated classes.
|
||||
.TP 3
|
||||
\-no\-header
|
||||
Supress the generation of a file header comment that includes some note and timestamp. Using this makes the generated code more diff\-friendly.
|
||||
.TP 3
|
||||
\-target 2.0
|
||||
Avoid generating code that relies on any JAXB 2.1 features. This will allow the generated code to run with JAXB 2.0 runtime (such as JavaSE 6.)
|
||||
.TP 3
|
||||
\-xmlschema
|
||||
Treat input schemas as W3C XML Schema (default). If you do not specify this switch, your input schemas will be treated as W3C XML Schema.
|
||||
.TP 3
|
||||
\-relaxng
|
||||
Treat input schemas as RELAX NG (experimental, unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.
|
||||
.TP 3
|
||||
\-relaxng\-compact
|
||||
Treat input schemas as RELAX NG compact syntax(experimental, unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.
|
||||
.TP 3
|
||||
\-dtd
|
||||
Treat input schemas as XML DTD (experimental, unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.
|
||||
.TP 3
|
||||
\-wsdl
|
||||
Treat input as WSDL and compile schemas inside it (experimental,unsupported).
|
||||
.TP 3
|
||||
\-quiet
|
||||
Suppress compiler output, such as progress information and warnings.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Be extra verbose, such as printing informational messages or displaying stack traces upon some errors.
|
||||
.TP 3
|
||||
\-help
|
||||
Display a brief summary of the compiler switches.
|
||||
.TP 3
|
||||
\-version
|
||||
Display the compiler version information.
|
||||
.TP 3
|
||||
<schema file/URL/dir>
|
||||
Specify one or more schema files to compile. If you specify a directory, then xjc will scan it for all schema files and compile them.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Non\-Standard Command Line Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Xlocator
|
||||
Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling.
|
||||
.TP 3
|
||||
\-Xsync\-methods
|
||||
Causes all of the generated method signatures to include the \f2synchronized\fP keyword.
|
||||
.TP 3
|
||||
\-mark\-generated
|
||||
Mark the generated code with the annotation \f2@javax.annotation.Generated\fP.
|
||||
.TP 3
|
||||
\-episode <file>
|
||||
Generate the specified episode file for separate compilation.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Deprecated and Removed Command Line Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-host & \-port
|
||||
These options have been deprecated and replaced with the \f3\-httpproxy\fP option. For backwards compatibility, we will continue to support these options, but they will no longer be documented and may be removed from future releases.
|
||||
.TP 3
|
||||
\-use\-runtime
|
||||
Since the JAXB 2.0 specification has defined a portable runtime, it is no longer necessary for the JAXB RI to generate **/impl/runtime packages. Therefore, this switch is obsolete and has been removed.
|
||||
.TP 3
|
||||
\-source
|
||||
The \-source compatibility switch was introduced in the first JAXB 2.0 Early Access release. We have decided to remove this switch from future releases of JAXB 2.0. If you need to generate 1.0.x code, please use an installation of the 1.0.x codebase.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Compiler Restrictions
|
||||
.LP
|
||||
.LP
|
||||
In general, it is safest to compile all related schemas as a single unit with the same binding compiler switches.
|
||||
.LP
|
||||
.LP
|
||||
Please keep the following list of restrictions in mind when running xjc. Most of these issues only apply when compiling multiple schemas with multiple invocations of xjc.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification\&. Appendix E\&.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1\&.0\&. In some cases, you may be allowed to use them in the \f3-extension\fR mode enabled by this switch\&. In the default (strict) mode, you are also limited to using only the binding customization defined in the specification\&. By using the \f3-extension\fR switch, you will be allowed to use the JAXB Vendor Extensions\&.
|
||||
.TP
|
||||
-b \fIfile\fR
|
||||
.br
|
||||
Specifies one or more external binding files to process\&. Each binding file must have its own \f3-b\fR switch\&. The syntax of the external binding files is flexible\&. You can have a single binding file that contains customization for multiple schemas or you can break the customization into multiple bindings files: \f3xjc schema1\&.xsd schema2\&.xsd schema3\&.xsd -b bindings123\&.xjb\fR\f3xjc schema1\&.xsd schema2\&.xsd schema3\&.xsd -b bindings1\&.xjb -b bindings2\&.xjb -b bindings3\&.xjb\fR\&. In addition, the ordering of the schema files and binding files on the command line does not matter\&.
|
||||
.TP
|
||||
-d \fIdir\fR
|
||||
.br
|
||||
By default, the XJC binding compiler generates the Java content classes in the current directory\&. Use this option to specify an alternate output directory\&. The output directory must already exist\&. The XJC binding compiler does not create it for you\&.
|
||||
.TP
|
||||
-p \fIpkg\fR
|
||||
.br
|
||||
When you specify a target package with this command-line option, it overrides any binding customization for the package name and the default package name algorithm defined in the specification\&.
|
||||
.TP
|
||||
-httpproxy \fIproxy\fR
|
||||
.br
|
||||
Specifies the HTTP or HTTPS proxy in the format \fI[user[:password]@]proxyHost[:proxyPort]\fR\&. The old \f3-host\fR and \f3-port\fR options are still supported by the RI for backward compatibility, but they were deprecated\&. The password specified with this option is an argument that is visible to other users who use the top command\&. For greater security, use the \f3-httpproxyfile\fR option\&.
|
||||
.TP
|
||||
-httpproxyfile file
|
||||
.br
|
||||
Specifies the HTTP or HTTPS proxy with a file\&. The same format as the \f3-httpproxy\fR option, but the password specified in the file is not visible to other users\&.
|
||||
.TP
|
||||
-classpath arg
|
||||
.br
|
||||
Specifies where to find client application class files used by the \fIjxb:javaType\fR and xjc:\fIsuperClass\fR customization\&.
|
||||
.TP
|
||||
-catalog file
|
||||
.br
|
||||
Specifies catalog files to resolve external entity references\&. Supports the TR9401, XCatalog, and OASIS XML Catalog formats\&. See XML Entity and URI Resolvers at http://xerces\&.apache\&.org/xml-commons/components/resolver/resolver-article\&.html
|
||||
.TP
|
||||
-readOnly
|
||||
.br
|
||||
By default, the XJC binding compiler does not write-protect the Java source files it generates\&. Use this option to force the XJC binding compiler to mark the generated Java sources as read-only\&.
|
||||
.TP
|
||||
-npa
|
||||
.br
|
||||
Suppresses the generation of package level annotations into \f3**/package-info\&.java\fR\&. Using this switch causes the generated code to internalize those annotations into the other generated classes\&.
|
||||
.TP
|
||||
-no-header
|
||||
.br
|
||||
Suppresses the generation of a file header comment that includes some note and time stamp\&. Using this makes the generated code more compatible with the \f3diff\fR command\&.
|
||||
.TP
|
||||
-target 2\&.0
|
||||
.br
|
||||
Avoids generating code that relies on any JAXB 2\&.1 features\&. This will allow the generated code to run with JAXB 2\&.0 runtime environment (such as Java SE 6)\&.
|
||||
.TP
|
||||
-xmlschema
|
||||
.br
|
||||
Treats input schemas as W3C XML Schema (default)\&. If you do not specify this switch, then your input schemas are treated as though they are W3C XML Schemas\&.
|
||||
.TP
|
||||
-relaxing
|
||||
.br
|
||||
Treats input schemas as RELAX NG (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&.
|
||||
.TP
|
||||
-relaxing-compact
|
||||
.br
|
||||
Treat input schemas as RELAX NG compact syntax (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&.
|
||||
.TP
|
||||
-dtd
|
||||
.br
|
||||
Treats input schemas as XML DTD (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&.
|
||||
.TP
|
||||
-wsdl
|
||||
.br
|
||||
Treats input as WSDL and compiles schemas inside it (experimental and unsupported)\&.
|
||||
.TP
|
||||
-quiet
|
||||
.br
|
||||
Suppress compiler output, such as progress information and warnings\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Be extra verbose, such as printing informational messages or displaying stack traces upon some errors\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a brief summary of the compiler switches\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Displays the compiler version information\&.
|
||||
.TP
|
||||
\fIschema file/URL/dir\fR
|
||||
Specifies one or more schema files to compile\&. If you specify a directory, then the \f3xjc\fR command scans it for all schema files and compiles them\&.
|
||||
.SS NONSTANDARD\ OPTIONS
|
||||
.TP
|
||||
-XLocator
|
||||
.br
|
||||
Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling\&.
|
||||
.TP
|
||||
-Xsync-methods
|
||||
.br
|
||||
Causes all of the generated method signatures to include the \f3synchronized\fR keyword\&.
|
||||
.TP
|
||||
-mark-generated
|
||||
.br
|
||||
Marks the generated code with the annotation \f3@javax\&.annotation\&.Generated\fR\&.
|
||||
.TP
|
||||
-episode file
|
||||
.br
|
||||
Generates the specified episode file for separate compilation\&.
|
||||
.SS DEPRECATED\ AND\ REMOVED\ OPTIONS
|
||||
.TP
|
||||
-host & -port
|
||||
.br
|
||||
These options are replaced with the \f3-httpproxy\fR option\&. For backward compatibility, these options are supported, but will not be documented and might be removed from future releases\&.
|
||||
.TP
|
||||
-use-runtime
|
||||
.br
|
||||
Because the JAXB 2\&.0 specification has defined a portable runtime environment, it is no longer necessary for the JAXB RI to generate \f3**/impl/runtime\fRpackages\&. Therefore, this switch is obsolete and was removed\&.
|
||||
.TP
|
||||
-source
|
||||
.br
|
||||
The \f3-source\fR compatibility switch was introduced in the first JAXB 2\&.0 Early Access release\&. This switch is removed from future releases of JAXB 2\&.0\&. If you need to generate 1\&.0\&.x code, then use an installation of the 1\&.0\&.x code base\&.
|
||||
.SH COMPILER\ RESTRICTIONS
|
||||
In general, it is safest to compile all related schemas as a single unit with the same binding compiler switches\&. Keep the following list of restrictions in mind when running the \f3xjc\fR command\&. Most of these issues only apply when you compile multiple schemas with multiple invocations of the \f3xjc\fR command\&.
|
||||
.PP
|
||||
To compile multiple schemas at the same time, keep the following precedence rules for the target Java package name in mind:
|
||||
.RS 3
|
||||
.TP 3
|
||||
1.
|
||||
The "\f2\-p\fP" command line option takes the highest precedence.
|
||||
.TP 3
|
||||
2.
|
||||
<\f2jaxb:package\fP> customization
|
||||
.TP 3
|
||||
3.
|
||||
If \f2targetNamespace\fP is declared, apply \f2targetNamespace\fP \-> Java package name algorithm defined in the specification.
|
||||
.TP 3
|
||||
4.
|
||||
If no \f2targetNamespace\fP is declared, use a hardcoded package named "generated".
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
It is not legal to have more than one <\f2jaxb:schemaBindings\fP> per namespace, so it is impossible to have two schemas in the same target namespace compiled into different Java packages.
|
||||
.TP 2
|
||||
o
|
||||
All schemas being compiled into the same Java package must be submitted to the XJC binding compiler at the same time \- they cannot be compiled independently and work as expected.
|
||||
.TP 2
|
||||
o
|
||||
Element substitution groups spread across multiple schema files must be compiled at the same time.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "See Also"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Running the binding compiler (XJC): [
|
||||
.na
|
||||
\f2command\-line instructions\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/xjc.html,
|
||||
.na
|
||||
\f2using the XJC Ant task\fP @
|
||||
.fi
|
||||
https://jaxb.dev.java.net/nonav/2.1.3/docs/xjcTask.html]
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Architecture for XML Binding (JAXB)\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/xml/jaxb/index.html
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
.TP 0.4i
|
||||
1\&.
|
||||
The \f3-p\fR option has the highest precedence\&.
|
||||
.TP 0.4i
|
||||
2\&.
|
||||
\fIjaxb:package\fR customization\&.
|
||||
.TP 0.4i
|
||||
3\&.
|
||||
If \f3targetNamespace\fR is declared, then apply the \f3t\fR\f3argetNamespace\fR to the Java package name algorithm defined in the specification\&.
|
||||
.TP 0.4i
|
||||
4\&.
|
||||
If no \f3targetNamespace\fR is declared, then use a hard coded package named \f3generated\fR\&.
|
||||
.PP
|
||||
You cannot have more than one \fIjaxb:schemaBindings\fR per name space, so it is impossible to have two schemas in the same target name space compiled into different Java packages\&.
|
||||
.PP
|
||||
All schemas being compiled into the same Java package must be submitted to the XJC binding compiler at the same time\&. They cannot be compiled independently and work as expected\&.
|
||||
.PP
|
||||
Element substitution groups that are spread across multiple schema files must be compiled at the same time\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Binding Compiler (xjc) at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/xjc\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Java Architecture for XML Binding (JAXB) at http://www\&.oracle\&.com/technetwork/articles/javase/index-140168\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,66 +1,90 @@
|
||||
." Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH appletviewer 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: appletviewer.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH appletviewer 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
appletviewer \- The Java Applet Viewer.
|
||||
.LP
|
||||
.LP
|
||||
The \f3appletviewer\fP command allows you to run applets outside of a web browser.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4appletviewer\fP \f2[\fP \f2options\fP \f2] \fP\f2urls\fP ...
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3appletviewer\fP command connects to the documents or resources designated by \f2urls\fP and displays each applet referenced by the documents in its own window. Note: if the documents referred to by \f2urls\fP do not reference any applets with the \f2OBJECT\fP, \f2EMBED\fP, or \f2APPLET\fP tag, then \f3appletviewer\fP does nothing. For details on the HTML tags that \f3appletviewer\fP supports, see
|
||||
.na
|
||||
\f2AppletViewer Tags\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/appletviewertags.html.
|
||||
.LP
|
||||
.LP
|
||||
\f3Note:\fP The \f3appletviewer\fP requires encoded URLs according to the escaping mechanism defined in RFC2396. Only encoded URLs are supported. However, file names must be unencoded, as specified in RFC2396.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-debug
|
||||
Starts the applet viewer in the Java debugger, jdb(1), thus allowing you to debug the applets in the document.
|
||||
.TP 3
|
||||
\-encoding \ \ encoding name
|
||||
Specify the input HTML file encoding name.
|
||||
.TP 3
|
||||
\-Jjavaoption
|
||||
Passes through the string \f2javaoption\fP as a single argument to the Java interpreter which runs the appletviewer. The argument should not contain spaces. Multiple argument words must all begin with the prefix \f3\-J\fP, which is stripped. This is useful for adjusting the compiler's execution environment or memory usage.
|
||||
.RE
|
||||
.SH NAME
|
||||
appletviewer \- Runs applets outside of a web browser\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
|
||||
\fBappletviewer\fR [\fIoptions\fR] \fIurl\fR\&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options separated by spaces\&. See Options\&.
|
||||
.TP
|
||||
\fIurl\fR
|
||||
The location of the documents or resources to be displayed\&. You can specify multiple URLs separated by spaces\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3appletviewer\fR command connects to the documents or resources designated by \fIurls\fR and displays each applet referenced by the documents in its own window\&. If the documents referred to by urls do not reference any applets with the \f3OBJECT\fR, \f3EMBED\fR, or \f3APPLET\fR tag, then the \f3appletviewer\fR command does nothing\&. For details about the HTML tags that the \f3appletviewer\fR command supports, see AppletViewer Tags at http://docs\&.oracle\&.com/javase/8/docs/technotes/tools/appletviewertags\&.html
|
||||
.PP
|
||||
The \f3appletviewer\fR command requires encoded URLs according to the escaping mechanism defined in RFC2396\&. Only encoded URLs are supported\&. However, file names must be unencoded, as specified in RFC2396\&.
|
||||
.PP
|
||||
\fINote:\fR The \f3appletviewer\fR command is intended for development purposes only\&. For more information, see About Sample/Test Applications and Code at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/aboutCodeSamples\&.html
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-debug
|
||||
.br
|
||||
Starts the Applet Viewer in the Java debugger with the \f3jdb\fR command to debug the applets in the document\&.
|
||||
.TP
|
||||
-encoding \fIencoding-name\fR
|
||||
.br
|
||||
Specifies the input HTML file encoding name\&.
|
||||
.TP
|
||||
-J\fIjavaoption\fR
|
||||
.br
|
||||
Passes the string \f3javaoption\fR as a single argument to the Java interpreter, which runs the Applet Viewer\&. The argument should not contain spaces\&. Multiple argument words must all begin with the prefix \f3-J\fR\&. This is useful for adjusting the compiler\&'s execution environment or memory usage\&.
|
||||
.PP
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,73 +1,91 @@
|
||||
." Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH extcheck 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: extcheck.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH extcheck 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
extcheck \- A utility to detect jar conflicts
|
||||
.LP
|
||||
.LP
|
||||
\f3extcheck\fP detects version conflicts between a target jar file and currently installed extension jar files.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
extcheck [ \-verbose ] targetfile.jar
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
extcheck \- Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3extcheck\fP utility checks a specified Jar file for title and version conflicts with any extensions installed in the Java(TM) SDK. Before installing an extension, you can use this utility to see if the same or a more recent version of the extension is already installed.
|
||||
.LP
|
||||
.LP
|
||||
The \f3extcheck\fP utility compares the \f2Specification\-title\fP and \f2Specification\-version\fP headers in the manifest of the \f2targetfile.jar\fP file against the corresponding headers in all Jar files currently installed in the extension directory. (The extension directory is \f2jre/lib/ext\fP by default.) The \f3extcheck\fP utility compares version numbers in the same way as the method \f2java.lang.Package.isCompatibleWith\fP.
|
||||
.LP
|
||||
.LP
|
||||
If no conflict is detected, the return code is \f20\fP.
|
||||
.LP
|
||||
.LP
|
||||
If the manifest of any jar file in the extensions directory has the same \f2Specification\-title\fP and the same or a newer \f2Specification\-version\fP number, a non\-zero error code is returned. A non\-zero error code is also returned if \f2targetfile.jar\fP does not have the \f2Specification\-title\fP or \f2Specification\-version\fP attributes in its manifest.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-verbose
|
||||
Lists Jar files in the extension directory as they are checked. Additionally, manifest attributes of the target jar file and any conflicting jar files are also reported.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
\fBextcheck\fR [\fIoptions\fR] \fItargetfile\&.jar\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fItargetfile\&.jar\fR
|
||||
The target JAR file against which the currently installed extension JAR files are compared to detect version conflicts\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3extcheck\fR command checks a specified JAR file for title and version conflicts with any extensions installed in the Java SE SDK\&. Before installing an extension, you can use this utility to see whether the same or a more recent version of the extension is already installed\&.
|
||||
.PP
|
||||
The \f3extcheck\fR command compares the Specification-title and Specification-version headers in the manifest of the \f3targetfile\&.jar\fR file against the corresponding headers in all JAR files currently installed in the extension directory\&. By default, the extension directory is \f3jre/lib/ext\fR on Oracle Solaris and \f3\ejre\elib\eext\fR on Windows\&. The \f3extcheck\fR command compares version numbers in the same way as the \f3java\&.lang\&.Package\&.isCompatibleWith\fR method\&.
|
||||
.PP
|
||||
If no conflict is detected, then the return code is 0\&.
|
||||
.PP
|
||||
If the manifest of any JAR file in the extensions directory has the same \f3Specification-title\fR and the same or a newer \f3Specification-version\fR number, then a non-zero error code is returned\&. A non-zero error code is also returned when \f3targetfile\&.jar\fR does not have the \f3Specification-title\fR or \f3Specification-version\fR attributes in its manifest file\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Lists JAR files in the extension directory as they are checked\&. Additionally, manifest attributes of the target JAR file and any conflicting JAR files are also reported\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \fIoption\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jar(1)
|
||||
.LP
|
||||
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,138 +1,159 @@
|
||||
." Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH javah 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: javah.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
javah \- C Header and Stub File Generator
|
||||
.LP
|
||||
.LP
|
||||
\f3javah\fP produces C header files and C source files from a Java class. These files provide the connective glue that allow your Java and C code to interact.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
javah [ \fP\f3options\fP\f3 ] fully\-qualified\-classname. . .
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
javah \- Generates C header and source files from a Java class\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3javah\fP generates C header and source files that are needed to implement native methods. The generated header and source files are used by C programs to reference an object's instance variables from native source code. The .h file contains a struct definition whose layout parallels the layout of the corresponding class. The fields in the struct correspond to instance variables in the class.
|
||||
.LP
|
||||
.LP
|
||||
The name of the header file and the structure declared within it are derived from the name of the class. If the class passed to \f3javah\fP is inside a package, the package name is prepended to both the header file name and the structure name. Underscores (_) are used as name delimiters.
|
||||
.LP
|
||||
.LP
|
||||
By default \f3javah\fP creates a header file for each class listed on the command line and puts the files in the current directory. Use the \f2\-stubs\fP option to create source files. Use the \f2\-o\fP option to concatenate the results for all listed classes into a single file.
|
||||
.LP
|
||||
.LP
|
||||
The new native method interface, Java Native Interface (JNI), does not require header information or stub files. \f3javah\fP can still be used to generate native method function proptotypes needed for JNI\-style native methods. \f3javah\fP produces JNI\-style output by default, and places the result in the .h file.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-o outputfile
|
||||
Concatenates the resulting header or source files for all the classes listed on the command line into \f2outputfile\fP. Only one of \f3\-o\fP or \f3\-d\fP may be used.
|
||||
.TP 3
|
||||
\-d directory
|
||||
Sets the directory where \f3javah\fP saves the header files or the stub files. Only one of \f3\-d\fP or \f3\-o\fP may be used.
|
||||
.TP 3
|
||||
\-stubs
|
||||
Causes \f3javah\fP to generate C declarations from the Java object file.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Indicates verbose output and causes \f3javah\fP to print a message to stdout concerning the status of the generated files.
|
||||
.TP 3
|
||||
\-help
|
||||
Print help message for \f3javah\fP usage.
|
||||
.TP 3
|
||||
\-version
|
||||
Print out \f3javah\fP version information.
|
||||
.TP 3
|
||||
\-jni
|
||||
Causes \f3javah\fP to create an output file containing JNI\-style native method function prototypes. This is the default output, so use of \f3\-jni\fP is optional.
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specifies the path \f3javah\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:<your_path>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/home/avh/classes:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP (a java program cannot tell the difference between the two invocations).
|
||||
\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIfully-qualified-class-name\fR
|
||||
The fully qualified location of the classes to be converted to C header and source files\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3javah\fR command generates C header and source files that are needed to implement native methods\&. The generated header and source files are used by C programs to reference an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&.
|
||||
.PP
|
||||
The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&.
|
||||
.PP
|
||||
By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&.
|
||||
.PP
|
||||
The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-o \fIoutputfile\fR
|
||||
.br
|
||||
Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&.
|
||||
.TP
|
||||
-d \fIdirectory\fR
|
||||
.br
|
||||
For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to a \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started \-\- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking \f2System.getenv("CLASSPATH")\fP.
|
||||
.TP 3
|
||||
\-bootclasspath path
|
||||
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java 2 platform located in \f2jre/lib/rt.jar\fP and several other jar files.
|
||||
.TP 3
|
||||
\-old
|
||||
Specifies that old JDK1.0\-style header files should be generated.
|
||||
.TP 3
|
||||
\-force
|
||||
Specifies that output files should always be written.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&.
|
||||
.TP
|
||||
-stubs
|
||||
.br
|
||||
Causes the \f3javah\fR command to generate C declarations from the Java object file\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Prints a help message for \f3javah\fR usage\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints \f3javah\fR command release information\&.
|
||||
.TP
|
||||
-jni
|
||||
.br
|
||||
Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&.
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is:
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons, for example,
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/home/avh/classes:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
\fIOracle Solaris\fR:
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
javac(1), java(1), jdb(1), javap(1), javadoc(1)
|
||||
.LP
|
||||
|
||||
\&.:\fIyour-path\fR
|
||||
|
||||
Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR
|
||||
|
||||
\fIWindows\fR:
|
||||
|
||||
\&.;\fIyour-path\fR
|
||||
|
||||
Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR
|
||||
|
||||
As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&.
|
||||
|
||||
For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&.
|
||||
.TP
|
||||
-bootclasspath \fIpath\fR
|
||||
.br
|
||||
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&.
|
||||
.TP
|
||||
-old
|
||||
.br
|
||||
Specifies that old JDK 1\&.0-style header files should be generated\&.
|
||||
.TP
|
||||
-force
|
||||
.br
|
||||
Specifies that output files should always be written\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javah(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jdb(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javap(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javadoc(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,317 +1,443 @@
|
||||
." Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH javap 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: javap.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH javap 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
javap \- The Java Class File Disassembler
|
||||
.LP
|
||||
.LP
|
||||
Disassembles class files.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
javap [ \fP\f3options\fP\f3 ] classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
javap \- Disassembles one or more class files\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3javap\fP command disassembles one or more class files. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
classes
|
||||
List of one or more classes (separated by spaces) to be processed for annotations (such as \f2DocFooter.class\fP). You may specify a class that can be found in the class path, by its file name (for example, \f2/home/user/myproject/src/DocFooter.class\fP), or with a URL (for example, \f2file:///home/user/myproject/src/DocFooter.class\fP).
|
||||
.RE
|
||||
\fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclassfile\fR
|
||||
One or more classes separated by spaces to be processed for annotations such as DocFooter\&.class\&. You can specify a class that can be found in the class path, by its file name or with a URL such as \f3file:///home/user/myproject/src/DocFooter\&.class\fR\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3javap\fR command disassembles one or more class files\&. The output depends on the options used\&. When no options are used, then the \f3javap\fR command prints the package, protected and public fields, and methods of the classes passed to it\&. The \f3javap\fR command prints its output to \f3stdout\fR\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-help, --help, -?
|
||||
.br
|
||||
Prints a help message for the \f3javap\fR command\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints release information\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
Prints line and local variable tables\&.
|
||||
.TP
|
||||
-public
|
||||
.br
|
||||
Shows only public classes and members\&.
|
||||
.TP
|
||||
-protected
|
||||
.br
|
||||
Shows only protected and public classes and members\&.
|
||||
.TP
|
||||
-private, -p
|
||||
.br
|
||||
Shows all classes and members\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes the specified option to the JVM\&. For example:
|
||||
.sp
|
||||
.nf
|
||||
\f3javap \-J\-version\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3javap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For example, compile the following class declaration:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.awt.*;
|
||||
.fl
|
||||
import java.applet.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class DocFooter extends Applet {
|
||||
.fl
|
||||
String date;
|
||||
.fl
|
||||
String email;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void init() {
|
||||
.fl
|
||||
resize(500,100);
|
||||
.fl
|
||||
date = getParameter("LAST_UPDATED");
|
||||
.fl
|
||||
email = getParameter("EMAIL");
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void paint(Graphics g) {
|
||||
.fl
|
||||
g.drawString(date + " by ",100, 15);
|
||||
.fl
|
||||
g.drawString(email,290,15);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The output from \f3javap DocFooter.class\fP yields:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Compiled from "DocFooter.java"
|
||||
.fl
|
||||
public class DocFooter extends java.applet.Applet {
|
||||
.fl
|
||||
java.lang.String date;
|
||||
.fl
|
||||
java.lang.String email;
|
||||
.fl
|
||||
public DocFooter();
|
||||
.fl
|
||||
public void init();
|
||||
.fl
|
||||
public void paint(java.awt.Graphics);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The output from \f3javap \-c DocFooter.class\fP yields:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Compiled from "DocFooter.java"
|
||||
.fl
|
||||
public class DocFooter extends java.applet.Applet {
|
||||
.fl
|
||||
java.lang.String date;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
java.lang.String email;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public DocFooter();
|
||||
.fl
|
||||
Code:
|
||||
.fl
|
||||
0: aload_0
|
||||
.fl
|
||||
1: invokespecial #1 // Method java/applet/Applet."<init>":()V
|
||||
.fl
|
||||
4: return
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void init();
|
||||
.fl
|
||||
Code:
|
||||
.fl
|
||||
0: aload_0
|
||||
.fl
|
||||
1: sipush 500
|
||||
.fl
|
||||
4: bipush 100
|
||||
.fl
|
||||
6: invokevirtual #2 // Method resize:(II)V
|
||||
.fl
|
||||
9: aload_0
|
||||
.fl
|
||||
10: aload_0
|
||||
.fl
|
||||
11: ldc #3 // String LAST_UPDATED
|
||||
.fl
|
||||
13: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String;
|
||||
.fl
|
||||
16: putfield #5 // Field date:Ljava/lang/String;
|
||||
.fl
|
||||
19: aload_0
|
||||
.fl
|
||||
20: aload_0
|
||||
.fl
|
||||
21: ldc #6 // String EMAIL
|
||||
.fl
|
||||
23: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String;
|
||||
.fl
|
||||
26: putfield #7 // Field email:Ljava/lang/String;
|
||||
.fl
|
||||
29: return
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public void paint(java.awt.Graphics);
|
||||
.fl
|
||||
Code:
|
||||
.fl
|
||||
0: aload_1
|
||||
.fl
|
||||
1: new #8 // class java/lang/StringBuilder
|
||||
.fl
|
||||
4: dup
|
||||
.fl
|
||||
5: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V
|
||||
.fl
|
||||
8: aload_0
|
||||
.fl
|
||||
9: getfield #5 // Field date:Ljava/lang/String;
|
||||
.fl
|
||||
12: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
.fl
|
||||
15: ldc #11 // String by
|
||||
.fl
|
||||
17: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
.fl
|
||||
20: invokevirtual #12 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
|
||||
.fl
|
||||
23: bipush 100
|
||||
.fl
|
||||
25: bipush 15
|
||||
.fl
|
||||
27: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V
|
||||
.fl
|
||||
30: aload_1
|
||||
.fl
|
||||
31: aload_0
|
||||
.fl
|
||||
32: getfield #7 // Field email:Ljava/lang/String;
|
||||
.fl
|
||||
35: sipush 290
|
||||
.fl
|
||||
38: bipush 15
|
||||
.fl
|
||||
40: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V
|
||||
.fl
|
||||
43: return
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-help \-\-help \-?
|
||||
Prints out help message for \f3javap\fP.
|
||||
.TP 3
|
||||
\-version
|
||||
Prints out version information.
|
||||
.TP 3
|
||||
\-l
|
||||
Prints out line and local variable tables.
|
||||
.TP 3
|
||||
\-public
|
||||
Shows only public classes and members.
|
||||
.TP 3
|
||||
\-protected
|
||||
Shows only protected and public classes and members.
|
||||
.TP 3
|
||||
\-package
|
||||
Shows only package, protected, and public classes and members. This is the default.
|
||||
.TP 3
|
||||
\-private \-p
|
||||
Shows all classes and members.
|
||||
.TP 3
|
||||
\-Jflag
|
||||
Pass \f2flag\fP directly to the runtime system. Some examples:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
javap \-J\-version
|
||||
.fl
|
||||
javap \-J\-Djava.security.manager \-J\-Djava.security.policy=MyPolicy MyClassName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-s
|
||||
Prints internal type signatures.
|
||||
.TP 3
|
||||
\-sysinfo
|
||||
Shows system information (path, size, date, MD5 hash) of the class being processed.
|
||||
.TP 3
|
||||
\-constants
|
||||
Shows static final constants.
|
||||
.TP 3
|
||||
\-c
|
||||
Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the
|
||||
.na
|
||||
\f2Java Virtual Machine Specification\fP @
|
||||
.fi
|
||||
http://java.sun.com/docs/books/vmspec/.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Prints stack size, number of \f2locals\fP and \f2args\fP for methods.
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set.
|
||||
.TP 3
|
||||
\-bootclasspath path
|
||||
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in \f2jre/lib/rt.jar\fP and several other jar files.
|
||||
.TP 3
|
||||
\-extdirs dirs
|
||||
Overrides location at which installed extensions are searched for. The default location for extensions is the value of \f2java.ext.dirs\fP.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
javac(1), java(1), jdb(1), javah(1), javadoc(1)
|
||||
.LP
|
||||
|
||||
For more information about JVM options, see the \f3java(1)\fR command documentation\&.
|
||||
.TP
|
||||
-s
|
||||
.br
|
||||
Prints internal type signatures\&.
|
||||
.TP
|
||||
-sysinfo
|
||||
.br
|
||||
Shows system information (path, size, date, MD5 hash) of the class being processed\&.
|
||||
.TP
|
||||
-constants
|
||||
.br
|
||||
Shows \f3static final\fR constants\&.
|
||||
.TP
|
||||
-c
|
||||
.br
|
||||
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Prints stack size, number of locals and arguments for methods\&.
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
Specifies the path the \f3javap\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&.
|
||||
.TP
|
||||
-bootclasspath \fIpath\fR
|
||||
.br
|
||||
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre/lib/rt\&.jar\fR and several other JAR files\&.
|
||||
.TP
|
||||
-extdir \fIdirs\fR
|
||||
.br
|
||||
Overrides the location at which installed extensions are searched for\&. The default location for extensions is the value of \f3java\&.ext\&.dirs\fR\&.
|
||||
.SH EXAMPLE
|
||||
Compile the following \f3DocFooter\fR class:
|
||||
.sp
|
||||
.nf
|
||||
\f3import java\&.awt\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3import java\&.applet\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class DocFooter extends Applet {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 String date;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 String email;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void init() {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 resize(500,100);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 date = getParameter("LAST_UPDATED");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 email = getParameter("EMAIL");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void paint(Graphics g) {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 g\&.drawString(date + " by ",100, 15);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 g\&.drawString(email,290,15);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 }\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The output from the \f3javap DocFooter\&.class\fR command yields the following:
|
||||
.sp
|
||||
.nf
|
||||
\f3Compiled from "DocFooter\&.java"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String date;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String email;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public DocFooter();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void init();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void paint(java\&.awt\&.Graphics);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The output from \f3javap -c DocFooter\&.class\fR command yields the following:
|
||||
.sp
|
||||
.nf
|
||||
\f3Compiled from "DocFooter\&.java"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3public class DocFooter extends java\&.applet\&.Applet {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String date;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.lang\&.String email;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public DocFooter();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Code:\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 0: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 1: invokespecial #1 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3java/applet/Applet\&."<init>":()V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 4: return \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void init();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Code:\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 0: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 1: sipush 500\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 4: bipush 100\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 6: invokevirtual #2 // Method resize:(II)V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 9: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 10: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 11: ldc #3 // String LAST_UPDATED\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 13: invokevirtual #4 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 16: putfield #5 // Field date:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 19: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 20: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 21: ldc #6 // String EMAIL\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 23: invokevirtual #4 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 getParameter:(Ljava/lang/String;)Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 26: putfield #7 // Field email:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 29: return \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 public void paint(java\&.awt\&.Graphics);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Code:\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 0: aload_1 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 1: new #8 // class java/lang/StringBuilder\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 4: dup \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 5: invokespecial #9 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&."<init>":()V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 8: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 9: getfield #5 // Field date:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 12: invokevirtual #10 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 15: ldc #11 // String by \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 17: invokevirtual #10 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 20: invokevirtual #12 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 23: bipush 100\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 25: bipush 15\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 27: invokevirtual #13 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 30: aload_1 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 31: aload_0 \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 32: getfield #7 // Field email:Ljava/lang/String;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 35: sipush 290\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 38: bipush 15\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 40: invokevirtual #13 // Method\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 43: return \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javac(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jdb(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javah(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javadoc(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,124 +1,114 @@
|
||||
." Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jcmd 1 "22 Novembre 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jcmd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jcmd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jcmd \- Diagnostic Command
|
||||
.SH NAME
|
||||
jcmd \- Sends diagnostic command requests to a running Java Virtual Machine (JVM)\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR [\fB\-l\fR|\fB\-h\fR|\fB\-help\fR]
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fBPerfCounter\&.print\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fB\-f\fR \fIfilename\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjcmd\fR \fIpid\fR|\fImain\-class\fR \fIcommand\fR[ \fIarguments\fR]
|
||||
.fi
|
||||
.sp
|
||||
.SH DESCRIPTION
|
||||
The \f3jcmd\fR utility is used to send diagnostic command requests to the JVM\&. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM\&.
|
||||
.PP
|
||||
\fINote:\fR To invoke diagnostic commands from a remote machine or with different identiers, you can use the \f3com\&.sun\&.management\&.DiagnosticCommandMBean\fR interface\&. For more information about the \f3DiagnosticCommandMBean\fR interface, see the API documentation at http://download\&.java\&.net/jdk8/docs/jre/api/management/extension/com/sun/management/DiagnosticCommandMBean\&.html
|
||||
.PP
|
||||
If you run \f3jcmd\fR without arguments or with the \f3-l\fR option, it prints the list of running Java process identifiers with the main class and command-line arguments that were used to launch the process\&. Running \f3jcmd\fR with the \f3-h\fR or \f3-help\fR option prints the tool\(cqs help message\&.
|
||||
.PP
|
||||
If you specify the processes identifier (\fIpid\fR) or the main class (\fImain-class\fR) as the first argument, \f3jcmd\fR sends the diagnostic command request to the Java process with the specified identifier or to all Java processes with the specified name of the main class\&. You can also send the diagnostic command request to all available Java processes by specifying \f30\fR as the process identifier\&. Use one of the following as the diagnostic command request:
|
||||
.TP
|
||||
Perfcounter\&.print
|
||||
Prints the performance counters available for the specified Java process\&. The list of performance counters might vary with the Java process\&.
|
||||
.TP
|
||||
-f \fIfilename\fR
|
||||
.br
|
||||
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jcmd\fP [ option ]
|
||||
.fl
|
||||
\f3jcmd\fP <\fIpid\fR | \fImain class\fR> PerfCounter.print
|
||||
.fl
|
||||
\f3jcmd\fP <\fIpid\fR | \fImain class\fR> \fIcommand\fR [\fIarguments\fR]
|
||||
.fl
|
||||
\f3jcmd\fP <\fIpid\fR | \fImain class\fR> -f \fIfile\fR
|
||||
.fl
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jcmd\fP is a utility to send diagnostic command requests to a Java
|
||||
Virtual Machine supporting this feature. Used without arguments or with the \-l option, jcmd prints the list of running Java processes with their process id, their main class and their command line arguments. When a process id is specified on the command line, jcmd sends the diagnostic command request to the process with this id. When a main class is specified on the command line, jcmd sends the diagnostic command request to all Java processes with this main class. With the PerfCounter.print argument, jcmd prints the performance counters available on the targeted Java process(es). With the \-f option, jcmd sends to the targeted Java process(es) the diagnostic commands stored in the file \fIfile\fR.
|
||||
.LP
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
Options are mutually exclusive. Options, if used, should follow immediately after the command name.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-l
|
||||
prints the list of running Java processes with their process id, their
|
||||
main class and their command line arguments.
|
||||
.TP 3
|
||||
\-h
|
||||
prints a help message.
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-help
|
||||
prints a help message
|
||||
.br
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\fIpid\fR
|
||||
Identifies the process which will receive the diagnostic command requests. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) or jcmd(1) may be used.
|
||||
.RE
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\fImain class\fR
|
||||
Main class of the process which will receive the diagnostic command requests. If several running Java processes share this main class, the diagnostic command request will be sent to all these processes. To get a list of Java processes running on a machine, jps(1) or jcmd(1) may be used.
|
||||
.RE
|
||||
.RS 3
|
||||
.TP 3
|
||||
The name of the file from which to read diagnostic commands and send them to the specified Java process\&. Used only with the \f3-f\fR option\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&.
|
||||
.TP
|
||||
\fIcommand\fR [\fIarguments\fR]
|
||||
Invoke the diagnostic command called \fIcommand\fR on the targeted Java
|
||||
process(es). The list of available diagnostic commands for a given
|
||||
process can be obtained by invoking the 'help' command on this process.
|
||||
Each diagnostic command has its own set of \fIarguments\fR which can be
|
||||
obtained by invoking the 'help' command followed by the command name.
|
||||
.RE
|
||||
.RS 3
|
||||
.TP 3
|
||||
\fIPerfCounter.print\fR
|
||||
Print the performance counters available on the targeted Java
|
||||
process(es). The list of performance counters may vary with the Java
|
||||
process.
|
||||
.RE
|
||||
.RS 3
|
||||
.TP 3
|
||||
\fI-f file\fR
|
||||
Read commands from \fIfile\fR and invoke them on the targeted Java
|
||||
process(es). In \fIfile\fR, each command must be written on a single line.
|
||||
Lines starting with # are ignored. Processing of \fIfile\fR ends when
|
||||
all lines have been invoked or when a line containing the 'stop' keyword
|
||||
is read.
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
jps(1)
|
||||
.RE
|
||||
The command to be sent to the specified Java process\&. The list of available diagnostic commands for a given process can be obtained by sending the \f3help\fR command to this process\&. Each diagnostic command has its own set of arguments\&. To see the description, syntax, and a list of available arguments for a command, use the name of the command as the argument for the \f3help\fR command\&.
|
||||
|
||||
|
||||
\fINote:\fR If any arguments contain spaces, you must surround them with single or double quotation marks (\f3\&'\fR or \f3"\fR)\&. In addition, you must escape single or double quotation marks with a backslash (\f3\e\fR) to prevent the operating system shell from processing quotation marks\&. Alternatively, you can surround these arguments with single quotation marks and then with double quotation marks (or with double quotation marks and then with single quotation marks)\&.
|
||||
.SH OPTIONS
|
||||
Options are mutually exclusive\&.
|
||||
.TP
|
||||
-f \fIfilename\fR
|
||||
.br
|
||||
Reads commands from the specified file\&. This option can be used only if you specify the process identifier or the main class as the first argument\&. Each command in the file must be written on a single line\&. Lines starting with a number sign (\f3#\fR) are ignored\&. Processing of the file ends when all lines have been read or when a line containing the \f3stop\fR keyword is read\&.
|
||||
.TP
|
||||
-h, -help
|
||||
.br
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
Prints the list of running Java processes identifiers with the main class and command-line arguments\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,137 +1,113 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jconsole 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Troubleshooting, Profiling, Monitoring and Management Tools
|
||||
.\" Title: jconsole.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jconsole 1 "21 November 2013" "JDK 8" "Java Troubleshooting, Profiling, Monitoring and Management Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jconsole \- Java Monitoring and Management Console
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jconsole\fP [ \f2options\fP ] [ connection ... ]
|
||||
.fl
|
||||
.SH NAME
|
||||
jconsole \- Starts a graphical console that lets you monitor and manage Java applications\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.fl
|
||||
.fi
|
||||
\fBjconsole\fR [ \fIoptions\fR ] [ connection \&.\&.\&. ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
connection = \fIpid\fR | \fIhost\fR:\fIport\fR | \fIjmxURL\fR
|
||||
The \f3pid\fR value is the process ID of a local Java Virtual Machine (JVM)\&. The JVM must be running with the same user ID as the user ID running the \f3jconsole\fR command\&.The \f3host:port\fR values are the name of the host system on which the JVM is running, and the port number specified by the system property \f3com\&.sun\&.management\&.jmxremote\&.port\fR when the JVM was started\&.The \f3jmxUrl\fR value is the address of the JMX agent to be connected to as described in JMXServiceURL\&.
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Options, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
connection = pid | host:port | jmxUrl
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2pid\fP Process ID of a local Java VM. The Java VM must be running with the same user ID as the user ID running jconsole. See
|
||||
.na
|
||||
\f2JMX Monitoring and Management\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details.
|
||||
.TP 2
|
||||
o
|
||||
\f2host\fP:\f2port\fP Name of the host system on which the Java VM is running and the port number specified by the system property \f2com.sun.management.jmxremote.port\fP when the Java VM was started. See
|
||||
.na
|
||||
\f2JMX Monitoring and Management\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/agent.html for details.
|
||||
.TP 2
|
||||
o
|
||||
\f2jmxUrl\fP Address of the JMX agent to be connected to as described in
|
||||
.na
|
||||
\f2JMXServiceURL\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/javax/management/remote/JMXServiceURL.html.
|
||||
.RE
|
||||
.RE
|
||||
For more information about the \f3connection\fR parameter, see Monitoring and Management Using JMX Technology at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/management/agent\&.html
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jconsole\fP command launches a graphical console tool that enables you to monitor and manage Java applications and virtual machines on a local or remote machine.
|
||||
.LP
|
||||
.LP
|
||||
On Windows, \f3jconsole\fP does not associate with a console window. It will, however, display a dialog box with error information if the \f3jconsole\fP command fails for some reason.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-interval=n
|
||||
Set the update interval to \f2n\fP seconds (default is 4 seconds).
|
||||
.TP 3
|
||||
\-notile
|
||||
Do not tile windows initially (for two or more connections).
|
||||
.TP 3
|
||||
\-pluginpath plugins
|
||||
Specify a list of directories or JAR files which are searched for JConsole plugins. The \f2plugins\fP path should contain a provider\-configuration file named:
|
||||
See also the \f3JMXServiceURL\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/javax/management/remote/JMXServiceURL\&.html
|
||||
.SH DESCRIPTION
|
||||
The \f3jconsole\fR command starts a graphical console tool that lets you monitor and manage Java applications and virtual machines on a local or remote machine\&.
|
||||
.PP
|
||||
On Windows, the \f3jconsole\fR command does not associate with a console window\&. It does, however, display a dialog box with error information when the \f3jconsole\fR command fails\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-interval\fI=n\fR
|
||||
.br
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
META\-INF/services/com.sun.tools.jconsole.JConsolePlugin
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
containing one line for each plugin specifying the fully qualified class name of the class implementing the
|
||||
.na
|
||||
\f2com.sun.tools.jconsole.JConsolePlugin\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/JConsolePlugin.html class.
|
||||
.TP 3
|
||||
\-version
|
||||
Output version information and exit.
|
||||
.TP 3
|
||||
\-help
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Pass <flag> to the Java virtual machine on which jconsole is run.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Using JConsole\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/jconsole.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Monitoring and Management for Java Platform\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/management/index.html
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Sets the update interval to \fIn\fR seconds (default is 4 seconds)\&.
|
||||
.TP
|
||||
-notile
|
||||
.br
|
||||
Does not tile windows initially (for two or more connections)\&.
|
||||
.TP
|
||||
-pluginpath \fIplugins\fR
|
||||
.br
|
||||
Specifies a list of directories or JAR files to be searched for \f3JConsole\fR plug-ins\&. The \fIplugins\fR path should contain a provider-configuration file named \f3META-INF/services/com\&.sun\&.tools\&.jconsole\&.JConsolePlugin\fR that contains one line for each plug-in\&. The line specifies the fully qualified class name of the class implementing the \f3com\&.sun\&.tools\&.jconsole\&.JConsolePlugin\fR class\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Displays release information and exits\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
Passes \f3flag\fR to the JVM on which the \f3jconsole\fR command is run\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Using JConsole at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/management/jconsole\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Monitoring and Management Using JMX Technology at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/management/agent\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3JMXServiceURL\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/javax/management/remote/JMXServiceURL\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,330 +1,271 @@
|
||||
." Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jdb 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: jdb.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jdb 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jdb \- The Java Debugger
|
||||
.LP
|
||||
.LP
|
||||
\f3jdb\fP helps you find and fix bugs in Java language programs.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jdb\fP [ options ] [ class ] [ arguments ]
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jdb \- Finds and fixes bugs in Java platform programs\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options, as specified below.
|
||||
.TP 3
|
||||
class
|
||||
Name of the class to begin debugging.
|
||||
.TP 3
|
||||
arguments
|
||||
Arguments passed to the \f2main()\fP method of \f2class\fP.
|
||||
.RE
|
||||
\fBjdb\fR [\fIoptions\fR] [\fIclassname\fR] [\fIarguments\fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclass\fRname
|
||||
Name of the main class to debug\&.
|
||||
.TP
|
||||
\fIarguments\fR
|
||||
Arguments passed to the \f3main()\fR method of the class\&.
|
||||
.SH DESCRIPTION
|
||||
The Java Debugger (JDB) is a simple command-line debugger for Java classes\&. The \f3jdb\fR command and its options call the JDB\&. The \f3jdb\fR command demonstrates the Java Platform Debugger Architecture (JDBA) and provides inspection and debugging of a local or remote Java Virtual Machine (JVM)\&. See Java Platform Debugger Architecture (JDBA) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jpda/index\&.html
|
||||
.SS START\ A\ JDB\ SESSION
|
||||
There are many ways to start a JDB session\&. The most frequently used way is to have JDB launch a new JVM with the main class of the application to be debugged\&. Do this by substituting the \f3jdb\fR command for the \f3java\fR command in the command line\&. For example, if your application\&'s main class is \f3MyClass\fR, then use the following command to debug it under JDB:
|
||||
.sp
|
||||
.nf
|
||||
\f3jdb MyClass\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
When started this way, the \f3jdb\fR command calls a second JVM with the specified parameters, loads the specified class, and stops the JVM before executing that class\&'s first instruction\&.
|
||||
.PP
|
||||
Another way to use the \f3jdb\fR command is by attaching it to a JVM that is already running\&. Syntax for starting a JVM to which the \f3jdb\fR command attaches when the JVM is running is as follows\&. This loads in-process debugging libraries and specifies the kind of connection to be made\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3java \-agentlib:jdwp=transport=dt_socket,server=y,suspend=n MyClass\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
You can then attach the \f3jdb\fR command to the JVM with the following command:
|
||||
.sp
|
||||
.nf
|
||||
\f3jdb \-attach 8000\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The \f3MyClass\fR argument is not specified in the \f3jdb\fR command line in this case because the \f3jdb\fR command is connecting to an existing JVM instead of launching a new JVM\&.
|
||||
.PP
|
||||
There are many other ways to connect the debugger to a JVM, and all of them are supported by the \f3jdb\fR command\&. The Java Platform Debugger Architecture has additional documentation on these connection options\&.
|
||||
.SS BASIC\ JDB\ COMMANDS
|
||||
The following is a list of the basic \f3jdb\fR commands\&. The JDB supports other commands that you can list with the \f3-help\fR option\&.
|
||||
.TP
|
||||
help or ?
|
||||
The \f3help\fR or \f3?\fR commands display the list of recognized commands with a brief description\&.
|
||||
.TP
|
||||
run
|
||||
After you start JDB and set breakpoints, you can use the \f3run\fR command to execute the debugged application\&. The \f3run\fR command is available only when the \f3jdb\fR command starts the debugged application as opposed to attaching to an existing JVM\&.
|
||||
.TP
|
||||
cont
|
||||
Continues execution of the debugged application after a breakpoint, exception, or step\&.
|
||||
.TP
|
||||
print
|
||||
Displays Java objects and primitive values\&. For variables or fields of primitive types, the actual value is printed\&. For objects, a short description is printed\&. See the dump command to find out how to get more information about an object\&.
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The Java Debugger, \f3jdb\fP, is a simple command\-line debugger for Java classes. It is a demonstration of the
|
||||
.na
|
||||
\f2Java Platform Debugger Architecture\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/jpda/index.html that provides inspection and debugging of a local or remote Java Virtual Machine.
|
||||
.LP
|
||||
.SS
|
||||
Starting a jdb Session
|
||||
.LP
|
||||
.LP
|
||||
There are many ways to start a jdb session. The most frequently used way is to have \f3jdb\fP launch a new Java Virtual Machine (VM) with the main class of the application to be debugged. This is done by substituting the command \f3jdb\fP for \f3java\fP in the command line. For example, if your application's main class is MyClass, you use the following command to debug it under JDB:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% jdb MyClass
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
\fINote:\fR To display local variables, the containing class must have been compiled with the \f3javac -g\fR option\&.
|
||||
|
||||
.LP
|
||||
.LP
|
||||
When started this way, \f3jdb\fP invokes a second Java VM with any specified parameters, loads the specified class, and stops the VM before executing that class's first instruction.
|
||||
.LP
|
||||
.LP
|
||||
Another way to use \f3jdb\fP is by attaching it to a Java VM that is already running. Syntax for Starting a VM to which jdb will attach when the VM is running is as follows. This loads in\-process debugging libraries and specifies the kind of connection to be made.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-agentlib:jdwp=transport=dt_socket,server=y,suspend=n
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The \f3print\fR command supports many simple Java expressions including those with method invocations, for example:
|
||||
.sp
|
||||
.nf
|
||||
\f3print MyClass\&.myStaticField\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print myObj\&.myInstanceField\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print i + j + k (i, j, k are primities and either fields or local variables)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print myObj\&.myMethod() (if myMethod returns a non\-null)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3print new java\&.lang\&.String("Hello")\&.length()\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For example, the following command will run the MyClass application, and allow \f3jdb\fP to connect to it at a later time.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% java \-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n MyClass
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP
|
||||
dump
|
||||
For primitive values, the \f3dump\fR command is identical to the \f3print\fR command\&. For objects, the \f3dump\fR command prints the current value of each field defined in the object\&. Static and instance fields are included\&. The \f3dump\fR command supports the same set of expressions as the \f3print\fR command\&.
|
||||
.TP
|
||||
threads
|
||||
List the threads that are currently running\&. For each thread, its name and current status are printed and an index that can be used in other commands\&. In this example, the thread index is 4, the thread is an instance of \f3java\&.lang\&.Thread\fR, the thread name is \f3main\fR, and it is currently running\&.
|
||||
.sp
|
||||
.nf
|
||||
\f34\&. (java\&.lang\&.Thread)0x1 main running\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
You can then attach \f3jdb\fP to the VM with the following commmand:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% jdb \-attach 8000
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP
|
||||
thread
|
||||
Select a thread to be the current thread\&. Many \f3jdb\fR commands are based on the setting of the current thread\&. The thread is specified with the thread index described in the threads command\&.
|
||||
.TP
|
||||
where
|
||||
The \f3where\fR command with no arguments dumps the stack of the current thread\&. The \f3where\fR\f3all\fR command dumps the stack of all threads in the current thread group\&. The \f3where\fR\f3threadindex\fR command dumps the stack of the specified thread\&.
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Note that "MyClass" is not specified in the \f3jdb\fP command line in this case because \f3jdb\fP is connecting to an existing VM instead of launching a new one.
|
||||
.LP
|
||||
.LP
|
||||
There are many other ways to connect the debugger to a VM, and all of them are supported by \f3jdb\fP. The Java Platform Debugger Architecture has additional
|
||||
.na
|
||||
\f2documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection options. For information on starting a J2SE 1.4.2 or early VM for use with \f3jdb\fP see the
|
||||
.na
|
||||
\f21.4.2 documentation\fP @
|
||||
.fi
|
||||
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
|
||||
.LP
|
||||
.SS
|
||||
Basic jdb Commands
|
||||
.LP
|
||||
.LP
|
||||
The following is a list of the basic \f3jdb\fP commands. The Java debugger supports other commands which you can list using \f3jdb\fP's \f2help\fP command.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
help, or ?
|
||||
The most important \f3jdb\fP command, \f2help\fP displays the list of recognized commands with a brief description.
|
||||
.TP 3
|
||||
run
|
||||
After starting \f3jdb\fP, and setting any necessary breakpoints, you can use this command to start the execution the debugged application. This command is available only when \f3jdb\fP launches the debugged application (as opposed to attaching to an existing VM).
|
||||
.TP 3
|
||||
cont
|
||||
Continues execution of the debugged application after a breakpoint, exception, or step.
|
||||
.TP 3
|
||||
print
|
||||
Displays Java objects and primitive values. For variables or fields of primitive types, the actual value is printed. For objects, a short description is printed. See the \f2dump\fP command below for getting more information about an object.
|
||||
If the current thread is suspended either through an event such as a breakpoint or through the \f3suspend\fR command, then local variables and fields can be displayed with the \f3print\fR and \f3dump\fR commands\&. The \f3up\fR and \f3down\fR commands select which stack frame is the current stack frame\&.
|
||||
.SS BREAKPOINTS
|
||||
Breakpoints can be set in JDB at line numbers or at the first instruction of a method, for example:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The command \f3stop at MyClass:22\fR sets a breakpoint at the first instruction for line 22 of the source file containing \f3MyClass\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The command \f3stop in java\&.lang\&.String\&.length\fR sets a breakpoint at the beginning of the method \f3java\&.lang\&.String\&.length\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The command \f3stop in MyClass\&.<clinit>\fR uses \f3<clinit>\fR to identify the static initialization code for \f3MyClass\fR\&.
|
||||
.PP
|
||||
When a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint\&. For example, \f3MyClass\&.myMethod(int,java\&.lang\&.String)\fR or \f3MyClass\&.myMethod()\fR\&.
|
||||
.PP
|
||||
The \f3clear\fR command removes breakpoints using the following syntax: \f3clear MyClass:45\fR\&. Using the \f3clear\fR or \f3stop\fR command with no argument displays a list of all breakpoints currently set\&. The \f3cont\fR command continues execution\&.
|
||||
.SS STEPPING
|
||||
The \f3step\fR command advances execution to the next line whether it is in the current stack frame or a called method\&. The \f3next\fR command advances execution to the next line in the current stack frame\&.
|
||||
.SS EXCEPTIONS
|
||||
When an exception occurs for which there is not a \f3catch\fR statement anywhere in the throwing thread\&'s call stack, the JVM typically prints an exception trace and exits\&. When running under JDB, however, control returns to JDB at the offending throw\&. You can then use the \f3jdb\fR command to diagnose the cause of the exception\&.
|
||||
.PP
|
||||
Use the \f3catch\fR command to cause the debugged application to stop at other thrown exceptions, for example: \f3catch java\&.io\&.FileNotFoundException\fR or \f3catch\fR\f3mypackage\&.BigTroubleException\fR\&. Any exception that is an instance of the specified class or subclass stops the application at the point where it is thrown\&.
|
||||
.PP
|
||||
The \f3ignore\fR command negates the effect of an earlier \f3catch\fR command\&. The \f3ignore\fR command does not cause the debugged JVM to ignore specific exceptions, but only to ignore the debugger\&.
|
||||
.SH OPTIONS
|
||||
When you use the \f3jdb\fR command instead of the \f3java\fR command on the command line, the \f3jdb\fR command accepts many of the same options as the \f3java\fR command, including \f3-D\fR, \f3-classpath\fR, and \f3-X\fR options\&. The following list contains additional options that are accepted by the \f3jdb\fR command\&.
|
||||
.PP
|
||||
Other options are supported to provide alternate mechanisms for connecting the debugger to the JVM it is to debug\&. For additional documentation about these connection alternatives, see Java Platform Debugger Architecture (JPDA) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/jpda/index\&.html
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message\&.
|
||||
.TP
|
||||
-sourcepath \fIdir1:dir2: \&. \&. \&.\fR
|
||||
.br
|
||||
\f2NOTE: To display local variables, the containing class must have been compiled with the \fP\f2javac(1)\fP\f2 \fP\f2\-g\fP option.
|
||||
Uses the specified path to search for source files in the specified path\&. If this option is not specified, then use the default path of dot (\&.)\&.
|
||||
.TP
|
||||
-attach \fIaddress\fR
|
||||
.br
|
||||
Attaches the debugger to a running JVM with the default connection mechanism\&.
|
||||
.TP
|
||||
-listen \fIaddress\fR
|
||||
.br
|
||||
\f2print\fP supports many simple Java expressions including those with method invocations, for example:
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2print MyClass.myStaticField\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print myObj.myInstanceField\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print i + j + k\fP \f2(i, j, k are primities and either fields or local variables)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print myObj.myMethod()\fP \f2(if myMethod returns a non\-null)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2print new java.lang.String("Hello").length()\fP
|
||||
.RE
|
||||
.TP 3
|
||||
dump
|
||||
For primitive values, this command is identical to \f2print\fP. For objects, it prints the current value of each field defined in the object. Static and instance fields are included.
|
||||
Waits for a running JVM to connect to the specified address with a standard connector\&.
|
||||
.TP
|
||||
-launch
|
||||
.br
|
||||
Starts the debugged application immediately upon startup of JDB\&. The \f3-launch\fR option removes the need for the \f3run\fR command\&. The debugged application is launched and then stopped just before the initial application class is loaded\&. At that point, you can set any necessary breakpoints and use the \f3cont\fR command to continue execution\&.
|
||||
.TP
|
||||
-listconnectors
|
||||
.br
|
||||
The \f2dump\fP command supports the same set of expressions as the \f2print\fP command.
|
||||
.TP 3
|
||||
threads
|
||||
List the threads that are currently running. For each thread, its name and current status are printed, as well as an index that can be used for other commands, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
4. (java.lang.Thread)0x1 main running
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
In this example, the thread index is 4, the thread is an instance of java.lang.Thread, the thread name is "main", and it is currently running,
|
||||
.TP 3
|
||||
thread
|
||||
Select a thread to be the current thread. Many \f3jdb\fP commands are based on the setting of the current thread. The thread is specified with the thread index described in the \f2threads\fP command above.
|
||||
.TP 3
|
||||
where
|
||||
\f2where\fP with no arguments dumps the stack of the current thread. \f2where all\fP dumps the stack of all threads in the current thread group. \f2where\fP \f2threadindex\fP dumps the stack of the specified thread.
|
||||
List the connectors available in this JVM\&.
|
||||
.TP
|
||||
-connect connector-name:\fIname1=value1\fR
|
||||
.br
|
||||
Connects to the target JVM with the named connector and listed argument values\&.
|
||||
.TP
|
||||
-dbgtrace [\fIflags\fR]
|
||||
.br
|
||||
If the current thread is suspended (either through an event such as a breakpoint or through the \f2suspend\fP command), local variables and fields can be displayed with the \f2print\fP and \f2dump\fP commands. The \f2up\fP and \f2down\fP commands select which stack frame is current.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Breakpoints
|
||||
.LP
|
||||
.LP
|
||||
Breakpoints can be set in \f3jdb\fP at line numbers or at the first instruction of a method, for example:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2stop at MyClass:22\fP \f2(sets a breakpoint at the first instruction for line 22 of the source file containing MyClass)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2stop in java.lang.String.length\fP \f2(sets a breakpoint at the beginnig of the method \fP\f2java.lang.String.length\fP)
|
||||
.TP 2
|
||||
o
|
||||
\f2stop in MyClass.<init>\fP \f2(<init> identifies the MyClass constructor)\fP
|
||||
.TP 2
|
||||
o
|
||||
\f2stop in MyClass.<clinit>\fP \f2(<clinit> identifies the static initialization code for MyClass)\fP
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If a method is overloaded, you must also specify its argument types so that the proper method can be selected for a breakpoint. For example, "\f2MyClass.myMethod(int,java.lang.String)\fP", or "\f2MyClass.myMethod()\fP".
|
||||
.LP
|
||||
.LP
|
||||
The \f2clear\fP command removes breakpoints using a syntax as in "\f2clear\ MyClass:45\fP". Using the \f2clear\fP or command with no argument displays a list of all breakpoints currently set. The \f2cont\fP command continues execution.
|
||||
.LP
|
||||
.SS
|
||||
Stepping
|
||||
.LP
|
||||
.LP
|
||||
The \f2step\fP commands advances execution to the next line whether it is in the current stack frame or a called method. The \f2next\fP command advances execution to the next line in the current stack frame.
|
||||
.LP
|
||||
.SS
|
||||
Exceptions
|
||||
.LP
|
||||
.LP
|
||||
When an exception occurs for which there isn't a catch statement anywhere in the throwing thread's call stack, the VM normally prints an exception trace and exits. When running under \f3jdb\fP, however, control returns to \f3jdb\fP at the offending throw. You can then use \f3jdb\fP to diagnose the cause of the exception.
|
||||
.LP
|
||||
.LP
|
||||
Use the \f2catch\fP command to cause the debugged application to stop at other thrown exceptions, for example: "\f2catch java.io.FileNotFoundException\fP" or "\f2catch mypackage.BigTroubleException\fP. Any exception which is an instance of the specifield class (or of a subclass) will stop the application at the point where it is thrown.
|
||||
.LP
|
||||
.LP
|
||||
The \f2ignore\fP command negates the effect of a previous \f2catch\fP command.
|
||||
.LP
|
||||
.LP
|
||||
\f2NOTE: The \fP\f2ignore\fP command does not cause the debugged VM to ignore specific exceptions, only the debugger.
|
||||
.LP
|
||||
.SH "Command Line Options"
|
||||
.LP
|
||||
.LP
|
||||
When you use \f3jdb\fP in place of the Java application launcher on the command line, \f3jdb\fP accepts many of the same options as the java command, including \f2\-D\fP, \f2\-classpath\fP, and \f2\-X<option>\fP.
|
||||
.LP
|
||||
.LP
|
||||
The following additional options are accepted by \f3jdb\fP:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-help
|
||||
Displays a help message.
|
||||
.TP 3
|
||||
\-sourcepath <dir1:dir2:...>
|
||||
Uses the given path in searching for source files in the specified path. If this option is not specified, the default path of "." is used.
|
||||
.TP 3
|
||||
\-attach <address>
|
||||
Attaches the debugger to previously running VM using the default connection mechanism.
|
||||
.TP 3
|
||||
\-listen <address>
|
||||
Waits for a running VM to connect at the specified address using standard connector.
|
||||
.TP 3
|
||||
\-listenany
|
||||
Waits for a running VM to connect at any available address using standard connector.
|
||||
.TP 3
|
||||
\-launch
|
||||
Launches the debugged application immediately upon startup of jdb. This option removes the need for using the \f2run\fP command. The debuged application is launched and then stopped just before the initial application class is loaded. At that point you can set any necessary breakpoints and use the \f2cont\fP to continue execution.
|
||||
.TP 3
|
||||
\-listconnectors
|
||||
List the connectors available in this VM
|
||||
.TP 3
|
||||
\-connect <connector\-name>:<name1>=<value1>,...
|
||||
Connects to target VM using named connector with listed argument values.
|
||||
.TP 3
|
||||
\-dbgtrace [flags]
|
||||
Prints info for debugging jdb.
|
||||
.TP 3
|
||||
\-tclient
|
||||
Runs the application in the Java HotSpot(tm) VM (Client).
|
||||
.TP 3
|
||||
\-tserver
|
||||
Runs the application in the Java HotSpot(tm) VM (Server).
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine used to run jdb. (Options for the application Java virtual machine are passed to the \f3run\fP command.) For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Other options are supported for alternate mechanisms for connecting the debugger and the VM it is to debug. The Java Platform Debugger Architecture has additional
|
||||
.na
|
||||
\f2documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html on these connection alternatives.
|
||||
.LP
|
||||
.SS
|
||||
Options Forwarded to Debuggee Process
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-v \-verbose[:class|gc|jni]
|
||||
Turns on verbose mode.
|
||||
.TP 3
|
||||
\-D<name>=<value>
|
||||
Sets a system property.
|
||||
.TP 3
|
||||
\-classpath <directories separated by ":">
|
||||
Lists directories in which to look for classes.
|
||||
.TP 3
|
||||
\-X<option>
|
||||
Non\-standard target VM option
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
javac(1), java(1), javah(1), javap(1), javadoc(1).
|
||||
.LP
|
||||
|
||||
Prints information for debugging the \f3jdb\fR command\&.
|
||||
.TP
|
||||
-tclient
|
||||
.br
|
||||
Runs the application in the Java HotSpot VM client\&.
|
||||
.TP
|
||||
-tserver
|
||||
.br
|
||||
Runs the application in the Java HotSpot VM server\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the JVM, where option is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH OPTIONS\ FORWARDED\ TO\ THE\ DEBUGGER\ PROCESS
|
||||
.TP
|
||||
-v -verbose[:\fIclass\fR|gc|jni]
|
||||
.br
|
||||
Turns on verbose mode\&.
|
||||
.TP
|
||||
-D\fIname\fR=\fIvalue\fR
|
||||
.br
|
||||
Sets a system property\&.
|
||||
.TP
|
||||
-classpath \fIdir\fR
|
||||
.br
|
||||
Lists directories separated by colons in which to look for classes\&.
|
||||
.TP
|
||||
-X\fIoption\fR
|
||||
.br
|
||||
Nonstandard target JVM option\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javac(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javah(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javap(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
532
jdk/src/linux/doc/man/jdeps.1
Normal file
532
jdk/src/linux/doc/man/jdeps.1
Normal file
@ -0,0 +1,532 @@
|
||||
'\" t
|
||||
.\" Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: jdeps.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jdeps 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.SH NAME
|
||||
jdeps \- Java class dependency analyzer\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjdeps\fR [\fIoptions\fR] \fIclasses\fR \&.\&.\&.
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIclass\fR\fIes\fR
|
||||
Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&.
|
||||
.SH DESCRIPTION
|
||||
The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR file, a directory, a JAR file, or it can be a fully qualified class name to analyze all class files\&. The options determine the output\&. By default, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-dotoutput <\fIdir\fR>
|
||||
.br
|
||||
Destination directory for DOT file output\&. If specified, \f3jdeps\fR will generate one dot file per each analyzed archive named <\fIarchive-file-name\fR>\&.dot listing the dependencies, and also a summary file named summary\&.dot listing the dependencies among the archives\&.
|
||||
.TP
|
||||
-s, -summary
|
||||
.br
|
||||
Prints dependency summary only\&.
|
||||
.TP
|
||||
-v, -verbose
|
||||
.br
|
||||
Prints all class-level dependencies\&.
|
||||
.TP
|
||||
-verbose:package
|
||||
.br
|
||||
Prints package-level dependencies excluding dependencies within the same archive\&.
|
||||
.TP
|
||||
-verbose:class
|
||||
.br
|
||||
Prints class-level dependencies excluding dependencies within the same archive\&.
|
||||
.TP
|
||||
-cp <\fIpath\fR>, -classpath <\fIpath\fR>
|
||||
.br
|
||||
Specifies where to find class files\&.
|
||||
|
||||
See also Setting the Class Path\&.
|
||||
.TP
|
||||
-p <\fIpkg name\fR>, -package <\fIpkg name\fR>
|
||||
.br
|
||||
Finds dependencies in the specified package\&. You can specify this option multiple times for different packages\&. The \f3-p\fR and \f3-e\fR options are mutually exclusive\&.
|
||||
.TP
|
||||
-e <\fIregex\fR>, -regex <\fIregex\fR>
|
||||
.br
|
||||
Finds dependencies in packages matching the specified regular expression pattern\&. The \f3-p\fR and \f3-e\fR options are mutually exclusive\&.
|
||||
.TP
|
||||
-include <\fIregex\fR>
|
||||
.br
|
||||
Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&.
|
||||
.TP
|
||||
-P, -profile
|
||||
.br
|
||||
Shows profile or the file containing a package\&.
|
||||
.TP
|
||||
-apionly
|
||||
.br
|
||||
Restricts analysis to APIs, for example, dependences from the signature of \f3public\fR and \f3protected\fR members of public classes including field type, method parameter types, returned type, and checked exception types\&.
|
||||
.TP
|
||||
-R, -recursive
|
||||
.br
|
||||
Recursively traverses all dependencies\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Prints version information\&.
|
||||
.TP
|
||||
-h, -?, -help
|
||||
.br
|
||||
Prints help message for \f3jdeps\fR\&.
|
||||
.SH EXAMPLES
|
||||
Analyzing the dependencies of Notepad\&.jar\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps demo/jfc/Notepad/Notepad\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3demo/jfc/Notepad/Notepad\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 <unnamed> (Notepad\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt\&.event \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.beans \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.net \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.logging \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.border \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.event \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.text \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.tree \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.undo \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Use -P or -profile option to show on which profile that Notepad depends\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-profile demo/jfc/Notepad/Notepad\&.jar \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3demo/jfc/Notepad/Notepad\&.jar \-> /usr/java/jre/lib/rt\&.jar (Full JRE)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 <unnamed> (Notepad\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.awt\&.event Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.beans Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.net compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.logging compact1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.border Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.event Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.text Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.tree Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.swing\&.undo Full JRE\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Analyzing the immediate dependencies of a specific class in a given classpath, for example the \f3com\&.sun\&.tools\&.jdeps\&.Main\fR class in the tools\&.jar file\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.jdeps (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Use the \f3-verbose:class\fR option to find class-level dependencies or use the \f3-v\fR or \f3-verbose\fR option to include dependencies from the same JAR file\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-verbose:class \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.jdeps\&.Main (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io\&.PrintWriter \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.Exception \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.Object \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.String \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.System \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Use the \f3-R\fR or \f3-recursive\fR option to analyze the transitive dependencies of the \f3com\&.sun\&.tools\&.jdeps\&.Main\fR class\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-R \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.classfile (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.reflect \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.charset \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.file \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.regex \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 com\&.sun\&.tools\&.jdeps (tools\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.file \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio\&.file\&.attribute \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.text \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.jar \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.regex \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.zip \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3/usr/java/jre/lib/jce\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 javax\&.crypto (jce\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.io \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang\&.reflect \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.net \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.nio \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security\&.cert \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security\&.spec \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.concurrent \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.jar \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.regex \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util\&.zip \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.security\&.auth \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> sun\&.security\&.jca JDK internal API (rt\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> sun\&.security\&.util JDK internal API (rt\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 javax\&.crypto\&.spec (jce\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.lang \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.security\&.spec \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> java\&.util \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3/usr/java/jre/lib/rt\&.jar \-> /usr/java/jre/lib/jce\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 java\&.security (rt\&.jar)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-> javax\&.crypto\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Generate dot files of the dependencies of Notepad demo\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3$ jdeps \-dotoutput dot demo/jfc/Notepad/Notepad\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
\f3jdeps\fR will create one dot file for each given JAR file named <\fIfilename\fR>\&.dot in the dot directory specified in the \f3-dotoutput\fR option, and also a summary file named summary\&.dot that will list the dependencies among the JAR files
|
||||
.sp
|
||||
.nf
|
||||
\f3$ cat dot/Notepad\&.jar\&.dot \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3digraph "Notepad\&.jar" {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 // Path: demo/jfc/Notepad/Notepad\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.awt";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.awt\&.event";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.beans";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.io";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.lang";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.net";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.util";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "java\&.util\&.logging";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.border";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.event";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.text";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.tree";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "<unnamed>" \-> "javax\&.swing\&.undo";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3$ cat dot/summary\&.dot\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3digraph "summary" {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "Notepad\&.jar" \-> "rt\&.jar";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3}\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javap(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@ -1,141 +1,137 @@
|
||||
." Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jhat 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jhat.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jhat 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jhat \- Java Heap Analysis Tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jhat\fP [ \f2options\fP ] <heap\-dump\-file>
|
||||
.fl
|
||||
.SH NAME
|
||||
jhat \- Analyzes the Java heap\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Options, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
heap\-dump\-file
|
||||
Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you may specify which dump in the file by appending "#<number> to the file name, i.e. "foo.hprof#3".
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jhat\fP command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre\-designed queries (such as 'show all instances of a known class "Foo"') as well as \f3OQL\fP (\f3O\fPbject \f3Q\fPuery \f3L\fPanguage) \- a SQL\-like query language to query heap dumps. Help on OQL is available from the OQL help page shown by jhat. With the default port, OQL help is available at http://localhost:7000/oqlhelp/
|
||||
.LP
|
||||
.LP
|
||||
There are several ways to generate a java heap dump:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Use jmap(1) \-dump option to obtain a heap dump at runtime;
|
||||
.TP 2
|
||||
o
|
||||
Use jconsole(1) option to obtain a heap dump via
|
||||
.na
|
||||
\f2HotSpotDiagnosticMXBean\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime;
|
||||
.TP 2
|
||||
o
|
||||
Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option;
|
||||
.TP 2
|
||||
o
|
||||
Use
|
||||
.na
|
||||
\f2hprof\fP @
|
||||
.fi
|
||||
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-stack false/true
|
||||
Turn off tracking object allocation call stack. Note that if allocation site information is not available in the heap dump, you have to set this flag to false. Default is true.
|
||||
.TP 3
|
||||
\-refs false/true
|
||||
Turn off tracking of references to objects. Default is true. By default, back pointers (objects pointing to a given object a.k.a referrers or in\-coming references) are calculated for all objects in the heap.
|
||||
.TP 3
|
||||
\-port port\-number
|
||||
Set the port for the jhat's HTTP server. Default is 7000.
|
||||
.TP 3
|
||||
\-exclude exclude\-file
|
||||
Specify a file that lists data members that should be excluded from the "reachable objects" query. For example, if the file lists \f2java.lang.String.value\fP, then, whenever list of objects reachable from a specific object "o" are calculated, reference paths involving \f2java.lang.String.value\fP field will not considered.
|
||||
.TP 3
|
||||
\-baseline baseline\-dump\-file
|
||||
Specify a baseline heap dump. Objects in both heap dumps with the same object ID will be marked as not being "new". Other objects will be marked as "new". This is useful while comparing two different heap dumps.
|
||||
.TP 3
|
||||
\-debug int
|
||||
Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes.
|
||||
.TP 3
|
||||
\-version
|
||||
Report version number and exit.
|
||||
.TP 3
|
||||
\-h
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-help
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
jmap(1)
|
||||
.TP 2
|
||||
o
|
||||
jconsole(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2hprof \- Heap and CPU profiling tool\fP @
|
||||
.fi
|
||||
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
\fBjhat\fR [ \fIoptions\fR ] \fIheap\-dump\-file\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIheap-dump-file\fR
|
||||
Java binary heap dump file to be browsed\&. For a dump file that contains multiple heap dumps, you can specify which dump in the file by appending \f3#<number>\fR to the file name, for example, \f3myfile\&.hprof#3\fR\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jhat\fR command parses a Java heap dump file and starts a web server\&. The \f3jhat\fR command lets you to browse heap dumps with your favorite web browser\&. The \f3jhat\fR command supports predesigned queries such as show all instances of a known class \f3MyClass\fR, and Object Query Language (OQL)\&. OQL is similar to SQL, except for querying heap dumps\&. Help on OQL is available from the OQL help page shown by the \f3jhat\fR command\&. With the default port, OQL help is available at http://localhost:7000/oqlhelp/
|
||||
.PP
|
||||
There are several ways to generate a Java heap dump:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Use the \f3jmap -dump\fR option to obtain a heap dump at runtime\&. See jmap(1)\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Use the \f3jconsole\fR option to obtain a heap dump through \f3HotSpotDiagnosticMXBean\fR at runtime\&. See jconsole(1) and the \f3HotSpotDiagnosticMXBean\fR interface description at http://docs\&.oracle\&.com/javase/8/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Heap dump is generated when an \f3OutOfMemoryError\fR is thrown by specifying the \f3-XX:+HeapDumpOnOutOfMemoryError\fR Java Virtual Machine (JVM) option\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Use the \f3hprof\fR command\&. See the HPROF: A Heap/CPU Profiling Tool at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/hprof\&.html
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-stack false|true
|
||||
.br
|
||||
Turns off tracking object allocation call stack\&. If allocation site information is not available in the heap dump, then you have to set this flag to \f3false\fR\&. The default is \f3true\fR\&.
|
||||
.TP
|
||||
-refs false|true
|
||||
.br
|
||||
Turns off tracking of references to objects\&. Default is \f3true\fR\&. By default, back pointers, which are objects that point to a specified object such as referrers or incoming references, are calculated for all objects in the heap\&.
|
||||
.TP
|
||||
-port \fIport-number\fR
|
||||
.br
|
||||
Sets the port for the \f3jhat\fR HTTP server\&. Default is 7000\&.
|
||||
.TP
|
||||
-exclude \fIexclude-file\fR
|
||||
.br
|
||||
Specifies a file that lists data members that should be excluded from the reachable objects query\&. For example, if the file lists \f3java\&.lang\&.String\&.value\fR, then, then whenever the list of objects that are reachable from a specific object \f3o\fR are calculated, reference paths that involve \f3java\&.lang\&.String\&.value\fR field are not considered\&.
|
||||
.TP
|
||||
-baseline \fIexclude-file\fR
|
||||
.br
|
||||
Specifies a baseline heap dump\&. Objects in both heap dumps with the same object ID are marked as not being new\&. Other objects are marked as new\&. This is useful for comparing two different heap dumps\&.
|
||||
.TP
|
||||
-debug \fIint\fR
|
||||
.br
|
||||
Sets the debug level for this tool\&. A level of 0 means no debug output\&. Set higher values for more verbose modes\&.
|
||||
.TP
|
||||
-version
|
||||
.br
|
||||
Reports the release number and exits
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
Dsiplays a help message and exits\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message and exits\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
Passes \f3flag\fR to the Java Virtual Machine on which the \f3jhat\fR command is running\&. For example, \f3-J-Xmx512m\fR to use a maximum heap size of 512 MB\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jmap(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jconsole(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
HPROF: A Heap/CPU Profiling Tool at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/hprof\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,147 +1,133 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jinfo 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jinfo.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jinfo 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jinfo \- Configuration Info
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jinfo\fP [ option ] pid
|
||||
.fl
|
||||
\f3jinfo\fP [ option ] executable core
|
||||
.fl
|
||||
\f3jinfo\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jinfo \- Generates configuration information\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
option
|
||||
Options are mutually exclusive. Option, if used, should follow immediately after the command name.
|
||||
.RE
|
||||
\fBjinfo\fR [ \fIoption\fR ] \fIpid\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
pid
|
||||
process id for which the configuration info is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
|
||||
.RE
|
||||
\fBjinfo\fR [ \fIoption \fR] \fIexecutable core\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
core
|
||||
core file for which the configuration info is to be printed.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
remote\-hostname\-or\-IP
|
||||
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
server\-id
|
||||
optional unique id, if multiple debug servers are running on the same remote host.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jinfo\fP prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
|
||||
\fBjinfo\fR [ \fIoption \fR] \fI[ servier\-id ] remote\-hostname\-or\-IP\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoption\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID for which the configuration information is to be printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file for which the configuration information is to be printed\&.
|
||||
.TP
|
||||
\fIremote-hostname-or-IP\fR
|
||||
The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID to use when multiple debug servers are running on the same remote host\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jinfo\fR command prints Java configuration information for a specified Java process or core file or a remote debug server\&. The configuration information includes Java system properties and Java Virtual Machine (JVM) command-line flags\&. If the specified process is running on a 64-bit JVM, then you might need to specify the \f3-J-d64\fR option, for example: \f3jinfo\fR\f3-J-d64 -sysprops pid\fR\&.
|
||||
.PP
|
||||
This utility is unsupported and might not be available in future releases of the JDK\&. In Windows Systems where \f3dbgeng\&.dll\fR is not present, Debugging Tools For Windows must be installed to have these tools working\&. The \f3PATH\fR environment variable should contain the location of the jvm\&.dll that is used by the target process or the location from which the crash dump file was produced\&. For example, \f3set PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR \&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
no-option
|
||||
Prints both command-line flags and system property name-value pairs\&.
|
||||
.TP
|
||||
-flag \fIname\fR
|
||||
.br
|
||||
jinfo \-J\-d64 \-sysprops pid
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' need to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP
|
||||
.LP
|
||||
.LP
|
||||
\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
<no option>
|
||||
prints both command line flags as well as System properties name, value pairs.
|
||||
Prints the name and value of the specified command-line flag\&.
|
||||
.TP
|
||||
-flag \fI[+|-]name\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-flag name
|
||||
prints the name and value of the given command line flag.
|
||||
enables or disables the specified Boolean command-line flag\&.
|
||||
.TP
|
||||
-flag \fIname=value\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-flag [+|\-]name
|
||||
enables or disables the given boolean command line flag.
|
||||
Sets the specified command-line flag to the specified value\&.
|
||||
.TP
|
||||
-flags
|
||||
.br
|
||||
.TP 3
|
||||
\-flag name=value
|
||||
sets the given command line flag to the specified value.
|
||||
Prints command-line flags passed to the JVM\&.
|
||||
.TP
|
||||
-sysprops
|
||||
.br
|
||||
.TP 3
|
||||
\-flags
|
||||
prints command line flags passed to the JVM. pairs.
|
||||
Prints Java system properties as name-value pairs\&.
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
.TP 3
|
||||
\-sysprops
|
||||
prints Java System properties as name, value pairs.
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
.TP 3
|
||||
\-h
|
||||
prints a help message
|
||||
.TP 3
|
||||
\-help
|
||||
prints a help message
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Prints a help message\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
352
jdk/src/linux/doc/man/jjs.1
Normal file
352
jdk/src/linux/doc/man/jjs.1
Normal file
@ -0,0 +1,352 @@
|
||||
'\" t
|
||||
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Basic Tools
|
||||
.\" Title: jjs.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jjs 1 "21 November 2013" "JDK 8" "Basic Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.SH NAME
|
||||
jjs \- Invokes the Nashorn engine\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
\f3\fBjjs\fR [\fIoptions\fR] [\fIscript\-files\fR] [\-\- \fIarguments\fR]\fP
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
One or more options of the \f3jjs\fR command, separated by spaces\&. For more information, see Options\&.
|
||||
.TP
|
||||
\fIscript-files\fR
|
||||
One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&.
|
||||
.TP
|
||||
\fIarguments\fR
|
||||
All values after the double hyphen marker (\f3--\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the \f3arguments\fR property (see )\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jjs\fR command-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&.
|
||||
.SH OPTIONS
|
||||
The options of the \f3jjs\fR command control the conditions under which scripts are interpreted by Nashorn\&.
|
||||
.TP
|
||||
-ccs=\fIsize\fR , --class-cache-size=\fIsize\fR
|
||||
.br
|
||||
Sets the class cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes (KB), \f3m\fR or \f3M\fR to indicate megabytes (MB), \f3g\fR or \f3G\fR to indicate gigabytes (GB)\&. By default, the class cache size is set to 50 bytes\&. The following example shows how to set it to 1024 bytes (1 KB):
|
||||
.sp
|
||||
.nf
|
||||
\f3\-css=100\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\-css=1k\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-co, --compile-only
|
||||
.br
|
||||
Compiles the script without running it\&.
|
||||
.TP
|
||||
-cp \fIpath\fR , --classpath \fIpath\fR
|
||||
.br
|
||||
Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&.
|
||||
.TP
|
||||
-D\fIname\fR=\fIvalue\fR
|
||||
.br
|
||||
Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign \f3myValue\fR to the property named \f3myKey\fR:
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs \-DmyKey=myValue\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIjava\&.lang\&.System\&.getProperty("myKey")\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3myValue\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
This option can be repeated to set multiple properties\&.
|
||||
.TP
|
||||
-d=\fIpath\fR , --dump-debug-dir=\fIpath\fR
|
||||
.br
|
||||
Specifies the path to the directory where class files are dumped\&.
|
||||
.TP
|
||||
--debug-lines
|
||||
.br
|
||||
Generates a line number table in the class file\&. By default, this option is enabled\&. To disable it, specify \f3--debug-lines=false\fR\&.
|
||||
.TP
|
||||
--debug-locals
|
||||
.br
|
||||
Generates a local variable table in the class file\&.
|
||||
.TP
|
||||
-doe, --dump-on-error
|
||||
.br
|
||||
Provides a full stack trace when an arror occurs\&. By default, only a brief error message is printed\&.
|
||||
.TP
|
||||
--early-lvalue-error
|
||||
.br
|
||||
Reports invalid lvalue expressions as early errors (that is, when the code is parsed)\&. By default, this option is enabled\&. To disable it, specify \f3--early-lvalue-error=false\fR\&. When disabled, invalid lvalue expressions will not be reported until the code is executed\&.
|
||||
.TP
|
||||
--empty-statements
|
||||
.br
|
||||
Preserves empty statements in the Java abstract syntax tree\&.
|
||||
.TP
|
||||
-fv, --fullversion
|
||||
.br
|
||||
Prints the full Nashorn version string\&.
|
||||
.TP
|
||||
--function-statement-error
|
||||
.br
|
||||
Prints an error message when a function declaration is used as a statement\&.
|
||||
.TP
|
||||
--function-statement-warning
|
||||
.br
|
||||
Prints a warning message when a function declaration is used as a statement\&.
|
||||
.TP
|
||||
-fx
|
||||
.br
|
||||
Launches the script as a JavaFX application\&.
|
||||
.TP
|
||||
-h, -help
|
||||
.br
|
||||
Prints the list of options and their descriptions\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes the specified \f3java\fR launcher option to the JVM\&. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB:
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs \-J\-Xmx4g\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIjava\&.lang\&.Runtime\&.getRuntime()\&.maxMemory()\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33817799680\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
This option can be repeated to pass multiple \f3java\fR command options\&.
|
||||
.TP
|
||||
--lazy-compilation
|
||||
.br
|
||||
Enables lazy code generation strategies (that is, the entire script is not compiled at once)\&. This option is experimental\&.
|
||||
.TP
|
||||
--loader-per-compile
|
||||
.br
|
||||
Creates a new class loader per compile\&. By default, this option is enabled\&. To disable it, specify \f3--loader-per-compile=false\fR\&.
|
||||
.TP
|
||||
--log=\fIsubsystem\fR:\fIlevel\fR
|
||||
.br
|
||||
Performs logging at a given level for the specified subsystems\&. You can specify logging levels for multiple subsystems separating them with commas\&. For example:
|
||||
.sp
|
||||
.nf
|
||||
\f3\-\-log=fields:finest,codegen:info\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
--package=\fIname\fR
|
||||
.br
|
||||
Specifies the package to which generated class files are added\&.
|
||||
.TP
|
||||
--parse-only
|
||||
.br
|
||||
Parses the code without compiling\&.
|
||||
.TP
|
||||
--print-ast
|
||||
.br
|
||||
Prints the abstract syntax tree\&.
|
||||
.TP
|
||||
--print-code
|
||||
.br
|
||||
Prints bytecode\&.
|
||||
.TP
|
||||
--print-lower-ast
|
||||
.br
|
||||
Prints the lowered abstract syntax tree\&.
|
||||
.TP
|
||||
--print-lower-parse
|
||||
.br
|
||||
Prints the lowered parse tree\&.
|
||||
.TP
|
||||
--print-no-newline
|
||||
.br
|
||||
Forces other \f3--print*\fR options to print the output on one line\&.
|
||||
.TP
|
||||
--print-parse
|
||||
.br
|
||||
Prints the parse tree\&.
|
||||
.TP
|
||||
--print-symbols
|
||||
.br
|
||||
Prints the symbol table\&.
|
||||
.TP
|
||||
-pcs, --profile-callsites
|
||||
.br
|
||||
Dumps callsite profile data\&.
|
||||
.TP
|
||||
-scripting
|
||||
.br
|
||||
Enables shell scripting features\&.
|
||||
.TP
|
||||
--stderr=\fIfilename\fR|\fIstream\fR|\fItty\fR
|
||||
.br
|
||||
Redirects the standard error stream to the specified file, stream (for example, to \f3stdout\fR), or text terminal\&.
|
||||
.TP
|
||||
--stdout=\fIfilename\fR|\fIstream\fR|\fItty\fR
|
||||
.br
|
||||
Redirects the standard output stream to the specified file, stream (for example, to \f3stderr\fR), or text terminal\&.
|
||||
.TP
|
||||
-strict
|
||||
.br
|
||||
Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&.
|
||||
.TP
|
||||
-t=\fIzone\fR , -timezone=\fIzone\fR
|
||||
.br
|
||||
Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the \f3Date\fR object\&.
|
||||
.TP
|
||||
-tcs=\fIparameter\fR , --trace-callsites=\fIparameter\fR
|
||||
.br
|
||||
Enables callsite trace mode\&. Possible parameters are the following:
|
||||
.RS
|
||||
.TP
|
||||
miss
|
||||
Trace callsite misses\&.
|
||||
.TP
|
||||
enterexit
|
||||
Trace callsite enter/exit\&.
|
||||
.TP
|
||||
objects
|
||||
Print object properties\&.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
--verify-code
|
||||
.br
|
||||
Verifies bytecode before running\&.
|
||||
.TP
|
||||
-v, -version
|
||||
.br
|
||||
Prints the Nashorn version string\&.
|
||||
.TP
|
||||
-xhelp
|
||||
.br
|
||||
Prints extended help for command-line options\&.
|
||||
.SH EXAMPLES
|
||||
\f3Example 1 Running a Script with Nashorn\fR
|
||||
.sp
|
||||
.nf
|
||||
\f3jjs script\&.js\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
\f3Example 2 Running Nashorn in Interactive Mode\fR
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIprintln("Hello, World!")\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Hello, World!\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIquit()\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3>>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
\f3Example 3 Passing Arguments to Nashorn\fR
|
||||
.sp
|
||||
.nf
|
||||
\f3>> \fIjjs \-\- a b c\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs> \fIarguments\&.join(", ")\fR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3a, b, c\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jjs>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fR
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
\f3jrunscript\fR
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@ -1,160 +1,144 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jmap 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jmap.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jmap 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jmap \- Memory Map
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jmap\fP [ option ] pid
|
||||
.fl
|
||||
\f3jmap\fP [ option ] executable core
|
||||
.fl
|
||||
\f3jmap\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jmap \- Prints shared object memory maps or heap memory details for a process, core file, or remote debug server\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
option
|
||||
Options are mutually exclusive. Option, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
pid
|
||||
process id for which the memory map is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
|
||||
.br
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced.
|
||||
.br
|
||||
.TP 3
|
||||
core
|
||||
core file for which the memory map is to be printed.
|
||||
.br
|
||||
.TP 3
|
||||
remote\-hostname\-or\-IP
|
||||
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
||||
.br
|
||||
.TP 3
|
||||
server\-id
|
||||
optional unique id, if multiple debug servers are running on the same remote host.
|
||||
.br
|
||||
.RE
|
||||
\fBjmap\fR [ \fIoptions\fR ] \fIpid\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jmap\fP prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jmap \-J\-d64 \-heap pid
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
\fBjmap\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE: This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP
|
||||
.LP
|
||||
.LP
|
||||
\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
\fBjmap\fR [ \fIoptions\fR ] [ \fIpid\fR ] \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID for which the memory map is to be printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file for which the memory map is to be printed\&.
|
||||
.TP
|
||||
\fIremote-hostname-or-IP\fR
|
||||
The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID to use when multiple debug servers are running on the same remote host\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jmap\fR command prints shared object memory maps or heap memory details of a specified process, core file, or remote debug server\&. If the specified process is running on a 64-bit Java Virtual Machine (JVM), then you might need to specify the \f3-J-d64\fR option, for example: \f3jmap\fR\f3-J-d64 -heap pid\fR\&.
|
||||
.PP
|
||||
\fINote:\fR This utility is unsupported and might not be available in future releases of the JDK\&. On Windows Systems where the \f3dbgeng\&.dll\fR file is not present, Debugging Tools For Windows must be installed to make these tools work\&. The \f3PATH\fR environment variable should contain the location of the \f3jvm\&.dll\fR file that is used by the target process or the location from which the crash dump file was produced, for example: \f3set PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
<no option>
|
||||
When no option is used, the \f3jmap\fR command prints shared object mappings\&. For each shared object loaded in the target JVM, the start address, size of the mapping, and the full path of the shared object file are printed\&. This behavior is similar to the Oracle Solaris \f3pmap\fR utility\&.
|
||||
.TP
|
||||
-dump:[live,] format=b, file=\fIfilename\fR
|
||||
.br
|
||||
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
<no option>
|
||||
When no option is used jmap prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility.
|
||||
Dumps the Java heap in \f3hprof\fR binary format to \f3filename\fR\&. The \f3live\fR suboption is optional, but when specified, only the active objects in the heap are dumped\&. To browse the heap dump, you can use the jhat(1) command to read the generated file\&.
|
||||
.TP
|
||||
-finalizerinfo
|
||||
.br
|
||||
.TP 3
|
||||
\-dump:[live,]format=b,file=<filename>
|
||||
Dumps the Java heap in hprof binary format to filename. The \f2live\fP suboption is optional. If specified, only the live objects in the heap are dumped. To browse the heap dump, you can use jhat(1) (Java Heap Analysis Tool) to read the generated file.
|
||||
Prints information about objects that are awaiting finalization\&.
|
||||
.TP
|
||||
-heap
|
||||
.br
|
||||
.TP 3
|
||||
\-finalizerinfo
|
||||
Prints information on objects awaiting finalization.
|
||||
Prints a heap summary of the garbage collection used, the head configuration, and generation-wise heap usage\&. In addition, the number and size of interned Strings are printed\&.
|
||||
.TP
|
||||
-histo[:live]
|
||||
.br
|
||||
.TP 3
|
||||
\-heap
|
||||
Prints a heap summary. GC algorithm used, heap configuration and generation wise heap usage are printed.
|
||||
Prints a histogram of the heap\&. For each Java class, the number of objects, memory size in bytes, and the fully qualified class names are printed\&. The JVM internal class names are printed with an asterisk (*) prefix\&. If the \f3live\fR suboption is specified, then only active objects are counted\&.
|
||||
.TP
|
||||
-clstats
|
||||
.br
|
||||
.TP 3
|
||||
\-histo[:live]
|
||||
Prints a histogram of the heap. For each Java class, number of objects, memory size in bytes, and fully qualified class names are printed. VM internal class names are printed with '*' prefix. If the \f2live\fP suboption is specified, only live objects are counted.
|
||||
Prints class loader wise statistics of Java heap\&. For each class loader, its name, how active it is, address, parent class loader, and the number and size of classes it has loaded are printed\&.
|
||||
.TP
|
||||
-F
|
||||
.br
|
||||
.TP 3
|
||||
\-permstat
|
||||
Prints class loader wise statistics of permanent generation of Java heap. For each class loader, its name, liveness, address, parent class loader, and the number and size of classes it has loaded are printed. In addition, the number and size of interned Strings are printed.
|
||||
Force\&. Use this option with the \f3jmap -dump\fR or \f3jmap -histo\fR option when the pid does not respond\&. The \f3live\fR suboption is not supported in this mode\&.
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
.TP 3
|
||||
\-F
|
||||
Force. Use with jmap \-dump or jmap \-histo option if the pid does not respond. The \f2live\fP suboption is not supported in this mode.
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
.TP 3
|
||||
\-h
|
||||
Prints a help message.
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-help
|
||||
Prints a help message.
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Passes <flag> to the Java virtual machine on which jmap is run.
|
||||
.br
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
pmap(1)
|
||||
.TP 2
|
||||
o
|
||||
jhat(1)
|
||||
.TP 2
|
||||
o
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Passes \f3flag\fR to the Java Virtual Machine where the \f3jmap\fR command is running\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jhat(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,250 +1,205 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jps 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Monitoring Tools
|
||||
.\" Title: jps.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jps 1 "21 November 2013" "JDK 8" "Monitoring Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jps \- Java Virtual Machine Process Status Tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps\fP [ \f2options\fP ] [ \f2hostid\fP ]
|
||||
.SH NAME
|
||||
jps \- Lists the instrumented Java Virtual Machines (JVMs) on the target system\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjps\fR [ \fIoptions\fR ] [ \fIhostid\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIhostid\fR
|
||||
The identifier of the host for which the process report should be generated\&. The \f3hostid\fR can include optional components that indicate the communications protocol, port number, and other implementation specific data\&. See Host Identifier\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jps\fR command lists the instrumented Java HotSpot VMs on the target system\&. The command is limited to reporting information on JVMs for which it has the access permissions\&.
|
||||
.PP
|
||||
If the \f3jps\fR command is run without specifying a \f3hostid\fR, then it searches for instrumented JVMs on the local host\&. If started with a \f3hostid\fR, then it searches for JVMs on the indicated host, using the specified protocol and port\&. A \f3jstatd\fR process is assumed to be running on the target host\&.
|
||||
.PP
|
||||
The \f3jps\fR command reports the local JVM identifier, or \f3lvmid\fR, for each instrumented JVM found on the target system\&. The \f3lvmid\fR is typically, but not necessarily, the operating system\&'s process identifier for the JVM process\&. With no options, \f3jps\fR lists each Java application\&'s \f3lvmid\fR followed by the short form of the application\&'s class name or jar file name\&. The short form of the class name or JAR file name omits the class\&'s package information or the JAR files path information\&.
|
||||
.PP
|
||||
The \f3jps\fR command uses the Java launcher to find the class name and arguments passed to the main method\&. If the target JVM is started with a custom launcher, then the class or JAR file name and the arguments to the \f3main\fR method are not available\&. In this case, the \f3jps\fR command outputs the string \f3Unknown\fR for the class name or JAR file name and for the arguments to the \f3main\fR method\&.
|
||||
.PP
|
||||
The list of JVMs produced by the \f3jps\fR command can be limited by the permissions granted to the principal running the command\&. The command only lists the JVMs for which the principle has access rights as determined by operating system-specific access control mechanisms\&.
|
||||
.SH OPTIONS
|
||||
The \f3jps\fR command supports a number of options that modify the output of the command\&. These options are subject to change or removal in the future\&.
|
||||
.TP
|
||||
-q
|
||||
.br
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
hostid
|
||||
The host identifier of the host for which the process report should be generated. The \f2hostid\fP may include optional components that indicate the communications protocol, port number, and other implementation specific data.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions.
|
||||
.LP
|
||||
.LP
|
||||
If \f3jps\fP is run without specifying a \f2hostid\fP, it will look for instrumented JVMs on the local host. If started with a \f2hostid\fP, it will look for JVMs on the indicated host, using the specified protocol and port. A \f3jstatd\fP process is assumed to be running on the target host.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP command will report the local VM identifier, or \f2lvmid\fP, for each instrumented JVM found on the target system. The \f3lvmid\fP is typically, but not necessarily, the operating system's process identifier for the JVM process. With no options, \f3jps\fP will list each Java application's \f2lvmid\fP followed by the short form of the application's class name or jar file name. The short form of the class name or JAR file name omits the class's package information or the JAR files path information.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP command uses the \f3java\fP launcher to find the class name and arguments passed to the \f2main\fP method. If the target JVM is started with a custom launcher, the class name (or JAR file name) and the arguments to the \f2main\fP method will not be available. In this case, the \f3jps\fP command will output the string \f2Unknown\fP for the class name or JAR file name and for the arguments to the main method.
|
||||
.LP
|
||||
.LP
|
||||
The list of JVMs produced by the \f3jps\fP command may be limited by the permissions granted to the principal running the command. The command will only list the JVMs for which the principle has access rights as determined by operating system specific access control mechanisms.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This utility is unsupported and may not be available in future versions of the JDK. It is not currently available on Windows 98 and Windows ME platforms.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jps\fP command supports a number of options that modify the output of the command. These options are subject to change or removal in the future.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-q
|
||||
Suppress the output of the class name, JAR file name, and arguments passed to the \f2main\fP method, producing only a list of local VM identifiers.
|
||||
.TP 3
|
||||
\-m
|
||||
Output the arguments passed to the main method. The output may be null for embedded JVMs.
|
||||
.TP 3
|
||||
\-l
|
||||
Output the full package name for the application's main class or the full path name to the application's JAR file.
|
||||
.TP 3
|
||||
\-v
|
||||
Output the arguments passed to the JVM.
|
||||
.TP 3
|
||||
\-V
|
||||
Output the arguments passed to the JVM through the flags file (the .hotspotrc file or the file specified by the \-XX:Flags=<\f2filename\fP> argument).
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the \f3java\fP launcher called by \f3jps\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
HOST IDENTIFIER
|
||||
.LP
|
||||
.LP
|
||||
The host identifier, or \f2hostid\fP is a string that indicates the target system. The syntax of the \f2hostid\fP string largely corresponds to the syntax of a URI:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
[\fP\f4protocol\fP\f3:][[//]\fP\f4hostname\fP\f3][:\fP\f4port\fP\f3][/\fP\f4servername\fP\f3]\fP
|
||||
Suppresses the output of the class name, JAR file name, and arguments passed to the \f3main\fR method, producing only a list of local JVM identifiers\&.
|
||||
.TP
|
||||
-m
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
protocol
|
||||
The communications protocol. If the \f2protocol\fP is omitted and a \f2hostname\fP is not specified, the default protocol is a platform specific, optimized, local protocol. If the \f2protocol\fP is omitted and a \f2hostname\fP is specified, then the default protocol is \f3rmi\fP.
|
||||
.TP 3
|
||||
hostname
|
||||
A hostname or IP address indicating the target host. If \f2hostname\fP is omitted, then the target host is the local host.
|
||||
.TP 3
|
||||
port
|
||||
The default port for communicating with the remote server. If the \f2hostname\fP is omitted or the \f2protocol\fP specifies an optimized, local protocol, then \f2port\fP is ignored. Otherwise, treatment of the \f2port\fP parameter is implementation specific. For the default \f3rmi\fP protocol the \f2port\fP indicates the port number for the rmiregistry on the remote host. If \f2port\fP is omitted, and \f2protocol\fP indicates \f3rmi\fP, then the default rmiregistry port (1099) is used.
|
||||
.TP 3
|
||||
servername
|
||||
The treatment of this parameter depends on the implementation. For the optimized, local protocol, this field is ignored. For the \f3rmi\fP protocol, this parameter is a string representing the name of the RMI remote object on the remote host. See the \f3\-n\fP option for the jstatd(1) command.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "OUTPUT FORMAT"
|
||||
.LP
|
||||
.LP
|
||||
The output of the \f3jps\fP command follows the following pattern:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f4lvmid\fP\f3 [ [ \fP\f4classname\fP\f3 | \fP\f4JARfilename\fP\f3 | "Unknown"] [ \fP\f4arg\fP\f3* ] [ \fP\f4jvmarg\fP\f3* ] ]\fP
|
||||
Displays the arguments passed to the \f3main\fR method\&. The output may be \f3null\fR for embedded JVMs\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Where all output tokens are separated by white space. An \f2arg\fP that includes embedded white space will introduce ambiguity when attempting to map arguments to their actual positional parameters.
|
||||
Displays the full package name for the application\&'s \f3main\fR class or the full path name to the application\&'s JAR file\&.
|
||||
.TP
|
||||
-v
|
||||
.br
|
||||
Displays the arguments passed to the JVM\&.
|
||||
.TP
|
||||
-V
|
||||
.br
|
||||
\f3NOTE\fP: You are advised not to write scripts to parse \f3jps\fP output since the format may change in future releases. If you choose to write scripts that parse \f3jps\fP output, expect to modify them for future releases of this tool.
|
||||
Suppresses the output of the class name, JAR file name, and arguments passed to the main method, producing only a list of local JVM identifiers\&.
|
||||
.TP
|
||||
-J\f3option\fR
|
||||
.br
|
||||
|
||||
.LP
|
||||
.SH "EXAMPLES"
|
||||
.LP
|
||||
.LP
|
||||
This section provides examples of the \f3jps\fP command.
|
||||
.LP
|
||||
.LP
|
||||
Listing the instrumented JVMs on the local host:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps\fP
|
||||
.br
|
||||
|
||||
.fl
|
||||
18027 Java2Demo.JAR
|
||||
.br
|
||||
|
||||
.fl
|
||||
18032 jps
|
||||
.br
|
||||
|
||||
.fl
|
||||
18005 jstat
|
||||
.br
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Listing the instrumented JVMs on a remote host:
|
||||
.LP
|
||||
.LP
|
||||
This example assumes that the \f3jstat\fP server and either the its internal RMI registry or a separate external \f3rmiregistry\fP process are running on the remote host on the default port (port 1099). It also assumes that the local host has appropriate permissions to access the remote host. This example also includes the \f2\-l\fP option to output the long form of the class names or JAR file names.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps \-l remote.domain\fP
|
||||
.br
|
||||
|
||||
.fl
|
||||
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
|
||||
.br
|
||||
|
||||
.fl
|
||||
2857 sun.tools.jstatd.jstatd
|
||||
.br
|
||||
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Listing the instrumented JVMs on a remote host with a non\-default port for the RMI registry
|
||||
.LP
|
||||
.LP
|
||||
This example assumes that the \f3jstatd\fP server, with an internal RMI registry bound to port 2002, is running on the remote host. This example also uses the \f2\-m\fP option to include the arguments passed to the \f2main\fP method of each of the listed Java applications.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jps \-m remote.domain:2002\fP
|
||||
.br
|
||||
|
||||
.fl
|
||||
3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR
|
||||
.br
|
||||
|
||||
.fl
|
||||
3102 sun.tools.jstatd.jstatd \-p 2002
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
java(1) \- the Java Application Launcher
|
||||
.TP 2
|
||||
o
|
||||
jstat(1) \- the Java virtual machine Statistics Monitoring Tool
|
||||
.TP 2
|
||||
o
|
||||
jstatd(1) \- the jstat daemon
|
||||
.TP 2
|
||||
o
|
||||
rmiregistry(1) \- the Java Remote Object Registry
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Passes \f3option\fR to the JVM, where option is one of the \f3options\fR described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH HOST\ IDENTIFIER
|
||||
The host identifier, or \f3hostid\fR is a string that indicates the target system\&. The syntax of the \f3hostid\fR string corresponds to the syntax of a URI:
|
||||
.sp
|
||||
.nf
|
||||
\f3[protocol:][[//]hostname][:port][/servername]\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIprotocol\fR
|
||||
The communications protocol\&. If the \f3protocol\fR is omitted and a \f3hostname\fR is not specified, then the default protocol is a platform-specific, optimized, local protocol\&. If the protocol is omitted and a host name is specified, then the default protocol is \f3rmi\fR\&.
|
||||
.TP
|
||||
hostname
|
||||
A hostname or IP address that indicates the target host\&. If you omit the \f3hostname\fR parameter, then the target host is the local host\&.
|
||||
.TP
|
||||
port
|
||||
The default port for communicating with the remote server\&. If the \f3hostname\fR parameter is omitted or the \f3protocol\fR parameter specifies an optimized, local protocol, then the \f3port\fR parameter is ignored\&. Otherwise, treatment of the \f3port\fR parameter is implementation specific\&. For the default \f3rmi\fR protocol, the \f3port\fR parameter indicates the port number for the rmiregistry on the remote host\&. If the \f3port\fR parameter is omitted, and the \f3protocol\fR parameter indicates \f3rmi\fR, then the default rmiregistry port (1099) is used\&.
|
||||
.TP
|
||||
servername
|
||||
The treatment of this parameter depends on the implementation\&. For the optimized, local protocol, this field is ignored\&. For the \f3rmi\fR protocol, this parameter is a string that represents the name of the RMI remote object on the remote host\&. See the \f3jstatd\fR command \f3-n\fRoption for more information\&.
|
||||
.SH OUTPUT\ FORMAT
|
||||
The output of the \f3jps\fR command follows the following pattern:
|
||||
.sp
|
||||
.nf
|
||||
\f3lvmid [ [ classname | JARfilename | "Unknown"] [ arg* ] [ jvmarg* ] ]\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
All output tokens are separated by white space\&. An \f3arg\fR value that includes embedded white space introduces ambiguity when attempting to map arguments to their actual positional parameters\&.
|
||||
.PP
|
||||
\fINote:\fR It is recommended that you do not write scripts to parse \f3jps\fR output because the format might change in future releases\&. If you write scripts that parse \f3jps\fR output, then expect to modify them for future releases of this tool\&.
|
||||
.SH EXAMPLES
|
||||
This section provides examples of the \f3jps\fR command\&.
|
||||
.PP
|
||||
List the instrumented JVMs on the local host:
|
||||
.sp
|
||||
.nf
|
||||
\f3jps\fP
|
||||
.fi
|
||||
.nf
|
||||
\f318027 Java2Demo\&.JAR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f318032 jps\fP
|
||||
.fi
|
||||
.nf
|
||||
\f318005 jstat\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following example lists the instrumented JVMs on a remote host\&. This example assumes that the \f3jstat\fR server and either the its internal RMI registry or a separate external rmiregistry process are running on the remote host on the default port (port 1099)\&. It also assumes that the local host has appropriate permissions to access the remote host\&. This example also includes the \f3-l\fR option to output the long form of the class names or JAR file names\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jps \-l remote\&.domain\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33002 /opt/jdk1\&.7\&.0/demo/jfc/Java2D/Java2Demo\&.JAR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f32857 sun\&.tools\&.jstatd\&.jstatd\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The following example lists the instrumented JVMs on a remote host with a non-default port for the RMI registry\&. This example assumes that the \f3jstatd\fR server, with an internal RMI registry bound to port 2002, is running on the remote host\&. This example also uses the \f3-m\fR option to include the arguments passed to the \f3main\fR method of each of the listed Java applications\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jps \-m remote\&.domain:2002\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33002 /opt/jdk1\&.7\&.0/demo/jfc/Java2D/Java2Demo\&.JAR\fP
|
||||
.fi
|
||||
.nf
|
||||
\f33102 sun\&.tools\&.jstatd\&.jstatd \-p 2002\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstat(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstatd(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
rmiregistry(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,187 +1,196 @@
|
||||
." Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jrunscript 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Scripting Tools
|
||||
.\" Title: jrunscript.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jrunscript 1 "21 November 2013" "JDK 8" "Scripting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jrunscript \- command line script shell
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jrunscript\fP [ \f2options\fP ] [ arguments... ]
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jrunscript \- Runs a command-line script shell that supports interactive and batch modes\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Options, if used, should follow immediately after the command name.
|
||||
.TP 3
|
||||
arguments
|
||||
Arguments, if used, should follow immediately after options or command name.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jrunscript\fP is a command line script shell. jrunscript supports both an interactive (read\-eval\-print) mode and a batch (\-f option) mode of script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the \-l option can be used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming" style.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specify where to find the user's .class files that are accessed by the script.
|
||||
.TP 3
|
||||
\-cp path
|
||||
This is a synonym for \-classpath \f2path\fP
|
||||
.TP 3
|
||||
\-Dname=value
|
||||
Set a Java system property.
|
||||
.TP 3
|
||||
\-J<flag>
|
||||
Pass <flag> directly to the Java virtual machine on which jrunscript is run.
|
||||
.TP 3
|
||||
\-l language
|
||||
Use the specified scripting language. By default, JavaScript is used. Note that to use other scripting languages, you also need to specify the corresponding script engine's jar file using \-cp or \-classpath option.
|
||||
.TP 3
|
||||
\-e script
|
||||
Evaluate the given script. This option can be used to run "one liner" scripts specified completely on the command line.
|
||||
.TP 3
|
||||
\-encoding encoding
|
||||
Specify the character encoding used while reading script files.
|
||||
.TP 3
|
||||
\-f script\-file
|
||||
Evaluate the given script file (batch mode).
|
||||
.TP 3
|
||||
\-f \-
|
||||
Read and evaluate a script from standard input (interactive mode).
|
||||
.TP 3
|
||||
\-help\
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-?\
|
||||
Output help message and exit.
|
||||
.TP 3
|
||||
\-q\
|
||||
List all script engines available and exit.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ARGUMENTS"
|
||||
.LP
|
||||
.LP
|
||||
If [arguments...] are present and if no \f3\-e\fP or \f3\-f\fP option is used, then the first argument is the script file and the rest of the arguments, if any, are passed as script arguments. If [arguments..] and \f3\-e\fP or \f3\-f\fP option are used, then all [arguments..] are passed as script arguments. If [arguments..], \f3\-e\fP and \f3\-f\fP are missing, interactive mode is used. Script arguments are available to a script in an engine variable named "arguments" of type String array.
|
||||
.LP
|
||||
.SH "EXAMPLES"
|
||||
.LP
|
||||
.SS
|
||||
Executing inline scripts
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript \-e "print('hello world')"
|
||||
.fl
|
||||
jrunscript \-e "cat('http://java.sun.com')"
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Use specified language and evaluate given script file
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript \-l js \-f test.js
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Interactive mode
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript
|
||||
.fl
|
||||
js> print('Hello World\\n');
|
||||
.fl
|
||||
Hello World
|
||||
.fl
|
||||
js> 34 + 55
|
||||
.fl
|
||||
89.0
|
||||
.fl
|
||||
js> t = new java.lang.Thread(function() { print('Hello World\\n'); })
|
||||
.fl
|
||||
Thread[Thread\-0,5,main]
|
||||
.fl
|
||||
js> t.start()
|
||||
.fl
|
||||
js> Hello World
|
||||
.fl
|
||||
|
||||
.fl
|
||||
js>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Run script file with script arguments
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jrunscript test.js arg1 arg2 arg3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "arguments" array.
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built\-in functions and objects. These JavaScript built\-ins are documented in
|
||||
.na
|
||||
\f2jsdocs\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/share/jsdocs/allclasses\-noframe.html.
|
||||
.LP
|
||||
|
||||
\fBjrunscript\fR [\fIoptions\fR] [\fIarguments\fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIarguments\fR
|
||||
Arguments, when used, follow immediately after options or the command name\&. See Arguments\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jrunscript\fR command is a language-independent command-line script shell\&. The \f3jrunscript\fR command supports both an interactive (read-eval-print) mode and a batch (\f3-f\fR option) mode of script execution\&. By default, JavaScript is the language used, but the \f3-l\fR option can be used to specify a different language\&. By using Java to scripting language communication, the \f3jrunscript\fR command supports an exploratory programming style\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-classpath \fIpath\fR
|
||||
.br
|
||||
Indicate where any class files are that the script needs to access\&.
|
||||
.TP
|
||||
-cp \fIpath\fR
|
||||
.br
|
||||
Same as \f3-classpath\fR\f3path\fR\&.
|
||||
.TP
|
||||
-D\fIname\fR=\fIvalue\fR
|
||||
.br
|
||||
Sets a Java system property\&.
|
||||
.TP
|
||||
-J\fIflag\fR
|
||||
.br
|
||||
Passes \f3flag\fR directly to the Java Virtual Machine where the \f3jrunscript\fR command is running\&.
|
||||
.TP
|
||||
-I \fIlanguage\fR
|
||||
.br
|
||||
Uses the specified scripting language\&. By default, JavaScript is used\&. To use other scripting languages, you must specify the corresponding script engine\&'s JAR file with the \f3-cp\fR or \f3-classpath\fR option\&.
|
||||
.TP
|
||||
-e \fIscript\fR
|
||||
.br
|
||||
Evaluates the specified script\&. This option can be used to run one-line scripts that are specified completely on the command line\&.
|
||||
.TP
|
||||
-encoding \fIencoding\fR
|
||||
.br
|
||||
Specifies the character encoding used to read script files\&.
|
||||
.TP
|
||||
-f \fIscript-file\fR
|
||||
.br
|
||||
Evaluates the specified script file (batch mode)\&.
|
||||
.TP
|
||||
-f -
|
||||
.br
|
||||
Reads and evaluates a script from standard input (interactive mode)\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
Displays a help message and exits\&.
|
||||
.TP
|
||||
-?
|
||||
.br
|
||||
Displays a help message and exits\&.
|
||||
.TP
|
||||
-q
|
||||
.br
|
||||
Lists all script engines available and exits\&.
|
||||
.SH ARGUMENTS
|
||||
If arguments are present and if no \f3-e\fR or \f3-f\fR option is used, then the first argument is the script file and the rest of the arguments, if any, are passed to the script\&. If arguments and \f3-e\fR or the \f3-f\fR option are used, then all arguments are passed to the script\&. If arguments, \f3-e\fR and \f3-f\fR are missing, then interactive mode is used\&. Script arguments are available to a script in an engine variable named \f3arguments\fR of type \f3String\fR array\&.
|
||||
.SH EXAMPLES
|
||||
.SS EXECUTE\ INLINE\ SCRIPTS
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript \-e "print(\&'hello world\&')"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jrunscript \-e "cat(\&'http://www\&.example\&.com\&')"\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS USE\ SPECIFIED\ LANGUAGE\ AND\ EVALUATE\ THE\ SCRIPT\ FILE
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript \-l js \-f test\&.js\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS INTERACTIVE\ MODE
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> print(\&'Hello World\en\&');\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Hello World\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> 34 + 55\fP
|
||||
.fi
|
||||
.nf
|
||||
\f389\&.0\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> t = new java\&.lang\&.Thread(function() { print(\&'Hello World\en\&'); })\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3Thread[Thread\-0,5,main]\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> t\&.start()\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js> Hello World\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3js>\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS RUN\ SCRIPT\ FILE\ WITH\ SCRIPT\ ARGUMENTS
|
||||
The test\&.js file is the script file\&. The \f3arg1\fR, \f3arg2\fR and \f3arg3\fR arguments are passed to the script\&. The script can access these arguments with an arguments array\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jrunscript test\&.js arg1 arg2 arg3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
If JavaScript is used, then before it evaluates a user defined script, the \f3jrunscript\fR command initializes certain built-in functions and objects\&. These JavaScript built-ins are documented in JsDoc-Toolkit at http://code\&.google\&.com/p/jsdoc-toolkit/
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,109 +1,109 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jsadebugd 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jsadebugd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jsadebugd 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jsadebugd \- Serviceability Agent Debug Daemon
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jsadebugd\fP pid [ server\-id ]
|
||||
.fl
|
||||
\f3jsadebugd\fP executable core [ server\-id ]
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
jsadebugd \- Attaches to a Java process or core file and acts as a debug server\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
pid
|
||||
process id of the process to which the debug server should attach. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used. At most one instance of the debug server may be attached to a single process.
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced
|
||||
.TP 3
|
||||
core
|
||||
Core file to which the debug server should attach.
|
||||
.TP 3
|
||||
server\-id
|
||||
Optional unique id, needed if multiple debug servers are started on the same machine. This ID must be used by remote clients to identify the particular debug server to attach. Within a single machine, this ID must be unique.
|
||||
.RE
|
||||
\fBjsadebugd\fR \fIpid\fR [ \fIserver\-id\fR ]
|
||||
.fi
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jsadebugd\fP attaches to a Java process or core file and acts as a debug server. Remote clients such as jstack(1), jmap(1), and jinfo(1) can attach to the server using Java Remote Method Invocation (RMI). Before starting \f2jsadebugd\fP,
|
||||
.na
|
||||
\f2rmiregistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi must be started with:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f4rmiregistry \-J\-Xbootclasspath/p:$JAVA_HOME/lib/sajdi.jar\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
where \f2$JAVA_HOME\fP is the JDK installation directory. If rmiregistry was not started, jsadebugd will start an rmiregistry in a standard (1099) port internally. Debug server may be stopped by sending SIGINT (pressing Ctrl\-C) to it.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced.
|
||||
.LP
|
||||
.LP
|
||||
For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
jinfo(1)
|
||||
.TP 2
|
||||
o
|
||||
jmap(1)
|
||||
.TP 2
|
||||
o
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
jstack(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2rmiregistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
\fBjsadebugd\fR \fIexecutable\fR \fIcore\fR [ \fIserver\-id\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID of the process to which the debug server attaches\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&. At most one instance of the debug server can be attached to a single process\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file to which the debug server should attach\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID that is needed when multiple debug servers are started on the same machine\&. This ID must be used by remote clients to identify the particular debug server to which to attach\&. Within a single machine, this ID must be unique\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jsadebugd\fR command attaches to a Java process or core file and acts as a debug server\&. Remote clients such as \f3jstack\fR, \f3jmap\fR, and \f3jinfo\fR can attach to the server through Java Remote Method Invocation (RMI)\&. Before you start the \f3jsadebugd\fR command, start the RMI registry with the \f3rmiregistry\fR command as follows where \fI$JAVA_HOME\fR is the JDK installation directory:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry \-J\-Xbootclasspath/p:$JAVA_HOME/lib/sajdi\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
If the RMI registry was not started, then the \f3jsadebugd\fR command starts an RMI registry in a standard (1099) port internally\&. The debug server can be stopped by sending a \f3SIGINT\fR to it\&. To send a SIGINT press \fICtrl+C\fR\&.
|
||||
.PP
|
||||
\fINote:\fR This utility is unsupported and may or may not be available in future releases of the JDK\&. In Windows Systems where \f3dbgeng\&.dll\fR is not present, Debugging Tools For Windows must be installed to have these tools working\&. The \f3PATH\fR environment variable should contain the location of jvm\&.dll used by the target process or the location from which the crash dump file was produced\&. For example, \f3s\fR\f3et PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jinfo(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jmap(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstack(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
rmiregistry(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,148 +1,138 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jstack 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Troubleshooting Tools
|
||||
.\" Title: jstack.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jstack 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jstack \- Stack Trace
|
||||
.SH NAME
|
||||
jstack \- Prints Java thread stack traces for a Java process, core file, or remote debug server\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjstack\fR [ \fIoptions\fR ] \fIpid\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjstack\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
|
||||
.fi
|
||||
.nf
|
||||
|
||||
\fBjstack\fR [ \fIoptions\fR ] [ \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIpid\fR
|
||||
The process ID for which the stack trace is printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
|
||||
.TP
|
||||
\fIexecutable\fR
|
||||
The Java executable from which the core dump was produced\&.
|
||||
.TP
|
||||
\fIcore\fR
|
||||
The core file for which the stack trace is to be printed\&.
|
||||
.TP
|
||||
\fIremote-hostname-or-IP\fR
|
||||
The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
|
||||
.TP
|
||||
\fIserver-id\fR
|
||||
An optional unique ID to use when multiple debug servers are running on the same remote host\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jstack\fR command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server\&. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed\&. With the \f3-m\fR option, the \f3jstack\fR command prints both Java and native frames of all threads with the program counter (PC)\&. For each native frame, the closest native symbol to PC, when available, is printed\&. C++ mangled names are not demangled\&. To demangle C++ names, the output of this command can be piped to \f3c++filt\fR\&. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the \f3-J-d64\fR option, for example: \f3jstack -J-d64 -m pid\fR\&.
|
||||
.PP
|
||||
\fINote:\fR This utility is unsupported and might not be available in future release of the JDK\&. In Windows Systems where the dbgeng\&.dll file is not present, Debugging Tools For Windows must be installed so these tools work\&. The \f3PATH\fR environment variable needs to contain the location of the jvm\&.dll that is used by the target process, or the location from which the crash dump file was produced\&. For example:
|
||||
.sp
|
||||
.nf
|
||||
\f3set PATH=<jdk>\ejre\ebin\eclient;%PATH%\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-F
|
||||
.br
|
||||
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3jstack\fP [ option ] pid
|
||||
.fl
|
||||
\f3jstack\fP [ option ] executable core
|
||||
.fl
|
||||
\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.LP
|
||||
Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
pid
|
||||
process id for which the stack trace is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
executable
|
||||
Java executable from which the core dump was produced.
|
||||
Force a stack dump when \f3jstack\fR [\f3-l\fR] \f3pid\fR does not respond\&.
|
||||
.TP
|
||||
-l
|
||||
.br
|
||||
.TP 3
|
||||
core
|
||||
core file for which the stack trace is to be printed.
|
||||
Long listing\&. Prints additional information about locks such as a list of owned \f3java\&.util\&.concurrent\fR ownable synchronizers\&. See the \f3AbstractOwnableSynchronizer\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer\&.html
|
||||
.TP
|
||||
-m
|
||||
.br
|
||||
.TP 3
|
||||
remote\-hostname\-or\-IP
|
||||
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
||||
Prints a mixed mode stack trace that has both Java and native C/C++ frames\&.
|
||||
.TP
|
||||
-h
|
||||
.br
|
||||
.TP 3
|
||||
server\-id
|
||||
optional unique id, if multiple debug servers are running on the same remote host.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3jstack\fP prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, 'bci' (byte code index) and line number, if available, are printed. With the \-m option, jstack prints both Java and native frames of all threads along with the 'pc' (program counter). For each native frame, the closest native symbol to 'pc', if available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command may be piped to \f3c++filt\fP. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
|
||||
Prints a help message\&.
|
||||
.TP
|
||||
-help
|
||||
.br
|
||||
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstack \-J\-d64 \-m pid
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced.
|
||||
.LP
|
||||
.LP
|
||||
For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-F
|
||||
Force a stack dump when 'jstack [\-l] pid' does not respond.
|
||||
.TP 3
|
||||
\-l
|
||||
Long listing. Prints additional information about locks such as list of owned java.util.concurrent
|
||||
.na
|
||||
\f2ownable synchronizers\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html.
|
||||
.TP 3
|
||||
\-m
|
||||
prints mixed mode (both Java and native C/C++ frames) stack trace.
|
||||
.TP 3
|
||||
\-h
|
||||
prints a help message.
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-help
|
||||
prints a help message
|
||||
.br
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
pstack(1)
|
||||
.TP 2
|
||||
o
|
||||
c++filt(1)
|
||||
.TP 2
|
||||
o
|
||||
jps(1)
|
||||
.TP 2
|
||||
o
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "KNOWN BUGS"
|
||||
.LP
|
||||
.LP
|
||||
Mixed mode stack trace, the \-m option, does not work with the remote debug server.
|
||||
.LP
|
||||
|
||||
Prints a help message\&.
|
||||
.SH KNOWN\ BUGS
|
||||
In mixed mode stack trace, the \f3-m\fR option does not work with the remote debug server\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
pstack(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
C++filt(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jsadebugd(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,257 +1,210 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH jstatd 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Monitoring Tools
|
||||
.\" Title: jstatd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH jstatd 1 "21 November 2013" "JDK 8" "Monitoring Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
jstatd \- Virtual Machine jstat Daemon
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd [ \fP\f4options\fP\f3 ]\fP
|
||||
.SH NAME
|
||||
jstatd \- Monitors Java Virtual Machines (JVMs) and enables remote monitoring tools to attach to JVMs\&. This command is experimental and unsupported\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
\fBjstatd\fR [ \fIoptions\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3jstatd\fR command is an RMI server application that monitors for the creation and termination of instrumented Java HotSpot VMs and provides an interface to enable remote monitoring tools to attach to JVMs that are running on the local host\&.
|
||||
.PP
|
||||
The \f3jstatd\fR server requires an RMI registry on the local host\&. The \f3jstatd\fR server attempts to attach to the RMI registry on the default port, or on the port you specify with the \f3-p\fR\f3port\fR option\&. If an RMI registry is not found, then one is created within the \f3jstatd\fR application that is bound to the port that is indicated by the \f3-p\fR\f3port\fR option or to the default RMI registry port when the \f3-p\fR\f3port\fR option is omitted\&. You can stop the creation of an internal RMI registry by specifying the \f3-nr\fR option\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-nr
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options. The options may be in any order. If there are redundant or contradictory options, the last option specified will take precedence.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP tool is an RMI server application that monitors for the creation and termination of instrumented HotSpot Java virtual machines (JVMs) and provides a interface to allow remote monitoring tools to attach to JVMs running on the local host.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server requires the presence of an RMI registry on the local host. The \f3jstatd\fP server will attempt to attach to the RMI registry on the default port, or on the port indicated by the \f2\-p port\fP option. If an RMI registry is not found, one will be created within the \f3jstatd\fP application bound to the port indicated by the \f2\-p port\fP option or to the default RMI registry port if \f2\-p port\fP is omitted. Creation of an internal RMI registry can be inhibited by specifying the \f2\-nr\fP option.
|
||||
.LP
|
||||
.LP
|
||||
\f3NOTE:\fP This utility is unsupported and may or may not be available in future versions of the JDK. It is not currently available on the Windows 98 and Windows ME platforms.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP command supports the following options:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-nr
|
||||
Do not attempt to create an internal RMI registry within the \f2jstatd\fP process when an existing RMI registry is not found.
|
||||
.TP 3
|
||||
\-p\ port
|
||||
Port number where the RMI registry is expected to be found, or, if not found, created if \f2\-nr\fP is not specified.
|
||||
.TP 3
|
||||
\-n\ rminame
|
||||
Name to which the remote RMI object is bound in the RMI registry. The default name is \f2JStatRemoteHost\fP. If multiple \f3jstatd\fP servers are started on the same host, the name of the exported RMI object for each server can be made unique by specifying this option. However, doing so will require that the unique server name be included in the monitoring client's \f2hostid\fP and \f2vmid\fP strings.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SECURITY"
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server can only monitor JVMs for which it has the appropriate native access permissions. Therefor the \f3jstatd\fP process must be running with the same user credentials as the target JVMs. Some user credentials, such as the \f2root\fP user in UNIX(TM) based systems, have permission to access the instrumentation exported by any JVM on the system. A \f3jstatd\fP process running with such credentials can monitor any JVM on the system, but introduces additional security concerns.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server does not provide any authentication of remote clients. Therefore, running a \f3jstatd\fP server process exposes the instrumentation export by all JVMs for which the \f3jstatd\fP process has access permissions to any user on the network. This exposure may be undesireable in your environment and local security policies should be considered before starting the \f3jstatd\fP process, particularly in production environments or on unsecure networks.
|
||||
.LP
|
||||
.LP
|
||||
The \f3jstatd\fP server installs an instance of RMISecurityPolicy if no other security manager has been installed and therefore requires a security policy file to be specified. The policy file must conform to the default policy implementation's
|
||||
.na
|
||||
\f2Policy File Syntax\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html.
|
||||
.LP
|
||||
.LP
|
||||
The following policy file will allow the \f3jstatd\fP server to run without any security exceptions. This policy is less liberal then granting all permissions to all codebases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fP server.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant codebase "file:${java.home}/../lib/tools.jar" {\fP
|
||||
Does not attempt to create an internal RMI registry within the \f3jstatd\fR process when an existing RMI registry is not found\&.
|
||||
.TP
|
||||
-p \fIport\fR
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
permission java.security.AllPermission;\fP
|
||||
The port number where the RMI registry is expected to be found, or when not found, created if the \f3-nr\fR option is not specified\&.
|
||||
.TP
|
||||
-n \fIrminame\fR
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
};\fP
|
||||
Name to which the remote RMI object is bound in the RMI registry\&. The default name is \f3JStatRemoteHost\fR\&. If multiple \f3jstatd\fR servers are started on the same host, then the name of the exported RMI object for each server can be made unique by specifying this option\&. However, doing so requires that the unique server name be included in the monitoring client\&'s \f3hostid\fR and \f3vmid\fR strings\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To use this policy, copy the text into a file called \f2jstatd.all.policy\fP and run the \f3jstatd\fP server as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=jstatd.all.policy\fP
|
||||
.br
|
||||
\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP addreess spoofing attacks. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fP server and use the \f3jstat\fP and \f3jps\fP tools locally.
|
||||
.LP
|
||||
.SH "REMOTE INTERFACE"
|
||||
.LP
|
||||
.LP
|
||||
The interface exported by the \f3jstatd\fP process is proprietary and is guaranteed to change. Users and developers are discouraged from writing to this interface.
|
||||
.LP
|
||||
.SH "EXAMPLES"
|
||||
.LP
|
||||
.LP
|
||||
Here are some examples of starting \f3jstatd\fP. Note that the \f3jstatd\fP scripts automatically start the server in the background.
|
||||
.LP
|
||||
.SS
|
||||
Using Internal RMI Registry
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with an internal RMI registry. This example assumes that no other server is bound to the default RMI Registry port (port 1099).
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Using External RMI Registry
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with a external RMI registry.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry&
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with an external RMI registry server on port 2020.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry 2020&
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-p 2020
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with an external RMI registry on port 2020, bound to name AlternateJstatdServerName.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry 2020&
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-p 2020 \-n AlternateJstatdServerName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Inhibiting creation of an in\-process RMI registry
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP such that it will not create a RMI registry if one is not found. This example assumes an RMI registry is already running. If it is not, an appropriate error message is emitted.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-nr
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Enabling RMI logging capabilities.
|
||||
.LP
|
||||
.LP
|
||||
This example demonstrates starting \f3jstatd\fP with RMI logging capabilities enabled. This technique is useful as a troubleshooting aid or for monitoring server activities.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
jstatd \-J\-Djava.security.policy=all.policy \-J\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
java(1) \- the Java Application Launcher
|
||||
.TP 2
|
||||
o
|
||||
jps(1) \- the Java Process Status Application
|
||||
.TP 2
|
||||
o
|
||||
jstat(1) \- the Java Virtual Machine Statistics Monitoring Tool
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2rmiregistry\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#rmi \- the Java Remote Object Registry
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Passes \f3option\fR to the JVM, where option is one of the \f3options\fR described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SH SECURITY
|
||||
The \f3jstatd\fR server can only monitor JVMs for which it has the appropriate native access permissions\&. Therefore, the \f3jstatd\fR process must be running with the same user credentials as the target JVMs\&. Some user credentials, such as the root user in UNIX-based systems, have permission to access the instrumentation exported by any JVM on the system\&. A \f3jstatd\fR process running with such credentials can monitor any JVM on the system, but introduces additional security concerns\&.
|
||||
.PP
|
||||
The \f3jstatd\fR server does not provide any authentication of remote clients\&. Therefore, running a \f3jstatd\fR server process exposes the instrumentation export by all JVMs for which the \f3jstatd\fR process has access permissions to any user on the network\&. This exposure might be undesirable in your environment, and therefore, local security policies should be considered before you start the \f3jstatd\fR process, particularly in production environments or on networks that are not secure\&.
|
||||
.PP
|
||||
The \f3jstatd\fR server installs an instance of \f3RMISecurityPolicy\fR when no other security manager is installed, and therefore, requires a security policy file to be specified\&. The policy file must conform to Default Policy Implementation and Policy File Syntax at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyFiles\&.html
|
||||
.PP
|
||||
The following policy file allows the \f3jstatd\fR server to run without any security exceptions\&. This policy is less liberal than granting all permissions to all code bases, but is more liberal than a policy that grants the minimal permissions to run the \f3jstatd\fR server\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3grant codebase "file:${java\&.home}/\&.\&./lib/tools\&.jar" { \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission java\&.security\&.AllPermission;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
To use this policy setting, copy the text into a file called \f3jstatd\&.all\&.policy\fR and run the \f3jstatd\fR server as follows:
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=jstatd\&.all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
For sites with more restrictive security practices, it is possible to use a custom policy file to limit access to specific trusted hosts or networks, though such techniques are subject to IP address spoofing attacks\&. If your security concerns cannot be addressed with a customized policy file, then the safest action is to not run the \f3jstatd\fR server and use the \f3jstat\fR and \f3jps\fR tools locally\&.
|
||||
.SH REMOTE\ INTERFACE
|
||||
The interface exported by the \f3jstatd\fR process is proprietary and guaranteed to change\&. Users and developers are discouraged from writing to this interface\&.
|
||||
.SH EXAMPLES
|
||||
The following are examples of the \f3jstatd\fR command\&. The \f3jstatd\fR scripts automatically start the server in the background
|
||||
.SS INTERNAL\ RMI\ REGISTRY
|
||||
This example shows hos to start a \f3jstatd\fR session with an internal RMI registry\&. This example assumes that no other server is bound to the default RMI registry port (port 1099)\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS EXTERNAL\ RMI\ REGISTRY
|
||||
This example starts a \f3jstatd\fR session with a external RMI registry\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This example starts a \f3jstatd\fR session with an external RMI registry server on port 2020\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jrmiregistry 2020&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy \-p 2020\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
This example starts a \f3jstatd\fR session with an external RMI registry on port 2020 that is bound to \f3AlternateJstatdServerName\fR\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmiregistry 2020&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy \-p 2020\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-n AlternateJstatdServerName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS STOP\ THE\ CREATION\ OF\ AN\ IN-PROCESS\ RMI\ REGISTRY
|
||||
This example starts a \f3jstatd\fR session that does not create an RMI registry when one is not found\&. This example assumes an RMI registry is already running\&. If an RMI registry is not running, then an error message is displayed\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy \-nr\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SS ENABLE\ RMI\ LOGGING
|
||||
This example starts a \f3jstatd\fR session with RMI logging capabilities enabled\&. This technique is useful as a troubleshooting aid or for monitoring server activities\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3jstatd \-J\-Djava\&.security\&.policy=all\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 \-J\-Djava\&.rmi\&.server\&.logCalls=true\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jps(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jstat(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
rmiregistry(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,72 +1,87 @@
|
||||
." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH native2ascii 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Internationalization Tools
|
||||
.\" Title: native2ascii.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH native2ascii 1 "21 November 2013" "JDK 8" "Internationalization Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
native2ascii \- Native\-to\-ASCII Converter
|
||||
.LP
|
||||
.LP
|
||||
Converts a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes, or visa versa.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f4native2ascii\fP\f2 [options] [inputfile [outputfile]]\fP
|
||||
.fl
|
||||
.fi
|
||||
.SH NAME
|
||||
native2ascii \- Creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes or vice versa\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f2native2ascii\fP converts files that are encoded to any character encoding that is supported by the Java runtime environment to files encoded in ASCII, using Unicode escapes ("\\uxxxx" notation) for all characters that are not part of the ASCII character set. This process is required for properties files containing characters not in ISO\-8859\-1 character sets. The tool can also perform the reverse conversion.
|
||||
.LP
|
||||
.LP
|
||||
If \f2outputfile\fP is omitted, standard output is used for output. If, in addition, \f2inputfile\fP is omitted, standard input is used for input.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-reverse
|
||||
Perform the reverse operation: Convert a file encoded in ISO\-8859\-1 with Unicode escapes to a file in any character encoding supported by the Java runtime environment.
|
||||
\fBnative2ascii\fR [ \fIinputfile\fR ] [ \fIoutputfile\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIinputfile\fR
|
||||
The encoded file to be converted to ASCII\&.
|
||||
.TP
|
||||
\fIoutputfile\fR
|
||||
The converted ASCII file\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3native2ascii\fR command converts encoded files supported by the Java Runtime Environment (JRE) to files encoded in ASCII, using Unicode escapes (\f3\eu\fR\fIxxxx\fR) notation for all characters that are not part of the ASCII character set\&. This process is required for properties files that contain characters not in ISO-8859-1 character sets\&. The tool can also perform the reverse conversion\&.
|
||||
.PP
|
||||
If the \f3outputfile\fR value is omitted, then standard output is used for output\&. If, in addition, the \f3inputfile\fR value is omitted, then standard input is used for input\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-reverse
|
||||
.br
|
||||
Perform the reverse operation: Converts a file encoded in ISO-8859-1 with Unicode escapes to a file in any character encoding supported by the JRE\&.
|
||||
.TP
|
||||
-encoding \fIencoding_name\fR
|
||||
.br
|
||||
.TP 3
|
||||
\-encoding encoding_name
|
||||
Specifies the name of the character encoding to be used by the conversion procedure. If this option is not present, the default character encoding (as determined by the \f2java.nio.charset.Charset.defaultCharset\fP method) is used. The \f2encoding_name\fP string must be the name of a character encoding that is supported by the Java runtime environment \- see the
|
||||
.na
|
||||
\f4Supported Encodings\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html document.
|
||||
Specifies the name of the character encoding to be used by the conversion procedure\&. If this option is not present, then the default character encoding (as determined by the \f3java\&.nio\&.charset\&.Charset\&.defaultCharset\fR method) is used\&. The \f3encoding_name\fR string must be the name of a character encoding that is supported by the JRE\&. See Supported Encodings at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/intl/encoding\&.doc\&.html
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
.br
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for the java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
Passes \f3option\fR to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,368 +1,214 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH orbd 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java IDL and RMI-IIOP Tools
|
||||
.\" Title: orbd.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH orbd 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
orbd \- The Object Request Broker Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment.
|
||||
.LP
|
||||
.LP
|
||||
\f3See also:\fP
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd <\fP\f3options\fP\f3>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
orbd \- Enables clients to locate and call persistent objects on servers in the CORBA environment\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The Server Manager included with the \f3orbd\fP tool is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. The persistent servers, while publishing the persistent object references in the Naming Service, include the port number of the ORBD in the object reference instead of the port number of the Server. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
The object reference in the Naming Service remains independent of the server life cycle. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shutdown, the ORBD will always return the correct object reference to the invoking client.
|
||||
.TP 2
|
||||
o
|
||||
The client needs to lookup the object reference in the Naming Service only once, and can keep re\-using this reference independent of the changes introduced due to server life cycle.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To access ORBD's Server Manager, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. For more information on the Server Manager, see the section in this document titled \f2Server Manager\fP.
|
||||
.LP
|
||||
.LP
|
||||
When \f2orbd\fP starts up, it also starts a naming service. For more information on the naming service, link to
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.SS
|
||||
Required Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialPort nameserverport
|
||||
Specifies the port on which the name server should be started. Once started, \f2orbd\fP will listen for incoming requests on this port. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. (required)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.SS
|
||||
OTHER OPTIONS
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-port port
|
||||
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects. The default value for this port is 1049. This port number is added to the port field of the persistent Interoperable Object References (IOR). (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-defaultdb directory
|
||||
Specifies the base where the ORBD persistent storage directory \f2orb.db\fP is created. If this option is not specified, the default value is "./orb.db". (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverPollingTime milliseconds
|
||||
Specifies how often ORBD checks for the health of persistent servers registered via \f2servertool\fP. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverStartupDelay milliseconds
|
||||
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered via \f2servertool\fP is restarted. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.TP 3
|
||||
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Starting and Stopping the Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
A Naming Service is a CORBA service that allows
|
||||
.na
|
||||
\f2CORBA objects\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The
|
||||
.na
|
||||
\f2name binding\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference.
|
||||
.LP
|
||||
.LP
|
||||
Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service.
|
||||
.LP
|
||||
.LP
|
||||
The \f4Persistent\fP\f3 Naming Service\fP provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, the Persistent Naming Service will restore the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
For backward compatibility, \f2tnameserv\fP, a \f4Transient\fP\f3 Naming Service\fP shipped with older versions of the JDK, is also included in this release of J2SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, the naming context graph is lost.
|
||||
.LP
|
||||
.LP
|
||||
The \f2\-ORBInitialPort\fP argument is a required command\-line argument for \f2orbd\fP, and is used to set the port number on which the Naming Service will run. The following instructions assume you can use port 1050 for the Java\ IDL Object Request Broker Daemon. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. You can substitute a different port if necessary.
|
||||
.LP
|
||||
.LP
|
||||
To start \f2orbd\fP from a UNIX command shell, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Now that ORBD is running, you can run your server and client applications. When running the client and server applications, they must be made aware of the port number (and machine name, if applicable) where the Naming Service is running. One way to do this is to add the following code to your application:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
In this example, the Naming Service is running on port 1050 on host "MyHost". Another way is to specify the port number and/or machine name when running the server or client application from the command line. For example, you would start your "HelloApplication" with the following command line:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To stop the naming service, use the relevant operating system command, such as \f2pkill orbd\fP on Solaris, or \f2Ctrl+C\fP in the DOS window in which \f2orbd\fP is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped.
|
||||
.LP
|
||||
.LP
|
||||
For more information on the Naming Service included with ORBD, see
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html.
|
||||
.LP
|
||||
.SH "Server Manager"
|
||||
.LP
|
||||
.LP
|
||||
To access ORBD's Server Manager and run a persistent server, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. When a server is started using \f2servertool\fP, it must be started on the same host and port on which \f2orbd\fP is executing. If the server is run on a different port, the information stored in the database for local contexts will be invalid and the service will not work properly.
|
||||
.LP
|
||||
.SS
|
||||
Server Manager: an Example
|
||||
.LP
|
||||
.LP
|
||||
Using the
|
||||
.na
|
||||
\f2sample tutorial\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application:
|
||||
.LP
|
||||
.LP
|
||||
Start \f2orbd\fP.
|
||||
.LP
|
||||
.LP
|
||||
To start \f2orbd\fP from a UNIX command shell, enter:
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Note that \f21050\fP is the port on which you want the name server to run. \f2\-ORBInitialPort\fP is a required command\-line argument. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.
|
||||
.LP
|
||||
.LP
|
||||
Start the \f2servertool\fP:
|
||||
.LP
|
||||
.LP
|
||||
To start the Hello server, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Make sure the name server (\f2orbd\fP) port is the same as in the previous step, for example, \f2\-ORBInitialPort 1050\fP. The \f2servertool\fP must be started on the same port as the name server.
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP command line interface appears.
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Start the Hello server from the \f2servertool\fP prompt:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool > register \-server HelloServer \-classpath . \-applicationName
|
||||
.fl
|
||||
HelloServerApName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP registers the server, assigns it the name of "HelloServerApName", and displays its server id, along with a listing of all registered servers.
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Run the client application from another terminal window or prompt:
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For this example, you can omit \f2\-ORBInitialHost localhost\fP since the name server is running on the same host as the Hello client. If the name server is running on a different host, use \f2\-ORBInitialHost\fP \f2nameserverhost\fP to specify the host on which the IDL name server is running.
|
||||
.LP
|
||||
.LP
|
||||
Specify the name server (\f2orbd\fP) port as done in the previous step, for example, \f2\-ORBInitialPort 1050\fP.
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
When you have finished experimenting with the Server Manager, be sure to shut down or kill the name server (\f2orbd\fP) and \f2servertool\fP.
|
||||
.LP
|
||||
.LP
|
||||
To shut down \f2orbd\fP from a DOS prompt, select the window that is running the server and enter \f2Ctrl+C\fP to shut it down. To shut down \f2orbd\fPfrom a Unix shell, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped.
|
||||
.LP
|
||||
.LP
|
||||
To shut down the \f2servertool\fP, type \f2quit\fP and press the \f2Enter\fP key on the keyboard.
|
||||
.LP
|
||||
.SH "See Also"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
\fBorbd\fR [ \fIoptions\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
Command-line options\&. See Options\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3orbd\fR command enables clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The Server Manager included with the orbd tool is used to enable clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The persistent servers, while publishing the persistent object references in the naming service, include the port number of the ORBD in the object reference instead of the port number of the server\&. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The object reference in the naming service remains independent of the server life cycle\&. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shut down, the ORBD returns the correct object reference to the calling client\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The client needs to look up the object reference in the naming service only once, and can keep reusing this reference independent of the changes introduced due to server life cycle\&.
|
||||
.PP
|
||||
To access the ORBD Server Manager, the server must be started using \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. For more information on the Server Manager, see Server Manager\&.
|
||||
.PP
|
||||
When \f3orbd\fR starts, it also starts a naming service\&. For more information about the naming service\&. See Start and Stop the Naming Service\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-ORBInitialPort \fInameserverport\fR
|
||||
.br
|
||||
.TP 2
|
||||
o
|
||||
servertool(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
Required\&. Specifies the port on which the name server should be started\&. After it is started, \f3orbd\fR listens for incoming requests on this port\&. On Oracle Solaris software, you must become the root user to start a process on a port below 1024\&. For this reason, Oracle recommends that you use a port number above or equal to 1024\&.
|
||||
.SS NONREQUIRED\ OPTIONS
|
||||
.TP
|
||||
-port \fIport\fR
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects\&. The default value for this port is 1049\&. This port number is added to the port field of the persistent Interoperable Object References (IOR)\&.
|
||||
.TP
|
||||
-defaultdb \fIdirectory\fR
|
||||
.br
|
||||
Specifies the base where the ORBD persistent storage directory, \f3orb\&.db\fR, is created\&. If this option is not specified, then the default value is \f3\&./orb\&.db\fR\&.
|
||||
.TP
|
||||
-serverPollingTime \fImilliseconds\fR
|
||||
.br
|
||||
Specifies how often ORBD checks for the health of persistent servers registered through \f3servertool\fR\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
|
||||
.TP
|
||||
-serverStartupDelay milliseconds
|
||||
.br
|
||||
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through \f3servertool\fR is restarted\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
||||
.SS START\ AND\ STOP\ THE\ NAMING\ SERVICE
|
||||
A naming service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference\&. The name binding can be stored in the naming service, and a client can supply the name to obtain the desired object reference\&.
|
||||
.PP
|
||||
Before running a client or a server, you will start ORBD\&. ORBD includes a persistent naming service and a transient naming service, both of which are an implementation of the COS Naming Service\&.
|
||||
.PP
|
||||
The Persistent Naming Service provides persistence for naming contexts\&. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure\&. If ORBD is restarted, then the Persistent Naming Service restores the naming context graph, so that the binding of all clients\&' and servers\&' names remains intact (persistent)\&.
|
||||
.PP
|
||||
For backward compatibility, \f3tnameserv\fR, a Transient Naming Service that shipped with earlier releases of the JDK, is also included in this release of Java SE\&. A transient naming service retains naming contexts as long as it is running\&. If there is a service interruption, then the naming context graph is lost\&.
|
||||
.PP
|
||||
The \f3-ORBInitialPort\fR argument is a required command-line argument for \f3orbd\fR, and is used to set the port number on which the naming service runs\&. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon\&. When using Oracle Solaris software, you must become a root user to start a process on a port lower than 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&. You can substitute a different port when necessary\&.
|
||||
.PP
|
||||
To start \f3orbd\fR from a UNIX command shell, enter:
|
||||
.sp
|
||||
.nf
|
||||
\f3orbd \-ORBInitialPort 1050&\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
From an MS-DOS system prompt (Windows), enter:
|
||||
.sp
|
||||
.nf
|
||||
\f3start orbd \-ORBInitialPort 1050\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Now that ORBD is running, you can run your server and client applications\&. When running the client and server applications, they must be made aware of the port number (and machine name, when applicable) where the Naming Service is running\&. One way to do this is to add the following code to your application:
|
||||
.sp
|
||||
.nf
|
||||
\f3Properties props = new Properties();\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialHost", "MyHost");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3ORB orb = ORB\&.init(args, props);\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
In this example, the naming service is running on port 1050 on host \f3MyHost\fR\&. Another way is to specify the port number and/or machine name when running the server or client application from the command line\&. For example, you would start your \f3HelloApplication\fR with the following command line:
|
||||
.sp
|
||||
.nf
|
||||
\f3java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
To stop the naming service, use the relevant operating system command, such as \f3pkill\fR\f3orbd\fR on Oracle Solaris, or \fICtrl+C\fR in the DOS window in which \f3orbd\fR is running\&. Note that names registered with the naming service can disappear when the service is terminated because of a transient naming service\&. The Java IDL naming service will run until it is explicitly stopped\&.
|
||||
.PP
|
||||
For more information about the naming service included with ORBD, see Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
||||
.SH SERVER\ MANAGER
|
||||
To access the ORBD Server Manager and run a persistent server, the server must be started with \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. When a server is started using \f3servertool\fR, it must be started on the same host and port on which \f3orbd\fR is executing\&. If the server is run on a different port, then the information stored in the database for local contexts will be invalid and the service will not work properly\&.
|
||||
.PP
|
||||
See Java IDL: The "Hello World" Example at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlExample\&.html
|
||||
.PP
|
||||
In this example, you run the \f3idlj\fR compiler and \f3javac\fR compiler as shown in the tutorial\&. To run the ORBD Server Manager, follow these steps for running the application:
|
||||
.PP
|
||||
Start \f3orbd\fR\&.
|
||||
.PP
|
||||
UNIX command shell, enter: \f3orbd -ORBInitialPort 1050\fR\&.
|
||||
.PP
|
||||
MS-DOS system prompt (Windows), enter: \f3s\fR\f3tart orbd -ORBInitialPort 105\fR\f30\fR\&.
|
||||
.PP
|
||||
Port 1050 is the port on which you want the name server to run\&. The \f3-ORBInitialPort\fR option is a required command-line argument\&. When using Oracle Solaris software, you must become a root user to start a process on a port below 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&.
|
||||
.PP
|
||||
Start the \f3servertool\fR: \f3servertool -ORBInitialPort 1050\fR\&.
|
||||
.PP
|
||||
Make sure the name server (\f3orbd\fR) port is the same as in the previous step, for example, \f3-ORBInitialPort 1050\&.\fR The \f3servertool\fR must be started on the same port as the name server\&.
|
||||
.PP
|
||||
In the \f3servertool\fR command line interface, start the \f3Hello\fR server from the \f3servertool\fR prompt:
|
||||
.sp
|
||||
.nf
|
||||
\f3servertool > register \-server HelloServer \-classpath \&. \-applicationName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 HelloServerApName\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
The \f3servertool\fR registers the server, assigns it the name \f3HelloServerApName\fR, and displays its server ID with a listing of all registered servers\&.Run the client application from another terminal window or prompt:
|
||||
.sp
|
||||
.nf
|
||||
\f3java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
For this example, you can omit \f3-ORBInitialHost localhost\fR because the name server is running on the same host as the \f3Hello\fR client\&. If the name server is running on a different host, then use the -\f3ORBInitialHost nameserverhost\fR option to specify the host on which the IDL name server is running\&.Specify the name server (\f3orbd\fR) port as done in the previous step, for example, \f3-ORBInitialPort 1050\fR\&. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (\f3orbd\fR) and \f3servertool\fR\&. To shut down \f3orbd\fR from am MS-DOS prompt, select the window that is running the server and enter \fICtrl+C\fR to shut it down\&.
|
||||
.PP
|
||||
To shut down \f3orbd\fR from an Oracle Solaris shell, find the process, and terminate with the \f3kill\fR command\&. The server continues to wait for invocations until it is explicitly stopped\&. To shut down the \f3servertool\fR, type \fIquit\fR and press the \fIEnter\fR key\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
servertool(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,340 +1,291 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH pack200 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Java Deployment Tools
|
||||
.\" Title: pack200.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH pack200 1 "21 November 2013" "JDK 8" "Java Deployment Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
pack200 \- JAR Packing tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Options may be in any order. The last option on the command line or in a properties file supersedes all previously specified options.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
output\-file
|
||||
Name of the output file.
|
||||
.TP 3
|
||||
JAR\-file
|
||||
Name of the input file.
|
||||
.RE
|
||||
.SH NAME
|
||||
pack200 \- Packages a JAR file into a compressed pack200 file for web deployment\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f2pack200\fP tool is a Java application that transforms a JAR file into a compressed \f2pack200\fP file using the Java \f2gzip\fP compressor. The \f2pack200\fP files are highly compressed files that can be directly deployed, saving bandwidth and reducing download time.
|
||||
.LP
|
||||
.LP
|
||||
The \f2pack200\fP tool uses several options to fine\-tune and set the compression engine.
|
||||
.LP
|
||||
.SS
|
||||
Typical usage:
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
In this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-repack\fP
|
||||
.LP
|
||||
.LP
|
||||
Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. The resulting file can be used as an input to the \f2jarsigner(1)\fP tool.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-g \-\-no\-gzip\fP
|
||||
.LP
|
||||
.LP
|
||||
Produces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-G \-\-strip\-debug\fP
|
||||
.LP
|
||||
.LP
|
||||
Strips attributes used for debugging from the output. These include \f2SourceFile\fP, \f2LineNumberTable\fP, \f2LocalVariableTable\fP and \f2LocalVariableTypeTable\fP. Removing these attributes reduces the size of both downloads and installations but reduces the usefulness of debuggers.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
Preserve the order of files in the input file; this is the default behavior.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-O \-\-no\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
The packer will reorder and transmit all elements. Additionally, the packer may remove JAR directory names. This will reduce the download size; however, certain JAR file optimizations, such as indexing, may not work correctly.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires
|
||||
\fBpack200\fR [\fIoptions\fR] \fIoutput\-file\fR \fIJAR\-file\fR
|
||||
.fi
|
||||
.sp
|
||||
Options can be in any order\&. The last option on the command line or in a properties file supersedes all previously specified options\&.
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.TP
|
||||
\fIoutput-file\fR
|
||||
Name of the output file\&.
|
||||
.TP
|
||||
\fIJAR-file\fR
|
||||
Name of the input file\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3pack200\fR command is a Java application that transforms a JAR file into a compressed pack200 file with the Java gzip compressor\&. The pack200 files are highly compressed files that can be directly deployed to save bandwidth and reduce download time\&.
|
||||
.PP
|
||||
The \f3pack200\fR command has several options to fine-tune and set the compression engine\&. The typical usage is shown in the following example, where \f3myarchive\&.pack\&.gz\fR is produced with the default \f3pack200\fR command settings:
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 myarchive\&.pack\&.gz myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-r, --repack
|
||||
.br
|
||||
more than N bytes, it will be given its own archive segment. As a special case, a value of \f2\-1\fP will produce a single large segment with all input files, while a value of \f20\fP will produce one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.
|
||||
.LP
|
||||
.LP
|
||||
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties.
|
||||
.LP
|
||||
.LP
|
||||
The default is \-1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.
|
||||
.LP
|
||||
.LP
|
||||
A 10MB JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit).
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Evalue \-\-effort=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
If the value is set to a single decimal digit, the packer will use the indicated amount of effort in compressing the archive. Level \f21\fP may produce somewhat larger size and faster compression speed, while level \f29\fP will take much longer but may produce better compression. The special value \f20\fP instructs the packer to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass\-through of the entire archive.
|
||||
.LP
|
||||
.LP
|
||||
The default is \f25\fP, investing a modest amount of time to produce reasonable compression.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
Overrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
true
|
||||
.TP 3
|
||||
false
|
||||
In either case, the packer will set the deflation hint accordingly in the output archive, and will not transmit the individual deflation hints of archive elements.
|
||||
.RE
|
||||
Produces a JAR file by packing and unpacking a JAR file\&. The resulting file can be used as an input to the \f3jarsigner\fR(1) tool\&. The following example packs and unpacks the myarchive\&.jar file:
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 \-\-repack myarchive\-packer\&.jar myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3pack200 \-\-repack myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
keep
|
||||
Preserve deflation hints observed in the input JAR. (This is the default.)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-mvalue \-\-modification\-time=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
The possible values are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
latest
|
||||
The packer will attempt to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment. This single value will be transmitted as part of the segment and applied to all the entries in each segment. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date.
|
||||
.TP 3
|
||||
keep
|
||||
Preserves modification times observed in the input JAR. (This is the default.)
|
||||
.RE
|
||||
The following example preserves the order of files in the input file\&.
|
||||
.TP
|
||||
-g, --no-gzip
|
||||
.br
|
||||
Produces a \f3pack200\fR file\&. With this option, a suitable compressor must be used, and the target system must use a corresponding decompresser\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 \-\-no\-gzip myarchive\&.pack myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Pfile \-\-pass\-file=\fP\f2file\fP
|
||||
.LP
|
||||
.LP
|
||||
Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files may be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator "\f2/\fP". The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, all files under that directory will be passed.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
|
||||
.LP
|
||||
.LP
|
||||
Overrides the default behavior; i.e., the classfile containing the unknown attribute will be passed through with the specified action. The possible values for actions are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
error
|
||||
The \f2pack200\fP operation as a whole will fail with a suitable explanation.
|
||||
.TP 3
|
||||
strip
|
||||
The attribute will be dropped. Note: Removing the required VM attributes may cause Class Loader failures.
|
||||
.TP 3
|
||||
pass
|
||||
Upon encountering this attribute, the entire class will be transmitted as though it is a resource.
|
||||
.RE
|
||||
.TP
|
||||
-G, --strip-debug
|
||||
.br
|
||||
Strips debugging attributes from the output\&. These include \f3SourceFile\fR, \f3LineNumberTable\fR, \f3LocalVariableTable\fR and \f3LocalVariableTypeTable\fR\&. Removing these attributes reduces the size of both downloads and installations, but reduces the usefulness of debuggers\&.
|
||||
.TP
|
||||
--keep-file-order
|
||||
.br
|
||||
Preserve the order of files in the input file\&. This is the default behavior\&.
|
||||
.TP
|
||||
-O, --no-keep-file-order
|
||||
.br
|
||||
The packer reorders and transmits all elements\&. The packer can also remove JAR directory names to reduce the download size\&. However, certain JAR file optimizations, such as indexing, might not work correctly\&.
|
||||
.TP
|
||||
-S\fIvalue\fR , --segment-limit=\fIvalue\fR
|
||||
.br
|
||||
The value is the estimated target size \fIN\fR (in bytes) of each archive segment\&. If a single input file requires more than \fIN\fR bytes, then its own archive segment is provided\&. As a special case, a value of \f3-1\fR produces a single large segment with all input files, while a value of 0 produces one segment for each class\&. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory\&.
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.LP
|
||||
.LP
|
||||
With the above four options, the attribute layout can be specified for a class entity, such as Class attribute, Field attribute, Method attribute, and Code attribute. The attribute\-name is the name of the attribute for which the layout or action is being defined. The possible values for action are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
some\-layout\-string
|
||||
The layout language is defined in the JSR 200 specification.
|
||||
.LP
|
||||
Example: \f2\-\-class\-attribute=SourceFile=RUH\fP
|
||||
.TP 3
|
||||
error
|
||||
Upon encountering this attribute, the pack200 operation will fail with a suitable explanation.
|
||||
.TP 3
|
||||
strip
|
||||
Upon encountering this attribute, the attribute will be removed from the output. Note: removing VM\-required attributes may cause Class Loader failures.
|
||||
.RE
|
||||
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment with the size of its name and other transmitted properties\&.
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Example: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing this attribute to be passed through without further action by the packer.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
|
||||
.LP
|
||||
.LP
|
||||
A configuration file, containing Java properties to initialize the packer, may be specified on the command line.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
|
||||
The default is -1, which means that the packer creates a single segment output file\&. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs\&.
|
||||
|
||||
A 10 MB JAR packed without this limit typically packs about 10 percent smaller, but the packer might require a larger Java heap (about 10 times the segment limit)\&.
|
||||
.TP
|
||||
-E\fIvalue\fR , --effort=\fIvalue\fR
|
||||
.br
|
||||
\f2% more pack.properties\fP
|
||||
If the value is set to a single decimal digit, then the packer uses the indicated amount of effort in compressing the archive\&. Level 1 might produce somewhat larger size and faster compression speed, while level 9 takes much longer, but can produce better compression\&. The special value 0 instructs the \f3pack200\fR command to copy through the original JAR file directly with no compression\&. The JSR 200 standard requires any unpacker to understand this special case as a pass-through of the entire archive\&.
|
||||
|
||||
The default is 5, to invest a modest amount of time to produce reasonable compression\&.
|
||||
.TP
|
||||
-H\fIvalue\fR , --deflate-hint=\fIvalue\fR
|
||||
.br
|
||||
\f2# Generic properties for the packer.\fP
|
||||
Overrides the default, which preserves the input information, but can cause the transmitted archive to be larger\&. The possible values are: \f3true\fR, \f3false\fR, or \f3keep\fR\&.
|
||||
|
||||
If the \f3value\fR is \f3true\fR or false, then the \f3packer200\fR command sets the deflation hint accordingly in the output archive and does not transmit the individual deflation hints of archive elements\&.
|
||||
|
||||
The \f3keep\fR value preserves deflation hints observed in the input JAR\&. This is the default\&.
|
||||
.TP
|
||||
-m\fIvalue\fR , --modification-time=\fIvalue\fR
|
||||
.br
|
||||
\f2modification.time=latest\fP
|
||||
The possible values are \f3latest\fR and \f3keep\fR\&.
|
||||
|
||||
If the value is latest, then the packer attempts to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment\&. This single value is transmitted as part of the segment and applied to all the entries in each segment\&. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date\&.
|
||||
|
||||
If the value is \f3keep\fR, then modification times observed in the input JAR are preserved\&. This is the default\&.
|
||||
.TP
|
||||
-P\fIfile\fR , --pass-file=\fIfile\fR
|
||||
.br
|
||||
\f2deflate.hint=false\fP
|
||||
Indicates that a file should be passed through bytewise with no compression\&. By repeating the option, multiple files can be specified\&. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator forward slash (/)\&. The resulting file names must match exactly as strings with their occurrences in the JAR file\&. If \f3file\fR is a directory name, then all files under that directory are passed\&.
|
||||
.TP
|
||||
-U\fIaction\fR , --unknown-attribute=\fIaction\fR
|
||||
.br
|
||||
\f2keep.file.order=false\fP
|
||||
Overrides the default behavior, which means that the class file that contains the unknown attribute is passed through with the specified \f3action\fR\&. The possible values for actions are \f3error\fR, \f3strip\fR, or \f3pass\fR\&.
|
||||
|
||||
If the value is \f3error\fR, then the entire \f3pack200\fR command operation fails with a suitable explanation\&.
|
||||
|
||||
If the value is \f3strip\fR, then the attribute is dropped\&. Removing the required Java Virtual Machine (JVM) attributes can cause class loader failures\&.
|
||||
|
||||
If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&.
|
||||
.TP
|
||||
.nf
|
||||
-C\fIattribute-name\fR=\fIlayout\fR , --class-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
\f2# This option will cause the files bearing new attributes to\fP
|
||||
.br
|
||||
\f2# be reported as an error rather than passed uncompressed.\fP
|
||||
.br
|
||||
\f2unknown.attribute=error\fP
|
||||
.br
|
||||
\f2# Change the segment limit to be unlimited.\fP
|
||||
.br
|
||||
\f2segment.limit=\-1\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
Outputs minimal messages. Multiple specification of this option will output more verbose messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies quiet operation with no messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies a log file to output messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints help information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints version information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
Passes \f2option\fP to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.LP
|
||||
.SH "EXIT STATUS"
|
||||
.LP
|
||||
.LP
|
||||
The following exit values are returned:
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP for successful completion;
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP if an error occurs.
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
unpack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SE Documentation\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Deployment Guide \- Pack200\fP @
|
||||
See next option\&.
|
||||
.TP
|
||||
.nf
|
||||
-F\fIattribute-name\fR=\fIlayout\fR , --field-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archive Tool
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR Signer tool
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fP man page
|
||||
.RE
|
||||
See next option\&.
|
||||
.TP
|
||||
.nf
|
||||
-M\fIattribute-name\fR=\fIlayout\fR , --method-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
.fi
|
||||
See next option\&.
|
||||
.TP
|
||||
.nf
|
||||
-D\fIattribute-name\fR=\fIlayout\fR , --code-attribute=\fIattribute-name\fR=\fIaction\fR
|
||||
.br
|
||||
.fi
|
||||
With the previous four options, the attribute layout can be specified for a class entity, such as \f3class-attribute\fR, \f3field-attribute\fR, \f3method-attribute\fR, and \f3code-attribute\fR\&. The \fIattribute-name\fR is the name of the attribute for which the layout or action is being defined\&. The possible values for \fIaction\fR are \f3some-layout-string\fR, \f3error\fR, \f3strip\fR, \f3pass\fR\&.
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
This command should not be confused with \f2pack(1)\fP. They are distinctly separate products.
|
||||
.LP
|
||||
.LP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
|
||||
.LP
|
||||
|
||||
\f3some-layout-string\fR: The layout language is defined in the JSR 200 specification, for example: \f3--class-attribute=SourceFile=RUH\fR\&.
|
||||
|
||||
If the value is \f3error\fR, then the \f3pack200\fR operation fails with an explanation\&.
|
||||
|
||||
If the value is \f3strip\fR, then the attribute is removed from the output\&. Removing JVM-required attributes can cause class loader failures\&. For example, \f3--class-attribute=CompilationID=pass\fR causes the class file that contains this attribute to be passed through without further action by the packer\&.
|
||||
|
||||
If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&.
|
||||
.TP
|
||||
-f \fIpack\&.properties\fR , --config-file=\fIpack\&.properties\fR
|
||||
.br
|
||||
A configuration file, containing Java properties to initialize the packer, can be specified on the command line\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3pack200 \-f pack\&.properties myarchive\&.pack\&.gz myarchive\&.jar\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3more pack\&.properties\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# Generic properties for the packer\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3modification\&.time=latest\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3deflate\&.hint=false\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3keep\&.file\&.order=false\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# This option will cause the files bearing new attributes to\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# be reported as an error rather than passed uncompressed\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3unknown\&.attribute=error\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3# Change the segment limit to be unlimited\&.\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3segment\&.limit=\-1\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-v, --verbose
|
||||
.br
|
||||
Outputs minimal messages\&. Multiple specification of this option will create more verbose messages\&.
|
||||
.TP
|
||||
-q, --quiet
|
||||
.br
|
||||
Specifies quiet operation with no messages\&.
|
||||
.TP
|
||||
-l\fIfilename\fR , --log-file=\fIfilename\fR
|
||||
.br
|
||||
Specifies a log file to output messages\&.
|
||||
.TP
|
||||
-?, -h, --help
|
||||
.br
|
||||
Prints help information about this command\&.
|
||||
.TP
|
||||
-V, --version
|
||||
.br
|
||||
Prints version information about this command\&.
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Passes the specified option to the Java Virtual Machine\&. For more information, see the reference page for the java(1) command\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&.
|
||||
.SH EXIT\ STATUS
|
||||
The following exit values are returned: 0 for successful completion and a number greater than 0 when an error occurs\&.
|
||||
.SH NOTES
|
||||
This command should not be confused with \f3pack\fR(1)\&. The \f3pack\fR and \f3pack200\fR commands are separate products\&.
|
||||
.PP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, when there are discrepancies\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
unpack200(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jar(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
jarsigner(1)
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,89 +1,115 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH policytool 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Security Tools
|
||||
.\" Title: policytool.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH policytool 1 "21 November 2013" "JDK 8" "Security Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
policytool \- PolicyTool Administration GUI Utility
|
||||
.LP
|
||||
\f3policytool\fP reads and writes a plain text policy file based on user input via the utility GUI.
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\
|
||||
.TP 3
|
||||
Run the policytool Administrator's utility
|
||||
\f4policytool\fP
|
||||
.TP 3
|
||||
Run policytool and load the specified policy file
|
||||
\f4policytool\fP\f2[\-file\ \fP\f2filename\fP\f2]\fP
|
||||
.TP 3
|
||||
\
|
||||
.TP 3
|
||||
where:
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
directs \f2policytool\fP to load a local policy file
|
||||
.TP 3
|
||||
filename
|
||||
The file name
|
||||
.RE
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
\f3policytool\fP is a GUI that allows users to create and manage policy files. For details, see
|
||||
.na
|
||||
\f2the Policytool Users Guide\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html.
|
||||
.SH "OPTIONS"
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
Loads \f2filename\fP.
|
||||
.SH "SEE ALSO"
|
||||
.na
|
||||
\f2Default Policy Implementation and Syntax\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html
|
||||
.br
|
||||
.na
|
||||
\f2Policy Tool Users' Guide\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html
|
||||
.br
|
||||
.na
|
||||
\f2Security Permissions\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/permissions.html
|
||||
.br
|
||||
.na
|
||||
\f2Security Overview\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html
|
||||
.br
|
||||
.RE
|
||||
.RE
|
||||
.SH NAME
|
||||
policytool \- Reads and writes a plain text policy file based on user input through the utility GUI\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
|
||||
\fBpolicytool\fR [ \fB\-file\fR ] [ \fIfilename\fR ]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
-file
|
||||
.br
|
||||
Directs the \f3policytool\fR command to load a policy file\&.
|
||||
.TP
|
||||
\fIfilename\fR
|
||||
The name of the file to be loaded\&.
|
||||
.PP
|
||||
\fIExamples\fR:
|
||||
.PP
|
||||
Run the policy tool administrator utility:
|
||||
.sp
|
||||
.nf
|
||||
\f3policytool\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
Run the \f3policytool\fR command and load the specified file:
|
||||
.sp
|
||||
.nf
|
||||
\f3policytool\-file mypolicyfile\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH DESCRIPTION
|
||||
The \f3policytool\fR command calls an administrator\&'s GUI that enables system administrators to manage the contents of local policy files\&. A policy file is a plain-text file with a \f3\&.policy\fR extension, that maps remote requestors by domain, to permission objects\&. For details, see Default Policy Implementation and Policy File Syntax at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyFiles\&.html
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-file
|
||||
.br
|
||||
Directs the \f3policytool\fR command to load a policy file\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Default Policy Implementation and Policy File Syntax at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyFiles\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Policy File Creation and Management at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/PolicyGuide\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Permissions in Java SE Development Kit (JDK) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/permissions\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Java Security Overview at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/overview/jsoverview\&.html
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Java Cryptography Architecture (JCA) Reference Guide at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec\&.html
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,227 +1,224 @@
|
||||
." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH rmic 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Remote Method Invocation (RMI) Tools
|
||||
.\" Title: rmic.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH rmic 1 "21 November 2013" "JDK 8" "Remote Method Invocation (RMI) Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmic \- The Java RMI Compiler
|
||||
.LP
|
||||
.LP
|
||||
\f3rmic\fP generates stub, skeleton, and tie classes for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL.
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmic [ \fP\f3options\fP\f3 ] \fP\f4package\-qualified\-class\-name(s)\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
rmic \- Generates stub, skeleton, and tie classes for remote objects that use the Java Remote Method Protocol (JRMP) or Internet Inter-Orb protocol (IIOP)\&. Also generates Object Management Group (OMG) Interface Definition Language (IDL)
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmic\fP compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface \f2java.rmi.Remote\fP. The class names in the \f3rmic\fP command must be for classes that have been compiled successfully with the \f3javac\fP command and must be fully package qualified. For example, running \f3rmic\fP on the class file name \f2HelloImpl\fP as shown here:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmic hello.HelloImpl
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
\fBrmic\fR [ \fIoptions\fR ] \fIpackage\-qualified\-class\-names\fR
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line \f3options\fR\&. See Options\&.
|
||||
.TP
|
||||
\fIpackage-qualified-class-names\fR
|
||||
Class names that include their packages, for example, \f3java\&.awt\&.Color\fR\&.
|
||||
.SH DESCRIPTION
|
||||
\fIDeprecation Note:\fR Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated\&. Oracle recommends that you use dynamically generated JRMP stubs instead, eliminating the need to use this tool for JRMP-based applications\&. See the \f3java\&.rmi\&.server\&.UnicastRemoteObject\fR specification at http://docs\&.oracle\&.com/javase/8/docs/api/java/rmi/server/UnicastRemoteObject\&.html for further information\&.
|
||||
.PP
|
||||
The \f3rmic\fR compiler generates stub and skeleton class files using the Java Remote Method Protocol (JRMP) and stub and tie class files (IIOP protocol) for remote objects\&. These class files are generated from compiled Java programming language classes that are remote object implementation classes\&. A remote implementation class is a class that implements the interface \f3java\&.rmi\&.Remote\fR\&. The class names in the \f3rmic\fR command must be for classes that were compiled successfully with the \f3javac\fR command and must be fully package qualified\&. For example, running the \f3rmic\fR command on the class file name \f3HelloImpl\fR as shown here creates the \f3HelloImpl_Stub\&.class\fRfile in the hello subdirectory (named for the class\&'s package):
|
||||
.sp
|
||||
.nf
|
||||
\f3rmic hello\&.HelloImpl\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
A skeleton for a remote object is a JRMP protocol server-side entity that has a method that dispatches calls to the remote object implementation\&.
|
||||
.PP
|
||||
A tie for a remote object is a server-side entity similar to a skeleton, but communicates with the client with the IIOP protocol\&.
|
||||
.PP
|
||||
A stub is a client-side proxy for a remote object that is responsible for communicating method invocations on remote objects to the server where the actual remote object implementation resides\&. A client\&'s reference to a remote object, therefore, is actually a reference to a local stub\&.
|
||||
.PP
|
||||
By default, the \f3rmic\fR command generates stub classes that use the 1\&.2 JRMP stub protocol version only, as though the \f3-v1\&.2\fR option was specified\&. The \f3-vcompat\fR option was the default in releases before 5\&.0\&. Use the \f3-iiop\fR option to generate stub and tie classes for the IIOP protocol\&. See Options\&.
|
||||
.PP
|
||||
A stub implements only the remote interfaces, and not any local interfaces that the remote object also implements\&. Because a JRMP stub implements the same set of remote interfaces as the remote object, a client can use the Java programming language built-in operators for casting and type checking\&. For IIOP, the \f3PortableRemoteObject\&.narrow\fR method must be used\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-bootclasspath \fIpath\fR
|
||||
.br
|
||||
Overrides the location of bootstrap class files\&.
|
||||
.TP
|
||||
-classpath path
|
||||
.br
|
||||
Specifies the path the \f3rmic\fR command uses to look up classes\&. This option overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons\&. The general format for path is: \f3\&.:<your_path>\fR, for example: \f3\&.:/usr/local/java/classes\fR\&.
|
||||
.TP
|
||||
-d \fIdirectory\fR
|
||||
.br
|
||||
Specifies the root destination directory for the generated class hierarchy\&. You can use this option to specify a destination directory for the stub, skeleton, and tie files\&. For example, the following command places the stub and skeleton classes derived from MyClass into the directory /java/classes/exampleclass\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmic \-d /java/classes exampleclass\&.MyClass\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.LP
|
||||
.LP
|
||||
creates the \f2HelloImpl_Stub.class\fP file in the \f2hello\fP subdirectory (named for the class's package).
|
||||
.LP
|
||||
.LP
|
||||
A \f2skeleton\fP for a remote object is a JRMP protocol server\-side entity that has a method that dispatches calls to the actual remote object implementation.
|
||||
.LP
|
||||
.LP
|
||||
A \f2tie\fP for a remote object is a server\-side entity similar to a skeleton, but which communicates with the client using the IIOP protocol.
|
||||
.LP
|
||||
.LP
|
||||
A \f2stub\fP is a client\-side proxy for a remote object which is responsible for communicating method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub.
|
||||
.LP
|
||||
.LP
|
||||
By default, \f3rmic\fP generates stub classes that use the 1.2 JRMP stub protocol version only, as if the \f2\-v1.2\fP option had been specified. (Note that the \f2\-vcompat\fP option was the default in releases prior to 5.0.) Use the \f2\-iiop\fP option to generate stub and tie classes for the IIOP protocol.
|
||||
.LP
|
||||
.LP
|
||||
A stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built\-in operators for casting and type checking. For IIOP, the \f2PortableRemoteObject.narrow\fP method must be used.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-bootclasspath path
|
||||
Overrides location of bootstrap class files
|
||||
.TP 3
|
||||
\-classpath path
|
||||
Specifies the path \f3rmic\fP uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for \f2path\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:<your_path>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-d directory
|
||||
Specifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the command
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
% rmic \-d /java/classes foo.MyClass
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
would place the stub and skeleton classes derived from \f2MyClass\fP into the directory \f2/java/classes/foo\fP. If the \f2\-d\fP option is not specified, the default behavior is as if \f2"\-d\ ."\fP were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. (Note that in some previous versions of \f3rmic\fP, if \f2\-d\fP was not specified, then the package hierarchy was \f2not\fP created, and all of the output files were placed directly in the current directory.)
|
||||
.br
|
||||
\
|
||||
.TP 3
|
||||
\-extdirs path
|
||||
Overrides location of installed extensions
|
||||
.TP 3
|
||||
\-g
|
||||
Enables generation of all debugging information, including local variables. By default, only line number information is generated.
|
||||
.TP 3
|
||||
\-idl
|
||||
Causes \f2rmic\fP to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language\-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. See the
|
||||
.na
|
||||
\f2Java Language to IDL Mapping\fP @
|
||||
.fi
|
||||
http://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description.
|
||||
.br
|
||||
.br
|
||||
When the \f2\-idl\fP option is used, other options also include:
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-always or \-alwaysgenerate
|
||||
Forces re\-generation even when existing stubs/ties/IDL are newer than the input class.
|
||||
.TP 3
|
||||
\-factory
|
||||
Uses factory keyword in generated IDL.
|
||||
.TP 3
|
||||
\-idlModule\ fromJavaPackage[.class]\ toIDLModule
|
||||
Specifies IDLEntity package mapping. For example:\ \f2\-idlModule foo.bar my::real::idlmod\fP.
|
||||
.TP 3
|
||||
\-idlFile\ fromJavaPackage[.class]\ toIDLFile
|
||||
Specifies IDLEntity file mapping. For example:\ \f2\-idlFile test.pkg.X TEST16.idl\fP.\
|
||||
.RE
|
||||
.TP 3
|
||||
\-iiop
|
||||
Causes \f2rmic\fP to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.
|
||||
.br
|
||||
.br
|
||||
Invoking \f2rmic\fP with the \f2\-iiop\fP generates stubs and ties that conform to this naming convention:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
_<implementationName>_stub.class
|
||||
.fl
|
||||
_<interfaceName>_tie.class
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
When the \f2\-iiop\fP option is used, other options also include:
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-always or \-alwaysgenerate
|
||||
Forces re\-generation even when existing stubs/ties/IDL are newer than the input class.
|
||||
.TP 3
|
||||
\-nolocalstubs
|
||||
Do not create stubs optimized for same\-process clients and servers.
|
||||
.TP 3
|
||||
\-noValueMethods
|
||||
Must be used with the \f2\-idl\fP option. Prevents addition of \f2valuetype\fP methods and initializers to emitted IDL. These methods and initializers are optional for \f2valuetype\fPs, and are generated unless the \f2\-noValueMethods\fP option is specified when using the \f2\-idl\fP option.
|
||||
.TP 3
|
||||
\-poa
|
||||
Changes the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. The \f2PortableServer\fP module for the
|
||||
.na
|
||||
\f2Portable Object Adapter\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf.
|
||||
.RE
|
||||
.TP 3
|
||||
\-J
|
||||
Used in conjunction with any \f2java\fP option, it passes the option following the \f2\-J\fP (no spaces between the \-J and the option) on to the \f2java\fP interpreter.
|
||||
.TP 3
|
||||
\-keep or \-keepgenerated
|
||||
Retains the generated \f2.java\fP source files for the stub, skeleton, and/or tie classes and writes them to the same directory as the \f2.class\fP files.
|
||||
.TP 3
|
||||
\-nowarn
|
||||
Turns off warnings. If used the compiler does not print out any warnings.
|
||||
.TP 3
|
||||
\-nowrite
|
||||
Does not write compiled classes to the file system.
|
||||
.TP 3
|
||||
\-vcompat
|
||||
Generates stub and skeleton classes compatible with both the 1.1 and 1.2 JRMP stub protocol versions. (This option was the default in releases prior to 5.0.) The generated stub classes will use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and will use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes will support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large in order to support both modes of operation.
|
||||
.TP 3
|
||||
\-verbose
|
||||
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.
|
||||
.TP 3
|
||||
\-v1.1
|
||||
Generates stub and skeleton classes for the 1.1 JRMP stub protocol version only. Note that this option is only useful for generating stub classes that are serialization\-compatible with pre\-existing, statically\-deployed stub classes that were generated by the \f3rmic\fP tool from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used).
|
||||
.TP 3
|
||||
\-v1.2
|
||||
(default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated with this option because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes will not work if they are loaded into a JDK 1.1 virtual machine.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example,
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
If the \f3-d\fR option is not specified, then the default behavior is as if \f3-d \&.\fR was specified\&. The package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it\&. In some earlier releases of the \f3rmic\fR command, if the \f3-d\fR option was not specified, then the package hierarchy was not created, and all of the output files were placed directly in the current directory\&.
|
||||
.TP
|
||||
-extdirs \fIpath\fR
|
||||
.br
|
||||
Overrides the location of installed extensions\&.
|
||||
.TP
|
||||
-g
|
||||
.br
|
||||
Enables the generation of all debugging information, including local variables\&. By default, only line number information is generated\&.
|
||||
.TP
|
||||
-idl
|
||||
.br
|
||||
Causes the \f3rmic\fR command to generate OMG IDL for the classes specified and any classes referenced\&. IDL provides a purely declarative, programming language-independent way to specify an API for an object\&. The IDL is used as a specification for methods and data that can be written in and called from any language that provides CORBA bindings\&. This includes Java and C++ among others\&. See Java IDL: IDL to Java Language Mapping at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping\&.html
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
java(1), javac(1),
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath
|
||||
.LP
|
||||
|
||||
When the \f3-idl\fR option is used, other options also include:
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-always\fR or \f3-alwaysgenerate\fR options force regeneration even when existing stubs/ties/IDL are newer than the input class\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-factory\fR option uses the \f3factory\fR keyword in generated IDL\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-idlModule\fR from J\f3avaPackage[\&.class]\fR\f3toIDLModule\fR specifies \f3IDLEntity\fR package mapping, for example: \f3-idlModule\fR\f3my\&.module my::real::idlmod\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\f3-idlFile\fR\f3fromJavaPackage[\&.class] toIDLFile\fR specifies \f3IDLEntity\fR file mapping, for example: \f3-idlFile test\&.pkg\&.X TEST16\&.idl\fR\&.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
-iiop
|
||||
.br
|
||||
Causes the \f3rmic\fR command to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes\&. A stub class is a local proxy for a remote object and is used by clients to send calls to a server\&. Each remote interface requires a stub class, which implements that remote interface\&. A client reference to a remote object is a reference to a stub\&. Tie classes are used on the server side to process incoming calls, and dispatch the calls to the proper implementation class\&. Each implementation class requires a tie class\&.
|
||||
|
||||
If you call the \f3rmic\fR command with the \f3-iiop\fR, then it generates stubs and ties that conform to this naming convention:
|
||||
.sp
|
||||
.nf
|
||||
\f3_<implementationName>_stub\&.class\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3_<interfaceName>_tie\&.class\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
When you use the \f3-iiop\fR option, other options also include:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-always\fR or \f3-alwaysgenerate\fR options force regeneration even when existing stubs/ties/IDL are newer than the input class\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-nolocalstubs\fR option means do not create stubs optimized for same-process clients and servers\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-noValueMethods\fR option must be used with the \f3-idl\fR option\&. The \f3-noValueMethods\fR option prevents the addition of \f3valuetype\fR methods and initializers to emitted IDL\&. These methods and initializers are optional for valuetypes, and are generated unless the \f3-noValueMethods\fR option is specified with the \f3-idl\fR option\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-poa\fR option changes the inheritance from \f3org\&.omg\&.CORBA_2_3\&.portable\&.ObjectImpl\fR to \f3org\&.omg\&.PortableServer\&.Servant\fR\&. The \f3PortableServer\fR module for the Portable Object Adapter (POA) defines the native \f3Servant\fR type\&. In the Java programming language, the \f3Servant\fR type is mapped to the \f3Java org\&.omg\&.PortableServer\&.Servant\fR class\&. It serves as the base class for all POA servant implementations and provides a number of methods that can be called by the application programmer, and methods that are called by the POA and that can be overridden by the user to control aspects of servant behavior\&. Based on the OMG IDL to Java Language Mapping Specification, CORBA V 2\&.3\&.1 ptc/00-01-08\&.pdf\&..RE
|
||||
|
||||
.TP
|
||||
-J
|
||||
.br
|
||||
Used with any Java command, the \f3-J\fR option passes the argument that follows the \f3-J\fR (no spaces between the \f3-J\fRand the argument) to the Java interpreter
|
||||
.TP
|
||||
-keep or -keepgenerated
|
||||
.br
|
||||
Retains the generated \f3\&.java\fR source files for the stub, skeleton, and tie classes and writes them to the same directory as the\f3\&.class\fR files\&.
|
||||
.TP
|
||||
-nowarn
|
||||
.br
|
||||
Turns off warnings\&. When the \f3-nowarn\fR options is used\&. The compiler does not print out any warnings\&.
|
||||
.TP
|
||||
-nowrite
|
||||
.br
|
||||
Does not write compiled classes to the file system\&.
|
||||
.TP
|
||||
-vcompat (deprecated)
|
||||
.br
|
||||
Generates stub and skeleton classes that are compatible with both the 1\&.1 and 1\&.2 JRMP stub protocol versions\&. This option was the default in releases before 5\&.0\&. The generated stub classes use the 1\&.1 stub protocol version when loaded in a JDK 1\&.1 virtual machine and use the 1\&.2 stub protocol version when loaded into a 1\&.2 (or later) virtual machine\&. The generated skeleton classes support both 1\&.1 and 1\&.2 stub protocol versions\&. The generated classes are relatively large to support both modes of operation\&. Note: This option has been deprecated\&. See Description\&.
|
||||
.TP
|
||||
-verbose
|
||||
.br
|
||||
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded\&.
|
||||
.TP
|
||||
-v1\&.1 (deprecated)
|
||||
.br
|
||||
Generates stub and skeleton classes for the 1\&.1 JRMP stub protocol version only\&. The \f3-v1\&.1\fR option is only useful for generating stub classes that are serialization-compatible with preexisting, statically deployed stub classes that were generated by the \f3rmic\fR command from JDK 1\&.1 and that cannot be upgraded (and dynamic class loading is not being used)\&. Note: This option has been deprecated\&. See Description\&.
|
||||
.TP
|
||||
-v1\&.2 (deprecated)
|
||||
.br
|
||||
(Default) Generates stub classes for the 1\&.2 JRMP stub protocol version only\&. No skeleton classes are generated because skeleton classes are not used with the 1\&.2 stub protocol version\&. The generated stub classes do not work when they are loaded into a JDK 1\&.1 virtual machine\&. Note: This option has been deprecated\&. See Description\&.
|
||||
.SH ENVIRONMENT\ VARIABLES
|
||||
.TP
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user-defined classes\&. Directories are separated by colons, for example: \f3\&.:/usr/local/java/classes\fR\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
javac(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Setting the Class Path
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
@ -1,328 +1,315 @@
|
||||
." Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
."
|
||||
." This code is free software; you can redistribute it and/or modify it
|
||||
." under the terms of the GNU General Public License version 2 only, as
|
||||
." published by the Free Software Foundation.
|
||||
."
|
||||
." This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
." version 2 for more details (a copy is included in the LICENSE file that
|
||||
." accompanied this code).
|
||||
."
|
||||
." You should have received a copy of the GNU General Public License version
|
||||
." 2 along with this work; if not, write to the Free Software Foundation,
|
||||
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
."
|
||||
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
." or visit www.oracle.com if you need additional information or have any
|
||||
." questions.
|
||||
."
|
||||
.TH rmid 1 "10 May 2011"
|
||||
'\" t
|
||||
.\" Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
.\"
|
||||
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
.\"
|
||||
.\" This code is free software; you can redistribute it and/or modify it
|
||||
.\" under the terms of the GNU General Public License version 2 only, as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
.\" version 2 for more details (a copy is included in the LICENSE file that
|
||||
.\" accompanied this code).
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License version
|
||||
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
||||
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
.\"
|
||||
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
.\" or visit www.oracle.com if you need additional information or have any
|
||||
.\" questions.
|
||||
.\"
|
||||
.\" Arch: generic
|
||||
.\" Software: JDK 8
|
||||
.\" Date: 21 November 2013
|
||||
.\" SectDesc: Remote Method Invocation (RMI) Tools
|
||||
.\" Title: rmid.1
|
||||
.\"
|
||||
.if n .pl 99999
|
||||
.TH rmid 1 "21 November 2013" "JDK 8" "Remote Method Invocation (RMI) Tools"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmid \- The Java RMI Activation System Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fP starts the activation system daemon that allows objects to be registered and activated in a virtual machine (VM).
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid [options]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.SH NAME
|
||||
rmid \- Starts the activation system daemon that enables objects to be registered and activated in a Java Virtual Machine (JVM)\&.
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
.nf
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmid\fP tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a VM. See the
|
||||
.na
|
||||
\f2Java RMI Specification\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.html and
|
||||
.na
|
||||
\f2Activation tutorials\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects.
|
||||
.LP
|
||||
.LP
|
||||
The daemon can be started by executing the \f2rmid\fP command, and specifying a security policy file, as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3Note:\fP When running Sun's implementation of \f2rmid\fP, by default you will need to specify a security policy file so that \f2rmid\fP can verify whether or not the information in each \f2ActivationGroupDesc\fP is allowed to be used to launch a VM for an activation group. Specifically, the command and options specified by the \f2CommandEnvironment\fP and any \f2Properties\fP passed to an \f2ActivationGroupDesc\fP's constructor must now be explicitly allowed in the security policy file for \f2rmid\fP. The value of the \f2sun.rmi.activation.execPolicy\fP property dictates the policy that \f2rmid\fP uses to determine whether or not the information in an \f2ActivationGroupDesc\fP may be used to launch a VM for an activation group.
|
||||
.LP
|
||||
.LP
|
||||
Executing \f2rmid\fP by default
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
starts the Activator and an internal registry on the default port, 1098, and
|
||||
.TP 2
|
||||
o
|
||||
binds an \f2ActivationSystem\fP to the name \f2java.rmi.activation.ActivationSystem\fP in this internal registry.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To specify an alternate port for the registry, you must specify the \f2\-port\fP option when starting up \f2rmid\fP. For example,
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy \-port 1099
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
starts the activation system daemon and a registry on the registry's default port, 1099.
|
||||
.LP
|
||||
.SS
|
||||
Starting rmid from inetd/xinetd
|
||||
.LP
|
||||
.LP
|
||||
An alternative to starting \f2rmid\fP from the command line is to configure \f2inetd\fP (Solaris) or \f2xinetd\fP (Linux) to start \f2rmid\fP on demand.
|
||||
.LP
|
||||
.LP
|
||||
When \f2rmid\fP starts up, it attempts to obtain an inherited channel (inherited from \f2inetd\fP/\f2xinetd\fP) by invoking the \f2System.inheritedChannel\fP method. If the inherited channel is \f2null\fP or not an instance of \f2java.nio.channels.ServerSocketChannel\fP, then \f2rmid\fP assumes that it was not started by \f2inetd\fP/\f2xinetd\fP, and it starts up as described above.
|
||||
.LP
|
||||
.LP
|
||||
If the inherited channel is a \f2ServerSocketChannel\fP instance, then \f2rmid\fP uses the \f2java.net.ServerSocket\fP obtained from the \f2ServerSocketChannel\fP as the server socket that accepts requests for the remote objects it exports, namely the registry in which the \f2java.rmi.activation.ActivationSystem\fP is bound and the \f2java.rmi.activation.Activator\fP remote object. In this mode, \f2rmid\fP behaves the same as when it is started from the command line, \f2except\fP:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Output printed to \f2System.err\fP is redirected to a file. This file is located in the directory specified by the \f2java.io.tmpdir\fP system property (typically \f2/var/tmp\fP or \f2/tmp\fP) with the prefix \f2"rmid\-err"\fP and the suffix \f2"tmp"\fP.
|
||||
.TP 2
|
||||
o
|
||||
The \f2\-port\fP option is disallowed. If this option is specified, \f2rmid\fP will exit with an error message.
|
||||
.TP 2
|
||||
o
|
||||
The \f2\-log\fP option is required. If this option is not specified, \f2rmid\fP will exit with an error message.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
See the man pages for \f2inetd\fP (Solaris) or \f2xinetd\fP (Linux) for details on how to configure services to be started on demand.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-C<someCommandLineOption>
|
||||
Specifies an option that is passed as a command\-line argument to each child process (activation group) of \f2rmid\fP when that process is created. For example, you could pass a property to each virtual machine spawned by the activation system daemon:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Dsome.property=value
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
This ability to pass command\-line arguments to child processes can be useful for debugging. For example, the following command:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
will enable server\-call logging in all child VMs.
|
||||
.LP
|
||||
.TP 3
|
||||
\-J<someCommandLineOption>
|
||||
Specifies an option that is passed to the \f2java\fP interpreter running \f2rmid\fP. For example, to specify that \f2rmid\fP use a policy file named \f2rmid.policy\fP, the \f2\-J\fP option can be used to define the \f2java.security.policy\fP property on \f2rmid\fP's command line, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-J\-Dsun.rmi.activation.execPolicy=<policy>
|
||||
Specifies the policy that \f2rmid\fP employs to check commands and command\-line options used to launch the VM in which an activation group runs. Please note that this option exists only in Sun's implementation of the Java RMI activation daemon. If this property is not specified on the command line, the result is the same as if \f2\-J\-Dsun.rmi.activation.execPolicy=default\fP were specified. The possible values of \f2<policy>\fP can be \f2default\fP, \f2<policyClassName>\fP, or \f2none\fP:
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3default (or if this property is \fP\f4unspecified\fP\f3)\fP
|
||||
.LP
|
||||
The default \f2execPolicy\fP allows \f2rmid\fP to execute commands with specific command\-line options only if \f2rmid\fP has been granted permission to execute those commands and options in the security policy file that \f2rmid\fP uses. Only the default activation group implementation can be used with the \f2default\fP execution policy.
|
||||
.LP
|
||||
\f2rmid\fP launches a VM for an activation group using the information in the group's registered activation group descriptor, an \f2ActivationGroupDesc\fP. The group descriptor specifies an optional \f2ActivationGroupDesc.CommandEnvironment\fP which includes the \f2command\fP to execute to start the activation group as well as any command line \f2options\fP to be added to the command line. By default, \f2rmid\fP uses the \f2java\fP command found in \f2java.home\fP. The group descriptor also contains \f2properties\fP overrides that are added to the command line as options defined as:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-D\fP\f4<property>\fP\f3=\fP\f4<value>\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.LP
|
||||
The permission \f2com.sun.rmi.rmid.ExecPermission\fP is used to grant \f2rmid\fP permission to execute a command, specified in the group descriptor's \f2CommandEnvironment\fP to launch an activation group. The permission \f2com.sun.rmi.rmid.ExecOptionPermission\fP is used to allow \f2rmid\fP to use command\-line options, specified as properties overrides in the group descriptor or as options in the \f2CommandEnvironment\fP, when launching the activation group.
|
||||
.LP
|
||||
When granting \f2rmid\fP permission to execute various commands and options, the permissions \f2ExecPermission\fP and \f2ExecOptionPermission\fP need to be granted universally (i.e., granted to all code sources).
|
||||
.RS 3
|
||||
.TP 3
|
||||
ExecPermission
|
||||
The \f2ExecPermission\fP class represents permission for \f2rmid\fP to execute a specific \f2command\fP to launch an activation group.
|
||||
.LP
|
||||
\f3Syntax\fP
|
||||
\fBrmid\fR [\fIoptions\fR]
|
||||
.fi
|
||||
.sp
|
||||
.TP
|
||||
\fIoptions\fR
|
||||
The command-line options\&. See Options\&.
|
||||
.SH DESCRIPTION
|
||||
The \f3rmid\fR command starts the activation system daemon\&. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a JVM\&. For details on how to write programs that use activatable objects, the \fIUsing Activation\fR tutorial at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/rmi/activation/overview\&.html
|
||||
.PP
|
||||
Start the daemon by executing the \f3rmid\fR command and specifying a security policy file, as follows:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-J\-Djava\&.security\&.policy=rmid\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
When you run Oracle\(cqs implementation of the \f3rmid\fR command, by default you must specify a security policy file so that the \f3rmid\fR command can verify whether or not the information in each \f3ActivationGroupDesc\fR is allowed to be used to start a JVM for an activation group\&. Specifically, the command and options specified by the \f3CommandEnvironment\fR and any properties passed to an \f3ActivationGroupDesc\fR constructor must now be explicitly allowed in the security policy file for the \f3rmid\fR command\&. The value of the \f3sun\&.rmi\&.activation\&.execPolicy\fR property dictates the policy that the \f3rmid\fR command uses to determine whether or not the information in an \f3ActivationGroupDesc\fR can be used to start a JVM for an activation group\&. For more information see the description of the -J-Dsun\&.rmi\&.activation\&.execPolicy=policy option\&.
|
||||
.PP
|
||||
Executing the \f3rmid\fR command starts the Activator and an internal registry on the default port1098 and binds an \f3ActivationSystem\fR to the name \f3java\&.rmi\&.activation\&.ActivationSystem\fR in this internal registry\&.
|
||||
.PP
|
||||
To specify an alternate port for the registry, you must specify the \f3-port\fR option when you execute the \f3rmid\fR command\&. For example, the following command starts the activation system daemon and a registry on the registry\&'s default port, 1099\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-J\-Djava\&.security\&.policy=rmid\&.policy \-port 1099\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
.SH START\ RMID\ ON\ DEMAND
|
||||
An alternative to starting \f3rmid\fR from the command line is to configure \f3inetd\fR (Oracle Solaris) or \f3xinetd\fR (Linux) to start \f3rmid\fR on demand\&.
|
||||
.PP
|
||||
When RMID starts, it attempts to obtain an inherited channel (inherited from \f3inetd\fR/\f3xinetd\fR) by calling the \f3System\&.inheritedChannel\fR method\&. If the inherited channel is null or not an instance of \f3java\&.nio\&.channels\&.ServerSocketChannel\fR, then RMID assumes that it was not started by \f3inetd\fR/\f3xinetd\fR, and it starts as previously described\&.
|
||||
.PP
|
||||
If the inherited channel is a \f3ServerSocketChannel\fR instance, then RMID uses the \f3java\&.net\&.ServerSocket\fR obtained from the \f3ServerSocketChannel\fR as the server socket that accepts requests for the remote objects it exports: The registry in which the \f3java\&.rmi\&.activation\&.ActivationSystem\fR is bound and the \f3java\&.rmi\&.activation\&.Activator\fR remote object\&. In this mode, RMID behaves the same as when it is started from the command line, except in the following cases:
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Output printed to \f3System\&.err\fR is redirected to a file\&. This file is located in the directory specified by the \f3java\&.io\&.tmpdir\fR system property (typically \f3/var/tmp\fR or \f3/tmp\fR) with the prefix \f3rmid-err\fR and the suffix \f3tmp\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-port\fR option is not allowed\&. If this option is specified, then RMID exits with an error message\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
The \f3-log\fR option is required\&. If this option is not specified, then RMID exits with an error message
|
||||
.PP
|
||||
See the man pages for \f3inetd\fR (Oracle Solaris) or \f3xinetd\fR (Linux) for details on how to configure services to be started on demand\&.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
-C\fIoption\fR
|
||||
.br
|
||||
The \f2name\fP of an \f2ExecPermission\fP is the path name of a command to grant \f2rmid\fP permission to execute. A path name that ends in "/*" indicates all the files contained in that directory (where "/" is the file\-separator character, \f2File.separatorChar\fP). A path name that ends with "/\-" indicates all files and subdirectories contained in that directory (recursively). A path name consisting of the special token "<<ALL FILES>>" matches \f3any\fP file.
|
||||
.LP
|
||||
\f3Note:\fP A path name consisting of a single "*" indicates all the files in the current directory, while a path name consisting of a single "\-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.
|
||||
.TP 3
|
||||
ExecOptionPermission
|
||||
The \f2ExecOptionPermission\fP class represents permission for \f2rmid\fP to use a specific command\-line \f2option\fP when launching an activation group. The \f2name\fP of an \f2ExecOptionPermission\fP is the value of a command line option.
|
||||
.LP
|
||||
\f3Syntax\fP
|
||||
Specifies an option that is passed as a command-line argument to each child process (activation group) of the \f3rmid\fR command when that process is created\&. For example, you could pass a property to each virtual machine spawned by the activation system daemon:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-C\-Dsome\&.property=value\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
This ability to pass command-line arguments to child processes can be useful for debugging\&. For example, the following command enables server-call logging in all child JVMs\&.
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-C\-Djava\&.rmi\&.server\&.logCalls=true\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-J\fIoption\fR
|
||||
.br
|
||||
Options support a limited wildcard scheme. An asterisk signifies a wildcard match, and it may appear as the option name itself (i.e., it matches any option), or an asterisk may appear at the end of the option name only if the asterisk follows either a "." or "=".
|
||||
.LP
|
||||
For example: "*" or "\-Dfoo.*" or "\-Da.b.c=*" is valid, "*foo" or "\-Da*b" or "ab*" is not.
|
||||
.TP 3
|
||||
Policy file for rmid
|
||||
When granting \f2rmid\fP permission to execute various commands and options, the permissions \f2ExecPermission\fP and \f2ExecOptionPermission\fP need to be granted universally (i.e., granted to all code sources). It is safe to grant these permissions universally because only \f2rmid\fP checks these permissions.
|
||||
.LP
|
||||
An example policy file that grants various execute permissions to \f2rmid\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant {
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/java/jdk1.7.0/solaris/bin/java";
|
||||
.fl
|
||||
Specifies an option that is passed to the Java interpreter running RMID\&. For example, to specify that the \f3rmid\fR command use a policy file named \f3rmid\&.policy\fR, the \f3-J\fR option can be used to define the \f3java\&.security\&.policy\fR property on the \f3rmid\fR command line, for example:
|
||||
.sp
|
||||
.nf
|
||||
\f3rmid \-J\-Djava\&.security\&.policy\-rmid\&.policy\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/rmidcmds/*";
|
||||
.fl
|
||||
.TP
|
||||
-J-Dsun\&.rmi\&.activation\&.execPolicy=\fIpolicy\fR
|
||||
.br
|
||||
Specifies the policy that RMID employs to check commands and command-line options used to start the JVM in which an activation group runs\&. Please note that this option exists only in Oracle\&'s implementation of the Java RMI activation daemon\&. If this property is not specified on the command line, then the result is the same as though \f3-J-Dsun\&.rmi\&.activation\&.execPolicy=default\fR were specified\&. The possible values of \f3policy\fR can be \f3default\fR, \f3policyClassName\fR, or \f3none\fR\&.
|
||||
.RS
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
default
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.policy=/files/policies/group.policy";
|
||||
.fl
|
||||
The \f3default\fR or unspecified value \f3execPolicy\fR allows the \f3rmid\fR command to execute commands with specific command-line options only when the \f3rmid\fR command was granted permission to execute those commands and options in the security policy file that the \f3rmid\fR command uses\&. Only the default activation group implementation can be used with the default execution policy\&.
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.debug=*";
|
||||
.fl
|
||||
The \f3rmid\fR command starts a JVM for an activation group with the information in the group\&'s registered activation group descriptor, an \f3ActivationGroupDesc\fR\&. The group descriptor specifies an optional \f3ActivationGroupDesc\&.CommandEnvironment\fR that includes the command to execute to start the activation group and any command-line options to be added to the command line\&. By default, the \f3rmid\fR command uses the \f3java\fR command found in \f3java\&.home\fR\&. The group descriptor also contains properties overrides that are added to the command line as options defined as: \f3-D<property>=<value>\fR\&.The \f3com\&.sun\&.rmi\&.rmid\&.ExecPermission\fR permission grants the \f3rmid\fR command permission to execute a command that is specified in the group descriptor\&'s \f3CommandEnvironment\fR to start an activation group\&. The \f3com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fR permission enables the \f3rmid\fR command to use command-line options, specified as properties overrides in the group descriptor or as options in the \f3CommandEnvironment\fR when starting the activation group\&.When granting the \f3rmid\fR command permission to execute various commands and options, the permissions \f3ExecPermission\fR and \f3ExecOptionPermission\fR must be granted to all code sources\&.
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Dsun.rmi.*";
|
||||
.fl
|
||||
};
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The first permission granted allow \f2rmid\fP to execute the 1.7.0 version of the \f2java\fP command, specified by its explicit path name. Note that by default, the version of the \f2java\fP command found in \f2java.home\fP is used (the same one that \f2rmid\fP uses), and does not need to be specified in the policy file. The second permission allows \f2rmid\fP to execute any command in the directory \f2/files/apps/rmidcmds\fP.
|
||||
.LP
|
||||
The third permission granted, an \f2ExecOptionPermission\fP, allows \f2rmid\fP to launch an activation group that defines the security policy file to be \f2/files/policies/group.policy\fP. The next permission allows the \f2java.security.debug\fP property to be used by an activation group. The last permission allows any property in the \f2sun.rmi\fP property name hierarchy to be used by activation groups.
|
||||
.LP
|
||||
To start \f2rmid\fP with a policy file, the \f2java.security.policy\fP property needs to be specified on \f2rmid\fP's command line, for example:
|
||||
.LP
|
||||
\f2rmid \-J\-Djava.security.policy=rmid.policy\fP
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
\f4<policyClassName>\fP
|
||||
.LP
|
||||
If the default behavior is not flexible enough, an administrator can provide, when starting \f2rmid\fP, the name of a class whose \f2checkExecCommand\fP method is executed in order to check commands to be executed by rmid.
|
||||
.LP
|
||||
The \f2policyClassName\fP specifies a public class with a public, no\-argument constructor and an implementation of the following \f2checkExecCommand\fP method:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
public void checkExecCommand(ActivationGroupDesc desc,
|
||||
.fl
|
||||
String[] command)
|
||||
.fl
|
||||
throws SecurityException;
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
Before launching an activation group, \f2rmid\fP calls the policy's \f2checkExecCommand\fP method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the \f2checkExecCommand\fP throws a \f2SecurityException\fP, \f2rmid\fP will not launch the activation group and an \f2ActivationException\fP will be thrown to the caller attempting to activate the object.
|
||||
.TP 2
|
||||
o
|
||||
\f3none\fP
|
||||
.LP
|
||||
If the \f2sun.rmi.activation.execPolicy\fP property value is "none", then \f2rmid\fP will not perform any validation of commands to launch activation groups.
|
||||
.RE
|
||||
.LP
|
||||
.TP 3
|
||||
\-log dir
|
||||
Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, \f2log\fP, in the directory in which the \f2rmid\fP command was executed.
|
||||
.LP
|
||||
.TP 3
|
||||
\-port port
|
||||
Specifies the port \f2rmid\fP's registry uses. The activation system daemon binds the \f2ActivationSystem\fP, with the name \f2java.rmi.activation.ActivationSystem\fP, in this registry. Thus, the \f2ActivationSystem\fP on the local machine can be obtained using the following \f2Naming.lookup\fP method call:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.rmi.*;
|
||||
.fl
|
||||
import java.rmi.activation.*;
|
||||
.fl
|
||||
\fIExecPermission\fR
|
||||
|
||||
.fl
|
||||
ActivationSystem system; system = (ActivationSystem)
|
||||
.fl
|
||||
Naming.lookup("//:\fP\f4port\fP/java.rmi.activation.ActivationSystem");
|
||||
.fl
|
||||
.fi
|
||||
.TP 3
|
||||
\-stop
|
||||
Stops the current invocation of \f2rmid\fP, for a port specified by the \f2\-port\fP option. If no port is specified, it will stop the \f2rmid\fP running on port 1098.
|
||||
.RE
|
||||
The \f3ExecPermission\fR class represents permission for the \f3rmid\fR command to execute a specific command to start an activation group\&.
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
\fISyntax\fR: The name of an \f3ExecPermission\fR is the path name of a command to grant the \f3rmid\fR command permission to execute\&. A path name that ends in a slash (/) and an asterisk (*) indicates that all of the files contained in that directory where slash is the file-separator character, \f3File\&.separatorChar\fR\&. A path name that ends in a slash (/) and a minus sign (-) indicates all files and subdirectories contained in that directory (recursively)\&. A path name that consists of the special token \f3<<ALL FILES>>\fR matches any file\&.
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
rmic(1),
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://download.oracle.com/javase/7/docs/technotes/tools/index.html#classpath, java(1)
|
||||
.LP
|
||||
|
||||
A path name that consists of an asterisk (*) indicates all the files in the current directory\&. A path name that consists of a minus sign (-) indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory\&.
|
||||
|
||||
\fIExecOptionPermission\fR
|
||||
|
||||
The \f3ExecOptionPermission\fR class represents permission for the \f3rmid\fR command to use a specific command-line option when starting an activation group\&. The name of an \f3ExecOptionPermission\fR is the value of a command-line option\&.
|
||||
|
||||
\fISyntax\fR: Options support a limited wild card scheme\&. An asterisk signifies a wild card match, and it can appear as the option name itself (matches any option), or an asterisk (*) can appear at the end of the option name only when the asterisk (*) follows a dot (\&.) or an equals sign (=)\&.
|
||||
|
||||
For example: \f3*\fR or \f3-Dmydir\&.*\fR or \f3-Da\&.b\&.c=*\fR is valid, but \f3*mydir\fR or \f3-Da*b\fR or \f3ab*\fR is not\&.
|
||||
|
||||
\fIPolicy file for rmid\fR
|
||||
|
||||
When you grant the \f3rmid\fR command permission to execute various commands and options, the permissions \f3ExecPermission\fR and \f3ExecOptionPermission\fR must be granted to all code sources (universally)\&. It is safe to grant these permissions universally because only the \f3rmid\fR command checks these permissions\&.
|
||||
|
||||
An example policy file that grants various execute permissions to the \f3rmid\fR command is:
|
||||
.sp
|
||||
.nf
|
||||
\f3grant {\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "/files/apps/java/jdk1\&.7\&.0/solaris/bin/java";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "/files/apps/rmidcmds/*";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "\-Djava\&.security\&.policy=/files/policies/group\&.policy";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "\-Djava\&.security\&.debug=*";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 permission com\&.sun\&.rmi\&.rmid\&.ExecOptionPermission\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 "\-Dsun\&.rmi\&.*";\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3};\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
The first permission granted allows the \f3rmid\fR tcommand o execute the 1\&.7\&.0 release of the \f3java\fR command, specified by its explicit path name\&. By default, the version of the \f3java\fR command found in \f3java\&.home\fR is used (the same one that the \f3rmid\fR command uses), and does not need to be specified in the policy file\&. The second permission allows the \f3rmid\fR command to execute any command in the directory \f3/files/apps/rmidcmds\fR\&.
|
||||
|
||||
The third permission granted, an \f3ExecOptionPermission\fR, allows the \f3rmid\fR command to start an activation group that defines the security policy file to be \f3/files/policies/group\&.policy\fR\&. The next permission allows the \f3java\&.security\&.debug property\fR to be used by an activation group\&. The last permission allows any property in the \f3sun\&.rmi property\fR name hierarchy to be used by activation groups\&.
|
||||
|
||||
To start the \f3rmid\fR command with a policy file, the \f3java\&.security\&.policy\fR property needs to be specified on the \f3rmid\fR command line, for example:
|
||||
|
||||
\f3rmid -J-Djava\&.security\&.policy=rmid\&.policy\fR\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
<policyClassName>
|
||||
|
||||
If the default behavior is not flexible enough, then an administrator can provide, when starting the \f3rmid\fR command, the name of a class whose \f3checkExecCommand\fR method is executed to check commands to be executed by the \f3rmid\fR command\&.
|
||||
|
||||
The \f3policyClassName\fR specifies a public class with a public, no-argument constructor and an implementation of the following \f3checkExecCommand\fR method:
|
||||
.sp
|
||||
.nf
|
||||
\f3 public void checkExecCommand(ActivationGroupDesc desc, String[] command)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 throws SecurityException;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
|
||||
Before starting an activation group, the \f3rmid\fR command calls the policy\&'s \f3checkExecCommand\fR method and passes to it the activation group descriptor and an array that contains the complete command to start the activation group\&. If the \f3checkExecCommand\fR throws a \f3SecurityException\fR, then the \f3rmid\fR command does not start the activation group and an \f3ActivationException\fR is thrown to the caller attempting to activate the object\&.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
none
|
||||
|
||||
If the \f3sun\&.rmi\&.activation\&.execPolicy\fR property value is \f3none\fR, then the \f3rmid\fR command does not perform any validation of commands to start activation groups\&.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
-log \fIdir\fR
|
||||
.br
|
||||
Specifies the name of the directory the activation system daemon uses to write its database and associated information\&. The log directory defaults to creating a log, in the directory in which the \f3rmid\fR command was executed\&.
|
||||
.TP
|
||||
-port \fIport\fR
|
||||
.br
|
||||
Specifies the port the registry uses\&. The activation system daemon binds the \f3ActivationSystem\fR, with the name \f3java\&.rmi\&.activation\&.ActivationSystem\fR, in this registry\&. The \f3ActivationSystem\fR on the local machine can be obtained using the following \f3Naming\&.lookup\fR method call:
|
||||
.sp
|
||||
.nf
|
||||
\f3import java\&.rmi\&.*; \fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 import java\&.rmi\&.activation\&.*;\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 ActivationSystem system; system = (ActivationSystem)\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3 Naming\&.lookup("//:port/java\&.rmi\&.activation\&.ActivationSystem");\fP
|
||||
.fi
|
||||
.nf
|
||||
\f3\fP
|
||||
.fi
|
||||
.sp
|
||||
|
||||
.TP
|
||||
-stop
|
||||
.br
|
||||
Stops the current invocation of the \f3rmid\fR command for a port specified by the \f3-port\fR option\&. If no port is specified, then this option stops the \f3rmid\fR invocation running on port 1098\&.
|
||||
.SH ENVIRONMENT\ VARIABLES
|
||||
.TP
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user-defined classes\&. Directories are separated by colons, for example: \f3\&.:/usr/local/java/classes\fR\&.
|
||||
.SH SEE\ ALSO
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
java(1)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Setting the Class Path
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user