JavaScript.LoadLibrary
----------------------

Loads the JavaScriptCore library.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JavaScriptWebKit](component_JavaScriptWebKit.md) | [13.1](newinversion131.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "JavaScript.LoadLibrary"; Path ) 

**MBS**( **"JavaScript.LoadLibrary";** /\* Loads the JavaScriptCore library. \*/  
**$Path**) /\* The native file path to the library.e.g. "/usr/lib/aarch64-linux-gnu/libjavascriptcoregtk-4.1.so" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native file path to the library. | "/usr/lib/aarch64-linux-gnu/libjavascriptcoregtk-4.1.so" |

### Result

Returns OK or error.

### Description

Loads the JavaScriptCore library.  
Does nothing on macOS or iOS since we use the library provided by Apple with the operating system.  
  
You can load JavaScriptCore.dll on Windows here.   
Make sure all dependencies are honored and you may use Dependency Walker application to look for dependencies.  
  
You can load libjavascriptcoregtk.so on Linux here.  
e.g. "/usr/lib/aarch64-linux-gnu/libjavascriptcoregtk-4.1.so" for Linux 64-bit on ARM.  
On Linux you need to install a package which includes JavaScriptCore library, e.g. using "sudo apt-get install libjavascriptcoregtk-4.1" command.  
  
Returns OK on success and an error message otherwise.  
  
If you have trouble with DLLs not loading on Windows, please check if you have new Visual Studio Runtime libraries installed. If you need more than one DLL, please use [Process.SetDllDirectory](ProcessSetDllDirectory.md) to point to the folder to find the DLL files.  
  
On Linux if you get the error wrong ELF class: ELFCLASS32 if you try to load a 32-bit library into a 64-bit application. You may also get errors about version GLIBC\_2.25 or similar if your libc library on the Linux installation isn't new enough for the loaded library.  
### Examples

Load library on Linux:

 Set Variable \[ $r ; Value: MBS ("JavaScript.LoadLibrary"; "/usr/lib/aarch64-linux-gnu/libjavascriptcoregtk-4.1 .so") \]  
Load library on Windows:

 Set Variable \[ $r ; Value: MBS ( "[Process.SetDllDirectory](ProcessSetDllDirectory.md)"; "C:\\Users\\cs\\Desktop\\test") \]   
Set Variable \[ $r ; Value: MBS ( "JavaScript.LoadLibrary"; "JavaScriptCore.DLL") \]  
Load library on Windows with iTunes:

 Set Variable \[$r ; Value: MBS ( "[Process.SetDllDirectory](ProcessSetDllDirectory.md)"; "C:\\Program Files\\iTunes") \]  
Set Variable \[$r ; Value: MBS ( "JavaScript.LoadLibrary"; "JavaScriptCore.dll") \]  
### See also

- [JavaScript.Available](JavaScriptAvailable.md)
- [Process.SetDllDirectory](ProcessSetDllDirectory.md)

### Release notes

- **Version 13.1**
    - Added [JavaScript.LoadLibrary](https://www.mbsplugins.eu/JavaScriptLoadLibrary.shtml) and [JavaScript.Available](https://www.mbsplugins.eu/JavaScriptAvailable.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 13.1](https://www.mbsplugins.de/archive/2023-03-15/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.1 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-03-07/Neues_MBS_Plugin_131_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.1 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-03-07/MBS_Plugin_131_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [Using JavaScript with WebKit on FileMaker Server on Linux](https://www.mbsplugins.de/archive/2023-03-05/Using_JavaScript_with_WebKit_o/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.1pr1](https://www.mbsplugins.de/archive/2023-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 25th January 2023 , last changed 7th April 2026

  
[JavaScript.List](JavaScriptList.md) - [JavaScript.New](JavaScriptNew.md)

[HTML Version](JavaScriptLoadLibrary.shtml)