Question: I am new to Java (as of today!) and am trying to run a very simple program in terminal. Normally, when I run a python (still pretty new) program in Terminal I would simple type in "python name.py" in to terminal and it would run. When I type "Java name.java" it does absolutely nothing.

I opened TextWrangler and selected "Run in Terminal" and it returned this error:

"This file doesn't appear to contain a valid 'shebang' line (application error code: 13304)"

My program is named "hello.java" and it contains the code below.

What am I doing wrong?

```
System.out.println("Hello!");

```

Answer: 
Open the terminal, go to the directory where the file is located and do this:

```
javac -classpath . name.java // compile the code
java name                    // run the program

```

Of course, both `javac` and `java` must be available in the operating system's PATH variable, but in a Mac that's already configured.
*"Run in terminal"* attempts to run the software as an interpreted script. On UNIX-like systems (meaning almost everything except Windows), a *shebang* line is used to indicate, what interpreter is to be used. It consists of the characters `#!` followed by the command to invoke the interpreter (e.g. `#!/usr/bin/python` or `#!/usr/bin/ruby`). However, Java is not (only) interpreted.

`java` only runs *compiled Java bytecode*, so it does not work on source files

Instead, head over to the terminal yourself, compile the code with `javac` and run the resulting bytecode (the `.class` files) with `java`:

```
javac the_file_name.java
java the_class_name

```

where `the_file_name.java` is the file containing `main(...)` and `the_class_name` is the name of the class containing `main(...)` (this should usually be the same as `the_file_name`)