diff --git a/bindings/java/README.md b/bindings/java/README.md index beda28f6..311035f3 100644 --- a/bindings/java/README.md +++ b/bindings/java/README.md @@ -97,4 +97,10 @@ Ping the contributors of the Java bindings when submitting a pull request, so yo ## License The Java bindings for Keystone is open-sourced software licensed under the MIT license. -The license of the library Keystone may be different and is available [at the root of the repository of Keystone](https://github.com/keystone-engine/keystone). \ No newline at end of file +The license of the library Keystone may be different and is available [at the root of the repository of Keystone](https://github.com/keystone-engine/keystone). + + + +mvn package -DskipTests + +mvn install:install-file -Dfile=F:\coding\java\keystone\bindings\java\target\java-bindings-0.9.1-0-jar-with-dependencies.jar -DgroupId=org.bon.keystone -DartifactId=keystone -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true \ No newline at end of file diff --git a/bindings/java/src/main/java/keystone/Keystone.java b/bindings/java/src/main/java/keystone/Keystone.java index 34d7a75f..d293b8fa 100644 --- a/bindings/java/src/main/java/keystone/Keystone.java +++ b/bindings/java/src/main/java/keystone/Keystone.java @@ -121,7 +121,7 @@ public KeystoneEncoded assemble(String assembly) { * @return The return value is the machine code of the assembly instructions. * @throws AssembleFailedKeystoneException if the assembly code cannot be assembled properly. */ - public KeystoneEncoded assemble(String assembly, int address) { + public KeystoneEncoded assemble(String assembly, long address) { var pointerToMachineCodeBuffer = new PointerByReference(); var pointerToMachineCodeSize = new IntByReference(); var pointerToNumberOfStatements = new IntByReference(); @@ -161,7 +161,7 @@ public KeystoneEncoded assemble(Iterable assembly) { * @return The return value is the machine code of the assembly instructions. * @throws AssembleFailedKeystoneException if the assembly code cannot be assembled properly. */ - public KeystoneEncoded assemble(Iterable assembly, int address) { + public KeystoneEncoded assemble(Iterable assembly, long address) { return assemble(String.join(";", assembly), address); } diff --git a/bindings/java/src/main/java/keystone/KeystoneEncoded.java b/bindings/java/src/main/java/keystone/KeystoneEncoded.java index 22945603..271e6f5d 100644 --- a/bindings/java/src/main/java/keystone/KeystoneEncoded.java +++ b/bindings/java/src/main/java/keystone/KeystoneEncoded.java @@ -19,7 +19,7 @@ public class KeystoneEncoded { /** * The address of the first assembly instruction. */ - private final int address; + private final long address; /** * The number of statements successfully processed. @@ -33,7 +33,7 @@ public class KeystoneEncoded { * @param address The address of the first assembly instruction. * @param numberOfStatements The number of statements successfully processed. */ - public KeystoneEncoded(byte[] machineCode, int address, int numberOfStatements) { + public KeystoneEncoded(byte[] machineCode, long address, int numberOfStatements) { this.machineCode = machineCode; this.address = address; this.numberOfStatements = numberOfStatements; @@ -49,7 +49,7 @@ public byte[] getMachineCode() { /** * Gets the address of the first assembly instruction. */ - public int getAddress() { + public long getAddress() { return address; }