title: ANTLR Warning: TestRig moved to org.antlr.v4.gui.TestRig
body: <p>I have been trying to get ANTLR to work all day. I have used several websites including antlr.org, numerous StackOverflow queries and the textbook by Terence Parr. I am on a Windows 7 machine (work machine, can't change to Linux) but I have tried this on both CommandPrompt and Cygwin, with the same result.</p>
  
  <p>No matter what I do, when it comes time to use the grun file, I always come up with the same error in the end: </p>
  
  <blockquote>
    <p>Warning: TestRig moved to org.antlr.v4.gui.TestRig; calling automatically
    Can't load Hello as lexer or parser</p>
  </blockquote>
  
  <p>I have the most recent versions of the JRE and JDK on my computer, as well as the most recent version of cygwin.</p>
  
  <p>I can run the batch files for grun and antlr4 from anywhere, so I'm strongly guessing my path is set correctly. I can run antlr4.bat with absolutely no issue. It creates every file the text book says I should see:</p>
  
  <p><code>Hello.g4      HelloBaseListener.java  HelloLexer.tokens   HelloParser.java        Hello.tokens  HelloLexer.java         HelloListener.java</code></p>
  
  <p>I can run javac on those files and it generates various CLASS files:</p>
  
  <p><code>HelloBaseListener.class   HelloLexer.class   HelloListener.class   HelloParser$RContext.class   HelloParser.class</code></p>
  
  <p>But then, when I try to run grun on it, I get this:</p>
  
  <blockquote>
    <p>Warning: TestRig moved to org.antlr.v4.gui.TestRig; calling automatically
    Can't load Hello as lexer or parser</p>
  </blockquote>
  
  <p>I've tried several combinations of commands to use the grun file, but the one it says to use in the book is:</p>
  
  <pre><code>grun.bat Hello r -tree
  </code></pre>
  
  <p>I've also changed the .bat file with grun several times, just to experiment, using different combinations in the books and on the sites, but I always come back to this:</p>
  
  <pre><code>java org.antlr.v4.runtime.misc.TestRig %*
  </code></pre>
  
  <p>That is what my boss told me to use, and it works for him.</p>