I need to write a bash script to compile my java program. I know it's a bit artificial but it is homework. (although I'm not sure the bash script is even marked, just used for the automated marking system)
I only have one java file test.java and the script is to only search its own directory: I tried:
#!/bin/bash
javac test.java
and saved as build.sh, i tried to run this from the terminal as both sh build.sh and bash build.sh both gave me errors. Can anyone offer any help?
included errors:
build.sh: line 1: {rtf1ansiansicpg1252cocoartf1038cocoasubrtf350: command not found
build.sh: line 2: syntax error near unexpected token `}'
build.sh: line 2: `{\fonttbl\f0\fmodern\fcharset0 Courier;\f1\fswiss\fcharset0 Helvetica;}'
chmod u+xit? If so,./build.shshould be enough.