import java.io.*;
import java.util.*;
import org.apache.commons.io.IOUtils;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
import com.dnanexus.*;

public class DXHelloWorld {
    public static void main(String[] args) throws Exception {
        System.out.println("This is the DNAnexus Java Demo App");

        String JobInput = IOUtils.toString(new FileInputStream("job_input.json"));
        JsonNode JobInputJson = (JsonNode)(new MappingJsonFactory().createJsonParser(JobInput).readValueAsTree());
        JsonNode Name = JobInputJson.get("name");

        Map<String,Object> JobOutput = new HashMap<String,Object>();
        JobOutput.put("greeting", "Hello, " + (Name == null ? "World" : Name) + "!");

        ObjectMapper mapper = new ObjectMapper();
        mapper.writeValue(new File("job_output.json"), JobOutput);
    }
}

@@ -15,28 +15,8 @@
 .*;%0A
-import java.util.*;%0A
 impo
@@ -82,12 +82,16 @@
 son.
-core
+databind
 .*;%0A
@@ -120,32 +120,37 @@
 ackson.databind.
+node.
 *;%0Aimport com.dn
@@ -436,19 +436,8 @@
 n = 
-(JsonNode)(
 new 
@@ -501,17 +501,16 @@
 AsTree()
-)
 ;%0A      
@@ -562,34 +562,76 @@
         
-Map%3CString,
+ObjectMapper mapper = new ObjectMapper();%0A        
 Object
-%3E
+Node
  JobOutp
@@ -639,34 +639,31 @@
 t = 
-new HashMap%3CString,
+mapper.create
 Object
-%3E
+Node
 ();%0A
@@ -751,59 +751,8 @@
 !%22);
-%0A%0A        ObjectMapper mapper = new ObjectMapper();
 %0A   

simplify Java example a bit