title: Why does SBT not detect main class in Java? (No main class detected)
body: <p>SBT will complile, but not run this very simple project.  Why not?</p>
  
  <pre><code>mackler@localhost:~/tmp/javahello$ sbt --version                                                                       
  sbt launcher version 0.12.1                                                                                            
  mackler@localhost:~/tmp/javahello$ find .                                                                              
  .                                                                                                                      
  ./src                                                                                                                  
  ./src/main                                                                                                             
  ./src/main/java                                                                                                        
  ./src/main/java/learn                                                                                                  
  ./src/main/java/learn/HelloWorld.java                                                                                  
  mackler@localhost:~/tmp/javahello$ cat src/main/java/learn/HelloWorld.java                                             
  package learn;                                                                                                         
  
  class HelloWorld {                                                                                                     
      public static void main(String[] args) {                                                                           
          System.out.println("Hello, world");                                                                            
      }                                                                                                                  
  }                                                                                                                      
  mackler@localhost:~/tmp/learn/javahello$ sbt run                                                                       
  [info] Set current project to default-1004d5 (in build file:/home/mackler/tmp/javahello/)                              
  [info] Updating {file:/home/mackler/tmp/javahello/}default-1004d5...                                                   
  [info] Resolving org.scala-lang#scala-library;2.9.2 ...                                                                
  [info] Done updating.                                                                                                  
  [info] Compiling 1 Java source to /home/mackler/tmp/javahello/target/scala-2.9.2/classes...                            
  java.lang.RuntimeException: No main class detected.                                                                    
  at scala.sys.package$.error(package.scala:27)                                                                          
  [trace] Stack trace suppressed: run last compile:run for the full output.                                              
  [error] (compile:run) No main class detected.                                                                          
  [error] Total time: 4 s, completed Sep 22, 2013 4:14:21 PM                                                             
  mackler@localhost:~/tmp/javahello$                                  
  </code></pre>