Changing the Java Temporary File Location
Posted by Aly Essa, Last modified by Aly Essa on 04 May 2018 09:05 AM

Overview

When FileCatalyst Server and Client Side applications are launched they inherit the Users Temporary directory from the OS. Java uses this path to store files such as fczips when they are created for transfers. If you have a small hard drive where the application is installed you will run into issues where the storage device gets filled quickly. Our applications have an auto deletion method that runs when the transfer is complete. 

The Java Temporary File location can be supplied so that the Users Temporary directory does not get filled up and cause the application to hang. If this property is run using Command Line it will have a lifespan of that instance or launch. If the property is added as a Service it will always be used until it is removed.

Environment

FileCatalyst Server v3.4.2 and later.

FileCatalyst HotFolder v3.4.2 and later.

FileCatalyst CLI and API v3.4.2 and later.

Resolution

The FileCatalyst Server and HotFolder can directly change the Temporary File Location from the UI. If you are using the FileCatalyst CLI or API the parameter to specify the Java Temporary Location needs to be called as an additional Java Argument. Use the following steps to apply the solution:

  1. FileCatalyst Server

    This method can be used if the FileCatalyst Server is running in Standalone mode or as a Service.

    1. Open the FileCatalyst Server Remote Admin application.
    2. From the Settings tab, navigate to the System Properties tab.
    3. Hit the Add Property button.
    4. Enter the following information:

      Property Name: java.io.tmpdir
      Value : </path/to/temporary/storage>

    5. Hit the OK button.
    6. Close the FileCatalyst Remote Admin application.
    7. If running the FileCatalyst Server as a Service: Restart the Service. If the application is running in Standalone mode re-launch the FileCatalyst Remote Admin application.

  2. FileCatalyst HotFolder

    This method can be used if the FileCatalyst HotFolder is running in Standalone mode or as a Service.

    1. Open the FileCatalyst HotFolderRemote Admin application.
    2. From the Settings tab, navigate to the System Properties tab.
    3. Hit the Add Property button.
    4. Enter the following information:

      Property Name: java.io.tmpdir
      Value : </path/to/temporary/storage>

    5. Hit the OK button.
    6. Close the FileCatalyst Remote Admin application.
    7. If running the FileCatalyst HotFolder as a Service: Restart the Service. If the application is running in Standalone mode re-launch the FileCatalyst Remote Admin application.

  3. FileCatalyst Applications Running from Command Line

    This method explores all FileCatalyst Applications that use the Command Line as a launch method. The Java Temporary Directory can be specified as a pre-launch Java Argument. 

    1. Navigate to the directory from where the respective application JAR file will be accessed.
    2. Use the following command along with the Java Argument to launch the application. Please note that this variable will be changed for the run-time duration of the application.

      java -Djava.io.tmp=<path/to/temporary/storage> -jar <FileCatalystApplication>.jar

      A sample command would be:


      java -Djava.io.tmp=f:/temp -jar FileCatalystCL.jar