Question: I have to write two scripts, one to compile my code and another one to run it. I manage to compile the code with this script:

```
#!/bin/bash
javac SimilaridadeP.java

```

And I was able to run it using this script:

```
#!/bin/bash
java SimilaridadeP

```

The problem is that I need to execute my second shell script following this command:

```
./execute.sh input output

```

Where input and output are the names of the files that I am going to use in my Java code. The problem that I am facing right now is that I don't know how I can use these both names in my Java code.

So far I managed to get both names using this code:

```
#!/bin/bash
in=$1
out=$2
java SimilaridadeP

```

But since "SimilaridadeP" is the name of my java file and it can't be called like a method with parameters I am kind of lost.

Answer: 
If your java code is already reading the command-line parameters, it's just a matter of changing the bash this way:

```
#!/bin/bash
java SimilaridadeP "$1" "$2"

```
This works with arbitrary number of arguments:

```
#!/bin/bash
java SimilaridadeP "$@"

```