Below is a python script that executes a linux bash command "echo Hello World > ./output"

```py
import os

os.system("bash -c \"echo Hello World > ./output\"");

```

I am trying to do the same with Java. Below is my best effort, following the instructions I found here: [Want to invoke a linux shell command from Java](https://stackoverflow.com/questions/1410741/want-to-invoke-a-linux-shell-command-from-java)

```java
import java.io.IOException;

public class callCommand {
    public static void main(String[] args) {
        try {
            Process p = Runtime.getRuntime().exec(
                new String[]{"bash","-c",
                "\"echo Hello World > ./output\""});
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
}

```

It compiles without issue, and runs without complaint, but no output file is generated.