I’m having some problems with some commands in Java. I created a JAR that needs another JARs to run my app. I had created a batch file to run it with just a click:
java -cp Projecto.jar;.\jcommon-1.0.17.jar;.\jfreechart-1.0.14.jar Geral.Client
pause
How can I modify this to make a runable for Linux and Mac OS? Because the command:
java -cp Projecto.jar;.\jcommon-1.0.17.jar;.\jfreechart-1.0.14.jar Geral.Client
as far as I tried does not work in Linux.
The path separator in Unix based operating systems is colon
:, not semicolon;. Also the file separator in Unix based operating systems is forwardslash/, not backwardslash\.So this should do: