Your comments

Okay, fixed the problem.

For those who are having the same problem.

Open ubooquity.sh with notebook++

edit

EOL Conversion

Select Linux

Additionally, JAVA_DIR is case sensitive for some reason. java8 to Java8

it is now running.