1*3c7ae9deSAndroid Build Coastguard Worker## AWS CRT Java 2*3c7ae9deSAndroid Build Coastguard Worker 3*3c7ae9deSAndroid Build Coastguard WorkerJava Bindings for the AWS Common Runtime 4*3c7ae9deSAndroid Build Coastguard Worker 5*3c7ae9deSAndroid Build Coastguard Worker## License 6*3c7ae9deSAndroid Build Coastguard Worker 7*3c7ae9deSAndroid Build Coastguard WorkerThis library is licensed under the Apache 2.0 License. 8*3c7ae9deSAndroid Build Coastguard Worker 9*3c7ae9deSAndroid Build Coastguard Worker*__Jump To:__* 10*3c7ae9deSAndroid Build Coastguard Worker 11*3c7ae9deSAndroid Build Coastguard Worker* [Platform Specific Building](#platform) 12*3c7ae9deSAndroid Build Coastguard Worker * [Linux/Unix](#linuxunix) 13*3c7ae9deSAndroid Build Coastguard Worker * [OSX](#osx) 14*3c7ae9deSAndroid Build Coastguard Worker * [Windows](#windows) 15*3c7ae9deSAndroid Build Coastguard Worker * [Android](./android/ANDROID.md) 16*3c7ae9deSAndroid Build Coastguard Worker* [Java CRT Documentation](https://awslabs.github.io/aws-crt-java/) 17*3c7ae9deSAndroid Build Coastguard Worker* [Installing](#installing) 18*3c7ae9deSAndroid Build Coastguard Worker* [Platform-Specific JARs](#platform-specific-jars) 19*3c7ae9deSAndroid Build Coastguard Worker* [System Properties](#system-properties) 20*3c7ae9deSAndroid Build Coastguard Worker* [TLS Behavior](#tls-behavior) 21*3c7ae9deSAndroid Build Coastguard Worker* [Testing](#testing) 22*3c7ae9deSAndroid Build Coastguard Worker* [IDEs](#ides) 23*3c7ae9deSAndroid Build Coastguard Worker* [Debugging](#debugging) 24*3c7ae9deSAndroid Build Coastguard Worker 25*3c7ae9deSAndroid Build Coastguard Worker 26*3c7ae9deSAndroid Build Coastguard Worker## Platform 27*3c7ae9deSAndroid Build Coastguard Worker 28*3c7ae9deSAndroid Build Coastguard Worker### Linux/Unix 29*3c7ae9deSAndroid Build Coastguard WorkerRequirements: 30*3c7ae9deSAndroid Build Coastguard Worker* Clang 3.9+ or GCC 4.4+ 31*3c7ae9deSAndroid Build Coastguard Worker* cmake 3.1+ 32*3c7ae9deSAndroid Build Coastguard Worker* Java: Any JDK8 or above, ensure `JAVA_HOME` is set 33*3c7ae9deSAndroid Build Coastguard Worker* Maven 34*3c7ae9deSAndroid Build Coastguard Worker 35*3c7ae9deSAndroid Build Coastguard WorkerBuilding: 36*3c7ae9deSAndroid Build Coastguard Worker1) `apt-get install cmake3 maven openjdk-8-jdk-headless -y` 37*3c7ae9deSAndroid Build Coastguard Worker2) `git clone https://github.com/awslabs/aws-crt-java.git` 38*3c7ae9deSAndroid Build Coastguard Worker3) `cd aws-crt-java` 39*3c7ae9deSAndroid Build Coastguard Worker4) `git submodule update --init --recursive` 40*3c7ae9deSAndroid Build Coastguard Worker5) `mvn compile` 41*3c7ae9deSAndroid Build Coastguard Worker 42*3c7ae9deSAndroid Build Coastguard Worker### OSX 43*3c7ae9deSAndroid Build Coastguard WorkerRequirements: 44*3c7ae9deSAndroid Build Coastguard Worker* cmake 3.1 45*3c7ae9deSAndroid Build Coastguard Worker* ninja 46*3c7ae9deSAndroid Build Coastguard Worker* Java: Any JDK8 or above, ensure `JAVA_HOME` is set 47*3c7ae9deSAndroid Build Coastguard Worker* Maven 48*3c7ae9deSAndroid Build Coastguard Worker 49*3c7ae9deSAndroid Build Coastguard WorkerBuilding: 50*3c7ae9deSAndroid Build Coastguard Worker1) `brew install maven cmake` (if you have homebrew installed, otherwise install these manually) 51*3c7ae9deSAndroid Build Coastguard Worker2) `git clone https://github.com/awslabs/aws-crt-java.git` 52*3c7ae9deSAndroid Build Coastguard Worker3) `cd aws-crt-java` 53*3c7ae9deSAndroid Build Coastguard Worker4) `git submodule update --init --recursive` 54*3c7ae9deSAndroid Build Coastguard Worker5) `mvn compile` 55*3c7ae9deSAndroid Build Coastguard Worker 56*3c7ae9deSAndroid Build Coastguard Worker### Windows 57*3c7ae9deSAndroid Build Coastguard WorkerRequirements: 58*3c7ae9deSAndroid Build Coastguard Worker* Visual Studio 2015 or above 59*3c7ae9deSAndroid Build Coastguard Worker* CMake 3.1 60*3c7ae9deSAndroid Build Coastguard Worker* Java: Any JDK8 or above, ensure `JAVA_HOME` is set 61*3c7ae9deSAndroid Build Coastguard Worker* Maven 62*3c7ae9deSAndroid Build Coastguard Worker 63*3c7ae9deSAndroid Build Coastguard WorkerBuilding: 64*3c7ae9deSAndroid Build Coastguard Worker1) `choco install maven` (if you have chocolatey installed), otherwise install maven and the JDK manually 65*3c7ae9deSAndroid Build Coastguard Worker2) `git clone https://github.com/awslabs/aws-crt-java.git` 66*3c7ae9deSAndroid Build Coastguard Worker3) `cd aws-crt-java` 67*3c7ae9deSAndroid Build Coastguard Worker4) `git submodule update --init --recursive` 68*3c7ae9deSAndroid Build Coastguard Worker5) `mvn compile` 69*3c7ae9deSAndroid Build Coastguard Worker 70*3c7ae9deSAndroid Build Coastguard WorkerNOTE: Make sure you run this from a VS Command Prompt or have run `VCVARSALL.BAT` in your current shell so 71*3c7ae9deSAndroid Build Coastguard WorkerCMake can find Visual Studio. 72*3c7ae9deSAndroid Build Coastguard Worker 73*3c7ae9deSAndroid Build Coastguard Worker## Documentation 74*3c7ae9deSAndroid Build Coastguard Worker[Java CRT Documentation](https://awslabs.github.io/aws-crt-java/) 75*3c7ae9deSAndroid Build Coastguard Worker 76*3c7ae9deSAndroid Build Coastguard Worker## Installing 77*3c7ae9deSAndroid Build Coastguard WorkerFrom the aws-crt-java directory: 78*3c7ae9deSAndroid Build Coastguard Worker```mvn install``` 79*3c7ae9deSAndroid Build Coastguard WorkerFrom maven: (https://search.maven.org/artifact/software.amazon.awssdk.crt/aws-crt/) 80*3c7ae9deSAndroid Build Coastguard Worker 81*3c7ae9deSAndroid Build Coastguard Worker## Platform-Specific JARs 82*3c7ae9deSAndroid Build Coastguard Worker 83*3c7ae9deSAndroid Build Coastguard WorkerThe `aws-crt` JAR in Maven Central is a large "uber" jar that contains compiled C libraries for many different platforms (Windows, Linux, etc). If size is an issue, you can pick a smaller platform-specific JAR by setting the `<classifier>`. 84*3c7ae9deSAndroid Build Coastguard Worker 85*3c7ae9deSAndroid Build Coastguard Worker``` xml 86*3c7ae9deSAndroid Build Coastguard Worker <!-- Platform-specific Linux x86_64 JAR --> 87*3c7ae9deSAndroid Build Coastguard Worker <dependency> 88*3c7ae9deSAndroid Build Coastguard Worker <groupId>software.amazon.awssdk.crt</groupId> 89*3c7ae9deSAndroid Build Coastguard Worker <artifactId>aws-crt</artifactId> 90*3c7ae9deSAndroid Build Coastguard Worker <version>0.20.5</version> 91*3c7ae9deSAndroid Build Coastguard Worker <classifier>linux-x86_64</classifier> 92*3c7ae9deSAndroid Build Coastguard Worker </dependency> 93*3c7ae9deSAndroid Build Coastguard Worker``` 94*3c7ae9deSAndroid Build Coastguard Worker 95*3c7ae9deSAndroid Build Coastguard Worker``` xml 96*3c7ae9deSAndroid Build Coastguard Worker <!-- "Uber" JAR that works on all platforms --> 97*3c7ae9deSAndroid Build Coastguard Worker <dependency> 98*3c7ae9deSAndroid Build Coastguard Worker <groupId>software.amazon.awssdk.crt</groupId> 99*3c7ae9deSAndroid Build Coastguard Worker <artifactId>aws-crt</artifactId> 100*3c7ae9deSAndroid Build Coastguard Worker <version>0.20.5</version> 101*3c7ae9deSAndroid Build Coastguard Worker </dependency> 102*3c7ae9deSAndroid Build Coastguard Worker``` 103*3c7ae9deSAndroid Build Coastguard Worker 104*3c7ae9deSAndroid Build Coastguard Worker### Available platform classifiers 105*3c7ae9deSAndroid Build Coastguard Worker 106*3c7ae9deSAndroid Build Coastguard Worker- linux-armv6 (no auto-detect) 107*3c7ae9deSAndroid Build Coastguard Worker- linux-armv7 (no auto-detect) 108*3c7ae9deSAndroid Build Coastguard Worker- linux-aarch_64 109*3c7ae9deSAndroid Build Coastguard Worker- linux-x86_32 110*3c7ae9deSAndroid Build Coastguard Worker- linux-x86_64 111*3c7ae9deSAndroid Build Coastguard Worker- linux-x86_64-musl (no auto-detect) 112*3c7ae9deSAndroid Build Coastguard Worker- linux-armv7-musl (no auto-detect) 113*3c7ae9deSAndroid Build Coastguard Worker- linux-aarch_64-musl (no auto-detect) 114*3c7ae9deSAndroid Build Coastguard Worker- osx-aarch_64 115*3c7ae9deSAndroid Build Coastguard Worker- osx-x86_64 116*3c7ae9deSAndroid Build Coastguard Worker- windows-x86_32 117*3c7ae9deSAndroid Build Coastguard Worker- windows-x86_64 118*3c7ae9deSAndroid Build Coastguard Worker 119*3c7ae9deSAndroid Build Coastguard Worker### Auto-detect 120*3c7ae9deSAndroid Build Coastguard Worker 121*3c7ae9deSAndroid Build Coastguard WorkerThe [os-maven-plugin](https://github.com/trustin/os-maven-plugin) can automatically detect your platform's classifier at build time. 122*3c7ae9deSAndroid Build Coastguard Worker 123*3c7ae9deSAndroid Build Coastguard Worker**NOTES**: The auto-detected `linux-arm_32` platform classifier is not supported, you must specify `linux-armv6` or `linux-armv7`. 124*3c7ae9deSAndroid Build Coastguard WorkerAdditionally, musl vs glibc detection is not supported either. If you are deploying to a musl-based system and wish to use 125*3c7ae9deSAndroid Build Coastguard Workera classifier-based jar, you must specify the classifier name yourself. 126*3c7ae9deSAndroid Build Coastguard Worker 127*3c7ae9deSAndroid Build Coastguard Worker``` xml 128*3c7ae9deSAndroid Build Coastguard Worker<build> 129*3c7ae9deSAndroid Build Coastguard Worker <extensions> 130*3c7ae9deSAndroid Build Coastguard Worker <!-- Generate os.detected.classifier property --> 131*3c7ae9deSAndroid Build Coastguard Worker <extension> 132*3c7ae9deSAndroid Build Coastguard Worker <groupId>kr.motd.maven</groupId> 133*3c7ae9deSAndroid Build Coastguard Worker <artifactId>os-maven-plugin</artifactId> 134*3c7ae9deSAndroid Build Coastguard Worker <version>1.7.0</version> 135*3c7ae9deSAndroid Build Coastguard Worker </extension> 136*3c7ae9deSAndroid Build Coastguard Worker </extensions> 137*3c7ae9deSAndroid Build Coastguard Worker </build> 138*3c7ae9deSAndroid Build Coastguard Worker 139*3c7ae9deSAndroid Build Coastguard Worker <dependencies> 140*3c7ae9deSAndroid Build Coastguard Worker <dependency> 141*3c7ae9deSAndroid Build Coastguard Worker <groupId>software.amazon.awssdk.crt</groupId> 142*3c7ae9deSAndroid Build Coastguard Worker <artifactId>aws-crt</artifactId> 143*3c7ae9deSAndroid Build Coastguard Worker <version>0.20.5</version> 144*3c7ae9deSAndroid Build Coastguard Worker <classifier>${os.detected.classifier}</classifier> 145*3c7ae9deSAndroid Build Coastguard Worker </dependency> 146*3c7ae9deSAndroid Build Coastguard Worker <dependencies> 147*3c7ae9deSAndroid Build Coastguard Worker``` 148*3c7ae9deSAndroid Build Coastguard Worker 149*3c7ae9deSAndroid Build Coastguard Worker## System Properties 150*3c7ae9deSAndroid Build Coastguard Worker 151*3c7ae9deSAndroid Build Coastguard Worker- To enable logging, set `aws.crt.log.destination` or `aws.crt.log.level`: 152*3c7ae9deSAndroid Build Coastguard Worker - `aws.crt.log.level` - Log level. May be: "None", "Fatal", "Error", "Warn" (default), "Info", "Debug", "Trace". 153*3c7ae9deSAndroid Build Coastguard Worker - `aws.crt.log.destination` - Log destination. May be: "Stderr" (default), "Stdout", "File", "None". 154*3c7ae9deSAndroid Build Coastguard Worker - `aws.crt.log.filename` - File to use when `aws.crt.log.destination` is "File". 155*3c7ae9deSAndroid Build Coastguard Worker- `aws.crt.libc` - (Linux only) Set to "musl" or "glibc" if CRT cannot properly detect which to use. 156*3c7ae9deSAndroid Build Coastguard Worker- `aws.crt.lib.dir` - Set directory where CRT may extract its native library (by default, `java.io.tmpdir` is used) 157*3c7ae9deSAndroid Build Coastguard Worker- `aws.crt.memory.tracing` - May be: "0" (default, no tracing), "1" (track bytes), "2" (more detail). 158*3c7ae9deSAndroid Build Coastguard Worker Allows the CRT.nativeMemory() and CRT.dumpNativeMemory() functions to report native memory usage. 159*3c7ae9deSAndroid Build Coastguard Worker 160*3c7ae9deSAndroid Build Coastguard Worker## TLS Behavior 161*3c7ae9deSAndroid Build Coastguard Worker 162*3c7ae9deSAndroid Build Coastguard WorkerThe CRT uses native libraries for TLS, rather than Java's typical 163*3c7ae9deSAndroid Build Coastguard WorkerSecure Socket Extension (JSSE), KeyStore, and TrustStore. 164*3c7ae9deSAndroid Build Coastguard WorkerOn [Windows](https://learn.microsoft.com/en-us/windows/win32/security) and 165*3c7ae9deSAndroid Build Coastguard Worker[Apple](https://developer.apple.com/documentation/security) devices, 166*3c7ae9deSAndroid Build Coastguard Workerthe built-in OS libraries are used. 167*3c7ae9deSAndroid Build Coastguard WorkerOn Linux/Unix/etc [s2n-tls](https://github.com/aws/s2n-tls) is used. 168*3c7ae9deSAndroid Build Coastguard Worker 169*3c7ae9deSAndroid Build Coastguard WorkerIf you need to add certificates to the trust store, add them to your OS trust store. 170*3c7ae9deSAndroid Build Coastguard WorkerThe CRT does not use the Java TrustStore. For more customization options, see 171*3c7ae9deSAndroid Build Coastguard Worker[TlsContextOptions](https://awslabs.github.io/aws-crt-java/software/amazon/awssdk/crt/io/TlsContextOptions.html) and 172*3c7ae9deSAndroid Build Coastguard Worker[TlsConnectionOptions](https://awslabs.github.io/aws-crt-java/software/amazon/awssdk/crt/io/TlsConnectionOptions.html). 173*3c7ae9deSAndroid Build Coastguard Worker 174*3c7ae9deSAndroid Build Coastguard Worker### Mac-Only TLS Behavior 175*3c7ae9deSAndroid Build Coastguard Worker 176*3c7ae9deSAndroid Build Coastguard WorkerPlease note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v0.6.6, when a stored private key from the Keychain is used, the following will be logged at the "info" log level: 177*3c7ae9deSAndroid Build Coastguard Worker 178*3c7ae9deSAndroid Build Coastguard Worker``` 179*3c7ae9deSAndroid Build Coastguard Workerstatic: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided. 180*3c7ae9deSAndroid Build Coastguard Worker``` 181*3c7ae9deSAndroid Build Coastguard Worker 182*3c7ae9deSAndroid Build Coastguard Worker## Testing 183*3c7ae9deSAndroid Build Coastguard WorkerMany tests require environment variables to be set. These environment variables are translated at runtime to system properties for use by the tests. These tests will be quietly skipped if the properties they require are not set. 184*3c7ae9deSAndroid Build Coastguard Worker 185*3c7ae9deSAndroid Build Coastguard WorkerEnvironment variables can be set like so: 186*3c7ae9deSAndroid Build Coastguard Worker``` 187*3c7ae9deSAndroid Build Coastguard Workerexport ENV_VARIABLE_NAME="<variable value>" 188*3c7ae9deSAndroid Build Coastguard Worker``` 189*3c7ae9deSAndroid Build Coastguard WorkerMany tests require that you have [set up](https://console.aws.amazon.com/iot) an AWS IoT Thing. 190*3c7ae9deSAndroid Build Coastguard Worker 191*3c7ae9deSAndroid Build Coastguard WorkerPartial list of environment variables: 192*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_MQTT311_IOT_CORE_HOST`: AWS IoT service endpoint hostname for MQTT3 193*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_MQTT311_IOT_CORE_RSA_CERT`: Path to the IoT thing certificate for MQTT3 194*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_MQTT311_IOT_CORE_RSA_KEY`: Path to the IoT thing private key for MQTT3 195*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_MQTT311_IOT_CORE_ECC_CERT`: Path to the IoT thing with EC-based certificate for MQTT3 196*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_MQTT311_IOT_CORE_ECC_KEY`: Path to the IoT thing with ECC private key for MQTT3 (The ECC key file should only contains the ECC Private Key section to working on MacOS.) 197*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_MQTT311_ROOT_CA`: Path to the root certificate 198*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_HTTP_PROXY_HOST`: Hostname of proxy 199*3c7ae9deSAndroid Build Coastguard Worker- `AWS_TEST_HTTP_PROXY_PORT`: Port of proxy 200*3c7ae9deSAndroid Build Coastguard Worker- `NETWORK_TESTS_DISABLED`: Set this if tests are running in a constrained environment where network access is not guaranteed/allowed. 201*3c7ae9deSAndroid Build Coastguard Worker 202*3c7ae9deSAndroid Build Coastguard WorkerOther Environment Variables that can be set can be found in the `SetupTestProperties()` function in [CrtTestFixture.java](https://github.com/awslabs/aws-crt-java/blob/main/src/test/java/software/amazon/awssdk/crt/test/CrtTestFixture.java) 203*3c7ae9deSAndroid Build Coastguard Worker 204*3c7ae9deSAndroid Build Coastguard WorkerThese can be set persistently via Maven settings (usually in `~/.m2/settings.xml`): 205*3c7ae9deSAndroid Build Coastguard Worker```xml 206*3c7ae9deSAndroid Build Coastguard Worker<settings> 207*3c7ae9deSAndroid Build Coastguard Worker ... 208*3c7ae9deSAndroid Build Coastguard Worker <profiles> 209*3c7ae9deSAndroid Build Coastguard Worker <profile> 210*3c7ae9deSAndroid Build Coastguard Worker <activation> 211*3c7ae9deSAndroid Build Coastguard Worker <activeByDefault>true</activeByDefault> 212*3c7ae9deSAndroid Build Coastguard Worker </activation> 213*3c7ae9deSAndroid Build Coastguard Worker <properties> 214*3c7ae9deSAndroid Build Coastguard Worker <crt.test.endpoint>XXXXXXXXXX-ats.iot.us-east-1.amazonaws.com</crt.test.endpoint> 215*3c7ae9deSAndroid Build Coastguard Worker <crt.test.certificate>/path/to/XXXXXXXX-certificate.pem.crt</crt.test.certificate> 216*3c7ae9deSAndroid Build Coastguard Worker <crt.test.privatekey>/path/to/XXXXXXXX-private.pem.key</crt.test.privatekey> 217*3c7ae9deSAndroid Build Coastguard Worker <crt.test.rootca>/path/to/AmazonRootCA1.pem</crt.test.rootca> 218*3c7ae9deSAndroid Build Coastguard Worker ... etc ... 219*3c7ae9deSAndroid Build Coastguard Worker </properties> 220*3c7ae9deSAndroid Build Coastguard Worker </profile> 221*3c7ae9deSAndroid Build Coastguard Worker </profiles> 222*3c7ae9deSAndroid Build Coastguard Worker</settings>% 223*3c7ae9deSAndroid Build Coastguard Worker``` 224*3c7ae9deSAndroid Build Coastguard Worker 225*3c7ae9deSAndroid Build Coastguard Worker## IDEs 226*3c7ae9deSAndroid Build Coastguard Worker* CMake is configured to export a compilation database at target/cmake-build/compile_commands.json 227*3c7ae9deSAndroid Build Coastguard Worker* CLion: Build once with maven, then import the project as a [Compilation Database Project](https://www.jetbrains.com/help/clion/compilation-database.html) 228*3c7ae9deSAndroid Build Coastguard Worker* VSCode: will detect that this is both a java project and if you have the CMake extension, you can point that at CMakeLists.txt and the compilation database 229*3c7ae9deSAndroid Build Coastguard Worker 230*3c7ae9deSAndroid Build Coastguard Worker## Debugging 231*3c7ae9deSAndroid Build Coastguard WorkerTests can be debugged in Java/Kotlin via the built-in tooling in VSCode and IntelliJ. If you need to debug the native code, it's a bit trickier. 232*3c7ae9deSAndroid Build Coastguard Worker 233*3c7ae9deSAndroid Build Coastguard WorkerTo debug native code with VSCode or CLion or any other IDE: 234*3c7ae9deSAndroid Build Coastguard Worker1. Find your ```mvn``` launch script(e.g. ```realpath $(which mvn)```) and pull the command line at the bottom from it. This changes between versions 235*3c7ae9deSAndroid Build Coastguard Worker of maven, so it is difficult to give consistent directions. 236*3c7ae9deSAndroid Build Coastguard Worker 237*3c7ae9deSAndroid Build Coastguard Worker As an example, for Maven 3.6.0 on Linux: 238*3c7ae9deSAndroid Build Coastguard Worker ```/path/to/java -classpath /usr/share/java/plexus-classworlds-2.5.2.jar -Dclassworlds.conf=/usr/share/maven/bin/m2.conf -Dmaven.home=/usr/share/maven -Dlibrary.jansi.path=/usr/share/maven/lib/jansi-native -Dmaven.multiModuleProjectDirectory=. org.codehaus.plexus.classworlds.launcher.Launcher test -DforkCount=0 -Ddebug.native -Dtest=HttpClientConnectionManager#testMaxParallelConnections``` 239*3c7ae9deSAndroid Build Coastguard Worker 240*3c7ae9deSAndroid Build Coastguard Worker The important parts are: 241*3c7ae9deSAndroid Build Coastguard Worker * ```-DforkCount=0``` - prevents the Maven process from forking to run tests, so your debugger will be attached to the right process. You can ignore this if 242*3c7ae9deSAndroid Build Coastguard Worker you configure your debugger to attach to child processes. 243*3c7ae9deSAndroid Build Coastguard Worker * ```-Ddebug.native``` - Makes CMake compile the JNI bindings and core libraries in debug. By default, we compile in release with symbols, which will help 244*3c7ae9deSAndroid Build Coastguard Worker for call stacks, but less so for live debugging. 245*3c7ae9deSAndroid Build Coastguard Worker2. Set the executable to launch to be your java binary (e.g. ```/usr/bin/java```) 246*3c7ae9deSAndroid Build Coastguard Worker3. Set the parameters to be the ones used by the ```mvn``` script, as per above 247*3c7ae9deSAndroid Build Coastguard Worker4. Set the working directory to the `aws-crt-java` directory 248*3c7ae9deSAndroid Build Coastguard Worker5. On windows, you will need to manually load the PDB via the Modules window in Visual Studio, as it is not embedded in the JAR. It will be in the ```target/cmake-build/lib/windows/<arch>``` folder. 249