    

 ## On this page

  

 

 # setSourceFromFile

 Last update: 30.07.2026 

public [setSourceFromFile](set-source-from-file.md)(file: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

Sets the script source code to the value of the given file. The source code is parsed baesd on the current language setting. The script language should be set before calling this function.

#### Parameters

filefull path to the source file#### Throws

[ModelCenterException](./../-model-center-exception/index.md)