I figured I'd have to rename the file I downloaded to bfg.jar. I'm following the instructions, and when I try to use bfg I get an error.
$ java -jar bfg.jar
Error: Unable to access jarfile bfg.jar
I guess this may be more of a Git Bash question than a bfg question, but where do I put bfg.jar to make it accessible to Java? It works if it's in my project's working directory but since bfg isn't specific to my project I'd like it in a more global location.
I'm using Windows 10 64-bit.
Just put it anywhere you like and provide the full path to it in the command line.
There's no special jar path like there is for executables so that you don't have to type it all out?
No. The BFG docs suggest creating an alias (or wrapper-script) bfg which can hide the location of bfg.jar.
Thanks.
The simple way to create alias that work for me is to make a new folder named C:\Aliases.
Put bfg.jar in there.
Create a batch file bfg.bat.
Inside the file, you paste this content:
@echo off
echo.
java -jar %~dp0\bfg.jar %*
Make sure you add C:\Aliases to PATH environment variable.
Then you can call bfg inside command prompt.
https://gist.github.com/off99555/d6a4ee85314971ef6cc9f4f8d9414d07
Most helpful comment
The simple way to create alias that work for me is to make a new folder named
C:\Aliases.Put
bfg.jarin there.Create a batch file
bfg.bat.Inside the file, you paste this content:
Make sure you add
C:\Aliasesto PATH environment variable.Then you can call
bfginside command prompt.https://gist.github.com/off99555/d6a4ee85314971ef6cc9f4f8d9414d07