Versions in this module Expand all Collapse all v0 v0.1.0 Feb 7, 2023 Changes in this version + const GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS — windows/amd64 + const GET_MODULE_HANDLE_EX_FLAG_PIN — windows/amd64 + const GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT — windows/amd64 + const JNI_ABORT + const JNI_COMMIT + const JNI_EDETACHED + const JNI_EEXIST + const JNI_EINVAL + const JNI_ENOMEM + const JNI_ERR + const JNI_EVERSION + const JNI_FALSE + const JNI_OK + const JNI_TRUE + const JNI_VERSION_1_1 + const JNI_VERSION_1_2 + const JNI_VERSION_1_4 + const JNI_VERSION_1_6 + func Bool(b uint8) bool + func CFree(p unsafe.Pointer) + func CMalloc(capacity int) unsafe.Pointer + func CheckException(env *Env) + func CheckNull(uin uintptr, msg string) + func CheckNullException(msg string, ok func(env *Env), checkNull ...uintptr) + func GetModuleFileNameW(hModule syscall.Handle, buf unsafe.Pointer, nSize uint32) (dWord uint32) — windows/amd64 + func GetModuleHandleExW(dwFlags uint32, lpModuleName unsafe.Pointer, hModule *syscall.Handle) (success bool) — windows/amd64 + func GetSelfPath() string — darwin/amd64, linux/amd64, windows/amd64 + func InitJNI(jvm uintptr) — darwin/amd64, linux/amd64, windows/amd64 + func JavaThrowException(msg string) + func NativeThrowException(env *Env, code JavaExceptionCodes, msg string) + func OfSlice(b []byte) unsafe.Pointer + func PopLocalFrame(env *Env) + func PrintException(JNIEnv *Env, jthrowable Jthrowable) + func SetVm(mVm VM) + func ThrowException(msg string) + type Env uintptr + func AutoGetCurrentThreadEnv() *Env + func PushLocalFrame(nArgs int) *Env + func (env Env) AllocObject(clazz Jclass) Jobject + func (env Env) CallBooleanMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) bool + func (env Env) CallByteMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) byte + func (env Env) CallCharMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) uint16 + func (env Env) CallDoubleMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) float64 + func (env Env) CallFloatMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) float32 + func (env Env) CallIntMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) int + func (env Env) CallLongMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) int64 + func (env Env) CallNonvirtualBooleanMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) bool + func (env Env) CallNonvirtualByteMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) byte + func (env Env) CallNonvirtualCharMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) uint16 + func (env Env) CallNonvirtualDoubleMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) float64 + func (env Env) CallNonvirtualFloatMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) float32 + func (env Env) CallNonvirtualIntMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) int + func (env Env) CallNonvirtualLongMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) int64 + func (env Env) CallNonvirtualObjectMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) Jobject + func (env Env) CallNonvirtualShortMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) int16 + func (env Env) CallNonvirtualVoidMethodA(obj Jobject, clazz Jclass, methodID JmethodID, args ...Jvalue) + func (env Env) CallObjectMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) Jobject + func (env Env) CallShortMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) int16 + func (env Env) CallStaticBooleanMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) bool + func (env Env) CallStaticByteMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) byte + func (env Env) CallStaticCharMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) uint16 + func (env Env) CallStaticDoubleMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) float64 + func (env Env) CallStaticFloatMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) float32 + func (env Env) CallStaticIntMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) int + func (env Env) CallStaticLongMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) int64 + func (env Env) CallStaticObjectMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) Jobject + func (env Env) CallStaticShortMethodA(clazz Jclass, methodID JmethodID, args ...Jvalue) int16 + func (env Env) CallStaticVoidMethodA(cls Jclass, methodID JmethodID, args ...Jvalue) + func (env Env) CallVoidMethodA(obj Jobject, methodID JmethodID, args ...Jvalue) + func (env Env) DefineClass(name string, loader Jobject, buf []byte) Jclass + func (env Env) DeleteGlobalRef(gref Jobject) + func (env Env) DeleteLocalRef(obj Jobject) + func (env Env) DeleteWeakGlobalRef(ref Jweak) + func (env Env) EnsureLocalCapacity(capacity int) int + func (env Env) ExceptionCheck() bool + func (env Env) ExceptionClear() + func (env Env) ExceptionDescribe() + func (env Env) ExceptionOccurred() Jthrowable + func (env Env) FatalError(msg string) + func (env Env) FindClass(name string) Jclass + func (env Env) FromReflectedField(field Jobject) JfieldID + func (env Env) FromReflectedMethod(method Jobject) JmethodID + func (env Env) GetArrayLength(array Jarray) int + func (env Env) GetBooleanArrayElement(array JbooleanArray, index int) bool + func (env Env) GetBooleanArrayElements(array Jarray, isCopy bool) unsafe.Pointer + func (env Env) GetBooleanArrayRegion(array JbooleanArray, start int, buf []bool) + func (env Env) GetBooleanField(obj Jobject, fieldID JfieldID) bool + func (env Env) GetByteArrayElement(array JbyteArray, index int) byte + func (env Env) GetByteArrayElements(array Jarray, isCopy bool) unsafe.Pointer + func (env Env) GetByteArrayRegion(array JbyteArray, start int, buf []byte) + func (env Env) GetByteField(obj Jobject, fieldID JfieldID) byte + func (env Env) GetCharArrayElement(array JcharArray, index int) uint16 + func (env Env) GetCharArrayElements(array JcharArray, isCopy bool) unsafe.Pointer + func (env Env) GetCharArrayRegion(array JcharArray, start int, buf []uint16) + func (env Env) GetCharField(obj Jobject, fieldID JfieldID) uint16 + func (env Env) GetDirectBufferAddress(buf Jobject) unsafe.Pointer + func (env Env) GetDirectBufferCapacity(buf Jobject) int + func (env Env) GetDoubleArrayElement(array JdoubleArray, index int) float64 + func (env Env) GetDoubleArrayElements(array JbooleanArray, isCopy bool) unsafe.Pointer + func (env Env) GetDoubleArrayRegion(array JdoubleArray, start int, buf []float64) + func (env Env) GetDoubleField(obj Jobject, fieldID JfieldID) float64 + func (env Env) GetFieldID(clazz Jclass, name string, sig string) JfieldID + func (env Env) GetFloatArrayElement(array JfloatArray, index int) float32 + func (env Env) GetFloatArrayElements(array JfloatArray, isCopy bool) unsafe.Pointer + func (env Env) GetFloatArrayRegion(array JfloatArray, start int, buf []float32) + func (env Env) GetFloatField(obj Jobject, fieldID JfieldID) float32 + func (env Env) GetIntArrayElement(array JintArray, index int) int + func (env Env) GetIntArrayElements(array JintArray, isCopy bool) unsafe.Pointer + func (env Env) GetIntArrayRegion(array JintArray, start int, buf []int32) + func (env Env) GetIntField(obj Jobject, fieldID JfieldID) int + func (env Env) GetJavaVM() (VM, int) + func (env Env) GetLongArrayElement(array JlongArray, index int) int64 + func (env Env) GetLongArrayElements(array JlongArray, isCopy bool) unsafe.Pointer + func (env Env) GetLongArrayRegion(array JlongArray, start int, buf []int64) + func (env Env) GetLongField(obj Jobject, fieldID JfieldID) int64 + func (env Env) GetMethodID(clazz Jclass, name string, sig string) JmethodID + func (env Env) GetObjectArrayElement(array JobjectArray, index int) Jobject + func (env Env) GetObjectClass(obj Jobject) Jclass + func (env Env) GetObjectField(obj Jobject, fieldID JfieldID) Jobject + func (env Env) GetObjectRefType(obj Jobject) RefType + func (env Env) GetPrimitiveArrayCritical(array Jarray) unsafe.Pointer + func (env Env) GetShortArrayElement(array JshortArray, index int) int16 + func (env Env) GetShortArrayElements(array JshortArray, isCopy bool) unsafe.Pointer + func (env Env) GetShortArrayRegion(array JshortArray, start int, buf []int16) + func (env Env) GetShortField(obj Jobject, fieldID JfieldID) int16 + func (env Env) GetStaticBooleanField(clazz Jclass, fieldID JfieldID) bool + func (env Env) GetStaticByteField(clazz Jclass, fieldID JfieldID) byte + func (env Env) GetStaticCharField(clazz Jclass, fieldID JfieldID) uint16 + func (env Env) GetStaticDoubleField(clazz Jclass, fieldID JfieldID) float64 + func (env Env) GetStaticFieldID(clazz Jclass, name string, sig string) JfieldID + func (env Env) GetStaticFloatField(clazz Jclass, fieldID JfieldID) float32 + func (env Env) GetStaticIntField(clazz Jclass, fieldID JfieldID) int + func (env Env) GetStaticLongField(clazz Jclass, fieldID JfieldID) int64 + func (env Env) GetStaticMethodID(clazz Jclass, name string, sig string) JmethodID + func (env Env) GetStaticObjectField(clazz Jclass, fieldID JfieldID) Jobject + func (env Env) GetStaticShortField(clazz Jclass, fieldID JfieldID) int16 + func (env Env) GetStringLength(str Jstring) int + func (env Env) GetStringUTF(ptr Jstring) []byte + func (env Env) GetSuperclass(sub Jclass) Jclass + func (env Env) GetVersion() int + func (env Env) IsAssignableFrom(sub Jclass, sup Jclass) bool + func (env Env) IsInstanceOf(obj Jobject, clazz Jclass) bool + func (env Env) IsSameObject(obj1 Jobject, obj2 Jobject) bool + func (env Env) MonitorEnter(obj Jobject) int + func (env Env) MonitorExit(obj Jobject) int + func (env Env) NewBooleanArray(len int) JbooleanArray + func (env Env) NewByteArray(len int) JbyteArray + func (env Env) NewCharArray(len int) JcharArray + func (env Env) NewDirectByteBuffer(address unsafe.Pointer, capacity int) Jobject + func (env Env) NewDoubleArray(len int) JdoubleArray + func (env Env) NewFloatArray(len int) JfloatArray + func (env Env) NewGlobalRef(lobj Jobject) Jobject + func (env Env) NewIntArray(len int) JintArray + func (env Env) NewLocalRef(ref Jobject) Jobject + func (env Env) NewLongArray(len int) JlongArray + func (env Env) NewObjectA(clazz Jclass, methodID JmethodID, args ...Jvalue) Jobject + func (env Env) NewObjectArray(len int, clazz Jclass, init Jobject) JobjectArray + func (env Env) NewShortArray(len int) JshortArray + func (env Env) NewString(s string) Jstring + func (env Env) NewWeakGlobalRef(obj Jobject) Jweak + func (env Env) PopLocalFrame(result Jobject) Jobject + func (env Env) PushLocalFrame(capacity int) int + func (env Env) RegisterNatives(class Jclass, methods []JNINativeMethod) int + func (env Env) ReleaseBooleanArrayElements(array JbooleanArray, elems uintptr, mode int32) + func (env Env) ReleaseByteArrayElements(array JbyteArray, elems uintptr, mode int32) + func (env Env) ReleaseCharArrayElements(array JcharArray, elems uintptr, mode int32) + func (env Env) ReleaseDoubleArrayElements(array JdoubleArray, elems uintptr, mode int32) + func (env Env) ReleaseFloatArrayElements(array JfloatArray, elems uintptr, mode int32) + func (env Env) ReleaseIntArrayElements(array JintArray, elems uintptr, mode int32) + func (env Env) ReleaseLongArrayElements(array JlongArray, elems uintptr, mode int32) + func (env Env) ReleasePrimitiveArrayCritical(array Jarray, carray unsafe.Pointer, mode int) + func (env Env) ReleaseShortArrayElements(array JshortArray, elems uintptr, mode int32) + func (env Env) SetBooleanArrayElement(array JbooleanArray, index int, v bool) + func (env Env) SetBooleanArrayRegion(array JbooleanArray, start int, buf []bool) + func (env Env) SetBooleanField(obj Jobject, fieldID JfieldID, val bool) + func (env Env) SetByteArrayElement(array JbyteArray, index int, v byte) + func (env Env) SetByteArrayRegion(array JbyteArray, start int, buf []byte) + func (env Env) SetByteField(obj Jobject, fieldID JfieldID, val byte) + func (env Env) SetCharArrayElement(array JcharArray, index int, v uint16) + func (env Env) SetCharArrayRegion(array JcharArray, start int, buf []uint16) + func (env Env) SetCharField(obj Jobject, fieldID JfieldID, val uint16) + func (env Env) SetDoubleArrayElement(array JdoubleArray, index int, v float64) + func (env Env) SetDoubleArrayRegion(array JdoubleArray, start int, buf []float64) + func (env Env) SetDoubleField(obj Jobject, fieldID JfieldID, val float64) + func (env Env) SetFloatArrayElement(array JfloatArray, index int, v float32) + func (env Env) SetFloatArrayRegion(array JfloatArray, start int, buf []float32) + func (env Env) SetFloatField(obj Jobject, fieldID JfieldID, val float32) + func (env Env) SetIntArrayElement(array JintArray, index int, v int) + func (env Env) SetIntArrayRegion(array JintArray, start int, buf []int32) + func (env Env) SetIntField(obj Jobject, fieldID JfieldID, val int) + func (env Env) SetLongArrayElement(array JlongArray, index int, v int64) + func (env Env) SetLongArrayRegion(array JlongArray, start int, buf []int64) + func (env Env) SetLongField(obj Jobject, fieldID JfieldID, val int64) + func (env Env) SetObjectArrayElement(array JobjectArray, index int, val Jobject) + func (env Env) SetObjectField(obj Jobject, fieldID JfieldID, val Jobject) + func (env Env) SetShortArrayElement(array JshortArray, index int, v int16) + func (env Env) SetShortArrayRegion(array JshortArray, start int, buf []int16) + func (env Env) SetShortField(obj Jobject, fieldID JfieldID, val int16) + func (env Env) SetStaticBooleanField(clazz Jclass, fieldID JfieldID, value bool) + func (env Env) SetStaticByteField(clazz Jclass, fieldID JfieldID, value byte) + func (env Env) SetStaticCharField(clazz Jclass, fieldID JfieldID, value uint16) + func (env Env) SetStaticDoubleField(clazz Jclass, fieldID JfieldID, value float64) + func (env Env) SetStaticFloatField(clazz Jclass, fieldID JfieldID, value float32) + func (env Env) SetStaticIntField(clazz Jclass, fieldID JfieldID, value int) + func (env Env) SetStaticLongField(clazz Jclass, fieldID JfieldID, value int64) + func (env Env) SetStaticObjectField(clazz Jclass, fieldID JfieldID, value Jobject) + func (env Env) SetStaticShortField(clazz Jclass, fieldID JfieldID, value int16) + func (env Env) Throw(obj Jthrowable) int + func (env Env) ThrowNew(clazz Jclass, msg string) int + func (env Env) ToReflectedField(cls Jclass, fieldID JfieldID, isStatic bool) Jobject + func (env Env) ToReflectedMethod(cls Jclass, methodID JmethodID, isStatic bool) Jobject + type JNINativeMethod struct + FnPtr unsafe.Pointer + Name string + Sig string + func (j *JNINativeMethod) String() string + type Jarray = uintptr + type JavaExceptionCodes int + const JavaArithmeticException + const JavaDirectorPureVirtual + const JavaException + const JavaIOException + const JavaIllegalArgumentException + const JavaIndexOutOfBoundsException + const JavaNullPointerException + const JavaOutOfMemoryError + const JavaRuntimeException + const JavaUnknownError + type JbooleanArray = uintptr + type JbyteArray = uintptr + type JcharArray = uintptr + type Jclass = uintptr + type JdoubleArray = uintptr + type JfieldID = uintptr + type JfloatArray = uintptr + type JintArray = uintptr + type JlongArray = uintptr + type JmethodID = uintptr + type Jobject = uintptr + type JobjectArray = uintptr + type JshortArray = uintptr + type Jstring = uintptr + func ExceptionMessageFromThrowable(JNIEnv Env, jthrowable Jthrowable) Jstring + type Jthrowable = uintptr + type Jvalue = uint64 + func BooleanValue(b bool) Jvalue + func DoubleValue(f float64) Jvalue + func FloatValue(f float32) Jvalue + func Int16Value(i int16) Jvalue + func Int32Value(i int32) Jvalue + func Int8Value(i int8) Jvalue + func IntValue(i int) Jvalue + func StringValue(env Env, s string) Jvalue + type Jweak = uintptr + type RefType int + const Global + const Invalid + const Local + const WeakGlobal + type VM uintptr + func (vm VM) AttachCurrentThread() (Env, int) + func (vm VM) AttachCurrentThreadAsDaemon() (Env, int) + func (vm VM) DestroyJavaVM() int + func (vm VM) DetachCurrentThread() int + func (vm VM) GetEnv(version int) (Env, int)