public void run() {
    	if(count==0){
    	count++;
    	try {
            String line;
            BufferedReader input = new BufferedReader(new InputStreamReader(process.getInputStream()));
		    while ((line = input.readLine()) != null) {
		    System.out.println(line);
			}
		    input.close();
		    if(!ConsoleFrame.ConsoleFrame.isVisible()){
	        	System.exit(0);
	        }
			} catch (IOException e) {
                 e.printStackTrace();
			}
    	    
    		
    	} else {
    	try {
    		String line;
            BufferedReader input = new BufferedReader(new InputStreamReader(process.getErrorStream()));
		    while ((line = input.readLine()) != null) {
		    System.out.println(line);
		    
			}
		    input.close();
		    if(!ConsoleFrame.ConsoleFrame.isVisible()){
	        	System.exit(0);
	        }
			} catch (IOException e) {
                 e.printStackTrace();
			}
    	}
    }