To use the visualizer for testing your solution locally, you'll have to adopt your solution to read the parameters from standard in and write the output to standard out. This doesn't affect the functioning of the solution you submit to our server.

To do this, you should implement the following pseudocode:
    int addMed(x, y) {
        printLine("ADDMED")
        printLine(x + " " + y)
        flush(stdout)
        return int(readLine())
    }

    String[] observe() {
        printLine("OBSERVE")
        flush(stdout)
        H = int(readLine())
        for (i=0; i<H; i++)
            slide[i] = readLine()
        return slide
    }

    int waitTime(units) {
        printLine("WAITTIME")
        printLine(units)
        flush(stdout)
        return int(readLine())
    }
    
    
    main() {
        H = int(readLine())
        for (i=0; i<H; i++)
            slide[i] = readLine()
        medStrength = int(readLine())
        killTime = int(readLine())
        spreadProb = double(readLine())

        runSim(slide, medStrength, killTime, spreadProb)
        printLine("END")
        flush(stdout)
    }
To run the visualizer with your solution, you should run:
java ViralInfectionVis -exec "<command>" -seed <seed>
Here, <command> is the command to execute your program, and <seed> is seed for test case generation. Additionally you can use the following options:

Finally, you can print any debug information of your solution to standard error, and it will be forwarded to the standard out of the visualizer.

For more information on using visualizers, please check the following recipe draft from TopCoder Cookbook (a Google Doc copy available here). Note that this is not a troubleshooting thread, please use the match forum for questions instead.