FileDocCategorySizeDatePackage
NativeUtils.javaAPI DocGlassfish v2 API3292Fri May 04 22:32:16 BST 2007com.sun.enterprise.util.natives

NativeUtils

public class NativeUtils extends Object
This class is the place to put any utility functions called in native code.
author
bnevins

Fields Summary
Constructors Summary
Methods Summary
public static java.lang.StringgetPassword(java.lang.String prompt)
Convenience method. Print the prompt and then get the user's input

param
prompt Prompt string to display on stdout
return
The String the user types in

        System.loadLibrary("cliutil");
    
        if(prompt != null && prompt.length() > 0)
            System.out.print(prompt);
        
        return getPassword();
    
public static java.lang.StringgetPassword()
Get the user's input

return
The String the user types in

        return new NativeUtils().getPasswordNative();
    
public native java.lang.StringgetPasswordNative()
native function to get a String from stdin without echoing the characters. Note that the native code will be derprecated once JDK 1.6 is required.

return
The String the user types in