Platforms to show: All Mac Windows Linux Cross-Platform
JavaVMMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Java | MBS Java Plugin | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
Add Linux support plugin version 8.7.
Releasing the java vm (by releasing all java objects), and reinitializing can fail.
Please make sure this Java VM object stays alive until you are done with all your java stuff. So all the java objects go away and this vm object is destroyed on the end. Because if some java code is still running like an background java thread, quitting the VM can lead into crashes.
While the plugin supports to have several instances, it seems like JNI does not support that.
On Windows, we look into Local Machine\SOFTWARE\JavaSoft\Java Runtime Environment in registry to find the newest entry and the path to the jvm.dll file. Please note that on Windows you can install 32-bit and 64-bit version of Java and you need the matching bit number to FileMaker application.
If you get error 126 on Windows, maybe MSVCR100.DLL is missing. So install Visual Studio 2010 runtime libraries. You can download them from Microsoft website. Do not download them from other websites spreading malware!
- 2 properties
- 51 methods
- method Constructor(path as folderitem)
- method Constructor(path as string)
- method Constructor(version as Integer, options() as string, ignoreUnrecognizedOptions as boolean)
- method Constructor(version as Integer, options() as string, path as folderitem, ignoreUnrecognizedOptions as boolean)
- method Constructor(version as Integer, options() as string, path as string, ignoreUnrecognizedOptions as boolean)
- method DefineClass(name as string, Data as MemoryBlock) as JavaClassMBS
- method DefineClass(name as string, Data as String) as JavaClassMBS
- method FindClass(name as string) as JavaClassMBS
- method FreeCurrentThread
- method FromReflectedField(field as JavaObjectMBS) as JavaFieldMBS
- method FromReflectedMethod(method as JavaObjectMBS) as JavaMethodMBS
- method IsAssignableFrom(TheSubClass as JavaClassMBS, TheSuperClass as JavaClassMBS) as boolean
- method MonitorEnter(obj as JavaObjectMBS) as Integer
- method MonitorExit(obj as JavaObjectMBS) as Integer
- method NewBooleanArray(ref as JavaObjectMBS) as JavaBooleanArrayMBS
- method NewBooleanArray(size as Integer) as JavaBooleanArrayMBS
- method NewBooleanArray(values() as Boolean) as JavaBooleanArrayMBS
- method NewByteArray(ref as JavaObjectMBS) as JavaByteArrayMBS
- method NewByteArray(size as Integer) as JavaByteArrayMBS
- method NewByteArray(values() as UInt8) as JavaBooleanArrayMBS
- method NewCharArray(ref as JavaObjectMBS) as JavaCharArrayMBS
- method NewCharArray(size as Integer) as JavaCharArrayMBS
- method NewCharArray(values() as UInt16) as JavaCharArrayMBS
- method NewDirectByteBuffer(address as Integer, size as Integer) as JavaObjectMBS
- method NewDirectByteBuffer(mem as memoryblock) as JavaObjectMBS
- method NewDoubleArray(ref as JavaObjectMBS) as JavaDoubleArrayMBS
- method NewDoubleArray(size as Integer) as JavaDoubleArrayMBS
- method NewDoubleArray(values() as Double) as JavaDoubleArrayMBS
- method NewFloatArray(ref as JavaObjectMBS) as JavaFloatArrayMBS
- method NewFloatArray(size as Integer) as JavaFloatArrayMBS
- method NewFloatArray(values() as Single) as JavaFloatArrayMBS
- method NewIntArray(ref as JavaObjectMBS) as JavaIntArrayMBS
- method NewIntArray(size as Integer) as JavaIntArrayMBS
- method NewIntArray(values() as Int32) as JavaIntArrayMBS
- method NewLongArray(ref as JavaObjectMBS) as JavaLongArrayMBS
- method NewLongArray(size as Integer) as JavaLongArrayMBS
- method NewLongArray(values() as Int64) as JavaLongArrayMBS
- method NewObjectArray(ref as JavaObjectMBS) as JavaObjectArrayMBS
- method NewObjectArray(size as Integer, TheClass as JavaClassMBS, InitialValue as JavaObjectMBS = nil) as JavaObjectArrayMBS
- method NewObjectArray(values() as JavaObjectMBS) as JavaObjectArrayMBS
- method NewShortArray(ref as JavaObjectMBS) as JavaShortArrayMBS
- method NewShortArray(size as Integer) as JavaShortArrayMBS
- method NewShortArray(values() as Int16) as JavaShortArrayMBS
- method NewStringArray(size as integer, InitialValue as JavaStringMBS = nil) as JavaObjectArrayMBS
- method NewStringArray(values() as String) as JavaObjectArrayMBS
- method NewStringUnicode(s as string) as JavaStringMBS
- method NewStringUTF8(s as string) as JavaStringMBS
- method Runtime as JavaRuntimeMBS
- method ToReflectedField(TheClass as JavaClassMBS, fieldID as JavaFieldMBS, isStatic as boolean) as JavaObjectMBS
- method ToReflectedMethod(TheClass as JavaClassMBS, methodID as JavaMethodMBS, isStatic as boolean) as JavaObjectMBS
- method Version as Integer
- 2 shared methods
- shared method SetLibraryPath(path as folderitem)
- shared method SetLibraryPath(path as string)
- 4 constants
Constants
Constant | Value | Description |
---|---|---|
JNI_VERSION_1_1 | &h00010001 | One of the constants to specify the JNI version in the constructor. |
JNI_VERSION_1_2 | &h00010002 | One of the constants to specify the JNI version in the constructor. |
JNI_VERSION_1_4 | &h00010004 | One of the constants to specify the JNI version in the constructor. |
JNI_VERSION_1_6 | &h00010006 | One of the constants to specify the JNI version in the constructor. |
This class has no sub classes.
Some methods using this class:
- JavaDatabaseMBS.Constructor(vm as JavaVMMBS, driverclass as string)
Some properties using for this class:
- JavaObjectMBS.VM as JavaVMMBS
Some examples using this class:
- /Java/JavaDatabase/java Database Thread Tests
- /Java/JavaDatabase/JavaDatabase MySQL Blob and Clob
- /Java/JavaDatabase/JavaDatabase MySQL test
- /Java/JavaDatabase/JavaDatabase MySQL test with Threading
- /Java/JavaDatabase/JavaDatabase MySQL with JavaInputStreamMBS
- /Java/JavaDatabase/JavaDatabase SQLite
- /Java/JavaDatabase/JavaDatabase SQLite blob
- /Java/JavaDatabase/JavaDatabase to JSON
- /Java/JavaDatabase/JDBCMultipleDrivers
- /Java/JavaTest/Java
Blog Entries
- MBS Xojo Plugins, version 23.2pr1
- Trying Java 19 in Xojo
- MBS Xojo Plugins, version 21.3pr7
- News from the MBS Xojo Plugins Version 20.3
- MonkeyBread Software Releases the MBS Xojo Plugins in version 20.3
- MBS Xojo Plugins, version 20.3pr1
- MBS Xojo Plugins, version 20.0pr8
- MBS Xojo Plugins, version 19.4pr2
- Java with MBS Plugin
- Encrypted Access database in Xojo
Release notes
- Version 23.2
- Fixed a problem which prevents JavaVMMBS to initialize on macOS and Linux with current JDK 19.
- Version 21.3
- Changed JavaVMMBS constructor to not to try to load JavaVM.framework, which results in a crash on Big Sur.
- Version 20.3
- Added DefineClass method to JavaVMMBS class.
- Version 20.0
- Updated JavaVMMBS constructor to better find Java libraries.
- Version 19.4
- Improved search for JavaVMMBS class to find jvm.dll on Windows.
- Version 19.2
- Added new methods to JavaVMMBS class to create Java arrays based on Xojo arrays.
- Version 18.1
- Improved JavaVMMBS.SetLibraryPath function to work for Mac, too.
The items on this page are in the following plugins: MBS Java Plugin.
JavaThrowableMBS - JPEG2000MBS