Here is some basic Unix info. Not many "El Capitan"-specific details are provided, but they should not be needed to get things to work. (I understand that an upgrade to "El Capitan" broke things. Perhaps it changed what is in your path, or altered some permissions. Following are details on how to make things work.
In DOS, a batch file is a text file that ends with ".BAT" (case-insensitive, so ".bat" would also work). Microsoft Windows follows the DOS tradition. Each line in the batch file is a command to be run from the command interpreter.
In Unix, including Mac OS X, a proper "shell script" file should have a proper header, and have proper permissions. Then, after the header, each line in the batch file is a command to be run from the command interpreter.
Notice that those descriptions are mostly the same. Mainly, most of the script file is just a list of commands to run. Commands which are the same between DOS and Unix, like "cd ..", or the names of executable files within the PATH, may work equally well with both types of files.
If you had a Unix script file that said:
#!/bin/sh
@Echo Off
echo hello
cd .
more < readme.txt
Then the first line of the file would cause a harmless error in DOS/Windows, the second line of the file would cause a harmelss error message in Unix, and the rest of the file could work identically in both environments.
Whether this will actually work well for you, or not, may largely depend on what commands you use. For instance, "cd bin
" can work well with both environments, but DOS/Windows use a backslash as a directory separator while Unix uses a forward slash. So some commands may not work well.
The best way for us to predict how well your particular batch file would work well, or not, is if we knew the contents of the batch file. Hence why barlop's comment asked about the contents of the batch file.
Regarding your question (from one of your comments) on which extension to use: In DOS/Windows, the answer is ".BAT" (any amount of lowercase is fine, so ".bat" is okay too.) In Unix, the most common standards are "none" (no extension), or ".sh
". However, in Unix, the extension really doesn't matter significantly. What matters is whether the file has the necessary permissions, and possibly whether it starts with the appropriate header. So make sure those things are right. (The header is the first line shown in my prior sample. The permissions can be set using "chmod a+x filename.bat
" but, of course, specify the actual location of the filename.) When you run the file in Unix, make sure to specify the entire filename of the script file, including the ".bat" extension. (If you don't like doing that, simply make a symlink, having a symlink named "gonow" point to "gonow.bat" (or whatever is approrpriate).
The other way to do this in Unix is to run the .BAT file from within another piece of software which is DOS-like. e.g., COMMAND.COM within Wine, or perhaps CMD.EXE within WINE, or other Wine variants like Crossover, or other software like DOSBox or DOSemu. If you do so use this software that is designed to work quite like DOS, then that software may be able to run the file without requiring that you specify the ".bat" extension.
Another alternative may be to simply use a Shell Script file that runs Java (since the contents of the batch file, mentioned elsewhere, show Java being run), and ignore trying to use a file that ends with the ".bat" extension. (So it wouldn't be a .bat file, but would be a shell script or a symbolic link.)