[](https://github.com/JavaBWAPI/JBWAPI/actions/workflows/maven.yml)
[](https://github.com/JavaBWAPI/JBWAPI/actions/workflows/codeql.yml)
# JBWAPI
Pure Java [bwapi](https://github.com/bwapi/bwapi) 4.4.0 client implementation backed by
[N00byEdge](https://github.com/N00byEdge)'s [JavaBWAPIBackend](https://github.com/N00byEdge/JavaBWAPIBackend) idea and
automated by [Bytekeeper](https://github.com/Bytekeeper).
Also contains a modified version of the pure Java BWEM implementation from [BWAPI4J](https://github.com/OpenBW/BWAPI4J).
## Goals
- Have a similar (Java) interface to BWMirror to make porting BWMirror bots easy without all the DLL and JNI hassle and
overhead.
- Stay as updated as possible with the BWAPI releases.
## Advantages
- No dependency on external DLL's.
- At least [5x](https://github.com/JavaBWAPI/JBWAPI/issues/17) faster compared to BWMirror for primitives as it
directly reads the memory mapped client file. Even faster for BWAPI objects as it also avoids marshalling.
- Supports both 32-and 64-bit Java (e.g. [deeplearning4j](https://deeplearning4j.org/) requires 64-bit Java which
BWMirror doesn't support).
- BWEM instead of BWTA as map analyser.
- Supports Linux "natively" using [openbw](https://github.com/JavaBWAPI/JBWAPI/pull/73), made possible by
[ByteKeeper](https://github.com/Bytekeeper).
- `Async` support for realtime tournament constraints, made possible by [dgant](https://github.com/dgant).
## Warnings
- A fake BWTA is provided for an easier transition from BWMirror. However, it translates BWTA calls to their respective
BWEM calls, so specific Regions/Chokepoints etc. may differ.
## Usage
### Maven
Add JitPack as a repository:
```