public boolean run() {

        int i;
        
        ok = false;
        stdout.clear();
        stderr.clear();
        
        try {	
            String   line;
            String[] cmd  = command.split(" ");
            ProcessBuilder pb= new ProcessBuilder(cmd);
            pb.redirectErrorStream(true);
            Process p = pb.start();
            
            if (stdin.size() > 0) {
                BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
                for (i = 0; i < stdin.size(); i++) {
                    writer.write(stdin.get(i));
                    writer.newLine();
                    writer.flush();
                }
                writer.close();
            }
            
            BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
            while((line=reader.readLine()) != null) {
                if (line.startsWith("gpg:")) {
                    stderr.add(line);
                }
                else {
                    stdout.add(line);
                }
            }
            reader.close();
            
            int exitCode = p.waitFor();
            ok = (exitCode == 0) ? true : false;
        }
        catch(Exception e1) {
            stderr.add(e1.getMessage());
        }
	
        return ok;
    }