Java.DefineClass
----------------

Defines a class.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Java](component_Java.md) | [10.3](newinversion103.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "Java.DefineClass"; ClassName; ClassData ) 

**MBS**( **"Java.DefineClass";** /\* Defines a class. \*/  
**$ClassName**; /\* The name of the java class.e.g. "com.mbs.test" \*/   
**$ClassData**) /\* The container value with the class.e.g. MyTable::ClassContainer \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ClassName | The name of the java class. | "com.mbs.test" |
| ClassData | The container value with the class. | MyTable::ClassContainer |

### Result

Returns OK or error.

### Description

Defines a class.  
Please put .class file into a container and load it here.  
Usually we prefer to load classes from jar file, but here you can dynamically declare a class with loading data from container.  
You can use [Java.FindClass](JavaFindClass.md) to check whether a class is loaded already.  
To read jar file, you can use our [archive](component_Archive.md) functions to expand zip archives.  
### See also

- [Java.FindClass](JavaFindClass.md)

### Release notes

- **Version 10.3**
    - Added [Java.DefineClass](https://www.mbsplugins.eu/JavaDefineClass.shtml) and [Java.FindClass](https://www.mbsplugins.eu/JavaFindClass.shtml) functions.

### Blog Entries

- [What is new in the MBS FileMaker Plugin Version 10.3](https://www.mbsplugins.de/archive/2020-07-31/What_is_new_in_the_MBS_FileMak/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 10.3 - Über 6200 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2020-07-21/Neues_MBS_FileMaker_Plugin_103/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 10.3 - More than 6200 Functions In One Plugin](https://www.mbsplugins.de/archive/2020-07-21/MBS_FileMaker_Plugin_103_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.3pr1](https://www.mbsplugins.de/archive/2020-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th May 2020 , last changed 19th May 2020

  
[Java.CallStaticMethod](JavaCallStaticMethod.md) - [Java.FindClass](JavaFindClass.md)

[HTML Version](JavaDefineClass.shtml)