How do I write a bash script to run a java file that imports maven dependices?

How do I create a bash script that runs this file This is the github file I have tried to run javac -d . App.java but that doesn’t work because it imports different libraries. This is the error I get when I try to run the file. How do I write a bash script that runs this file when excuted or is there a command that I can use to run a java program that has import statments?

App.java:17: error: unclosed string literal
        menu = """
                 ^
App.java:18: error: ';' expected
                                Application Menu
                                                ^
App.java:20: error: ';' expected
                1. Type one to decrypt a file.
                           ^
App.java:20: error: ';' expected
                1. Type one to decrypt a file.
                                      ^
App.java:20: error: ';' expected
                1. Type one to decrypt a file.
                                             ^
App.java:21: error: ';' expected
                2. Type two to encrypt a file.
                           ^
App.java:21: error: ';' expected
                2. Type two to encrypt a file.
                                      ^
App.java:21: error: ';' expected
                2. Type two to encrypt a file.
                                             ^
App.java:22: error: ';' expected
                3. Type three to encrypt text from terminal
                             ^
App.java:22: error: ';' expected
                3. Type three to encrypt text from terminal
                                        ^
App.java:22: error: ';' expected
                3. Type three to encrypt text from terminal
                                                  ^
App.java:22: error: not a statement
                3. Type three to encrypt text from terminal
                                                   ^
App.java:22: error: ';' expected
                3. Type three to encrypt text from terminal
                                                           ^
App.java:23: error: ';' expected
                4. Type four to decrypt text from terminal.
                            ^
App.java:23: error: ';' expected
                4. Type four to decrypt text from terminal.
                                       ^
App.java:23: error: ';' expected
                4. Type four to decrypt text from terminal.
                                                 ^
App.java:23: error: <identifier> expected
                4. Type four to decrypt text from terminal.
                                                           ^
App.java:23: error: not a statement
                4. Type four to decrypt text from terminal.
                                                          ^
App.java:24: error: ';' expected
                5. Type five to exit. 
                            ^
App.java:24: error: ';' expected
                5. Type five to exit. 
                                    ^
App.java:25: error: not a statement
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                   ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                             ^
App.java:25: error: '(' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                ^
App.java:25: error: ')' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                    ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                             ^
App.java:25: error: variable declaration not allowed here
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                          ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                    ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                             ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                                    ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                                             ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                                                        ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                                                                     ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                                                                            ^
App.java:25: error: ';' expected
                *  Disclaimer if you pick one or two the path of the file you enter will be rewritten as the encrypted version.
                                                                                                                              ^
App.java:26: error: ';' expected
                Pick an option. """;
                       ^
App.java:26: error: <identifier> expected
                Pick an option. """;
                               ^
App.java:26: error: not a statement
                Pick an option. """;
                              ^
App.java:26: error: unclosed string literal
                Pick an option. """;
                                  ^
38 errors

Github Full Repo

Edit: This is another error I am running into can someone telll me how to fix it? Thanks!

import methods.mainPackage;
              ^
App.java:13: error: cannot find symbol
        mainPackage p = new mainPackage();
        ^
  symbol:   class mainPackage
  location: class App
App.java:13: error: cannot find symbol
        mainPackage p = new mainPackage();
                            ^
  symbol:   class mainPackage
  location: class App
3 errors

Answer

You’re using a version of Java that does not support String litterals.

Use java --version to figure which one and make sure it is at least version 13