Java.SetContainerFileName
-------------------------

Sets the container file name to use for next containers.

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

MBS( "Java.SetContainerFileName"; FileName ) 

**MBS**( **"Java.SetContainerFileName";** /\* Sets the container file name to use for next containers. \*/  
**$FileName**) /\* The file name to use for container.e.g. "test.jpg" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FileName | The file name to use for container. | "test.jpg" |

### Result

Returns OK or error.

### Description

Sets the container file name to use for next containers.  
When a function call to Java returns a ByteArray, we pack it into a container using this file name.  
The file name than determents for FileMaker the type of file.  
### Examples

Set file name:

 MBS ( "Java.SetContainerFileName"; "Logo.jpg" )  
### See also

- [Java.GetContainerFileName](JavaGetContainerFileName.md)

### Example Databases

- [Java/Java Tests/Java Tests](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Java/Java%20Tests/Java%20Tests.shtml#2ScriptAnchor_)

This function is free to use.

Created 13th October 2016 , last changed 6th September 2019

  
[Java.ReleaseAll](JavaReleaseAll.md) - [Java.SetObjectField](JavaSetObjectField.md)

[HTML Version](JavaSetContainerFileName.shtml)