public class Main{
  public static void main(String[] args){
    System.out.println("Hello World");
  }
}

@@ -1,12 +1,525 @@
+import static javax.measure.unit.SI.KILOGRAM;%0Aimport javax.measure.quantity.Mass;%0Aimport org.jscience.physics.model.RelativisticModel;%0Aimport org.jscience.physics.amount.Amount;%0A%0Aimport java.sql.*;%0Aimport java.util.HashMap;%0Aimport java.util.ArrayList;%0Aimport java.util.Map;%0A%0Aimport java.net.URI;%0Aimport java.net.URISyntaxException;%0A%0Aimport static spark.Spark.*;%0Aimport spark.template.freemarker.FreeMarkerEngine;%0Aimport spark.ModelAndView;%0Aimport static spark.Spark.get;%0A%0Aimport com.heroku.sdk.jdbc.DatabaseUrl;%0A%0A
 public class
@@ -523,17 +523,19 @@
 ass Main
-%7B
+ %7B%0A
 %0A  publi
@@ -571,33 +571,424 @@
 rgs)
-%7B
+ %7B%0A
 %0A    
-System.out.println(
+port(Integer.valueOf(System.getenv(%22PORT%22)));%0A    staticFileLocation(%22/public%22);%0A%0A    get(%22/hello%22, (req, res) -%3E %7B%0A      RelativisticModel.select();%0A      Amount%3CMass%3E m = Amount.valueOf(%2212 GeV%22).to(KILOGRAM);%0A      return %22E=mc%5E2: 12 GeV = %22 + m.toString();%0A    %7D);%0A%0A    get(%22/%22, (request, response) -%3E %7B%0A            Map%3CString, Object%3E attributes = new HashMap%3C%3E();%0A            attributes.put(%22message%22, 
 %22Hel
@@ -999,14 +999,1136 @@
 orld
+!
 %22);%0A
-  %7D
+%0A            return new ModelAndView(attributes, %22index.ftl%22);%0A        %7D, new FreeMarkerEngine());%0A%0A    get(%22/db%22, (req, res) -%3E %7B%0A      Connection connection = null;%0A      Map%3CString, Object%3E attributes = new HashMap%3C%3E();%0A      try %7B%0A        connection = DatabaseUrl.extract().getConnection();%0A%0A        Statement stmt = connection.createStatement();%0A        stmt.executeUpdate(%22CREATE TABLE IF NOT EXISTS ticks (tick timestamp)%22);%0A        stmt.executeUpdate(%22INSERT INTO ticks VALUES (now())%22);%0A        ResultSet rs = stmt.executeQuery(%22SELECT tick FROM ticks%22);%0A%0A        ArrayList%3CString%3E output = new ArrayList%3CString%3E();%0A        while (rs.next()) %7B%0A          output.add( %22Read from DB: %22 + rs.getTimestamp(%22tick%22));%0A        %7D%0A%0A        attributes.put(%22results%22, output);%0A        return new ModelAndView(attributes, %22db.ftl%22);%0A      %7D catch (Exception e) %7B%0A        attributes.put(%22message%22, %22There was an error: %22 + e);%0A        return new ModelAndView(attributes, %22error.ftl%22);%0A      %7D finally %7B%0A        if (connection != null) try%7Bconnection.close();%7D catch(SQLException e)%7B%7D%0A      %7D%0A    %7D, new FreeMarkerEngine());%0A%0A  %7D%0A
 %0A%7D%0A

Update Main.java