   getExecutionType = (programType) ->
     switch programType
       when 'java'
-        return 'java -Djava.awt.headless=true -jar'
+        return 'java -Djava.awt.headless=true -Xmx4096m -jar'
       when 'coffeescript'
         return 'coffee'
       else

        process.rootFolder = collection.name
        process.image = image
        collection.processes.push(process)
    callback null, collection

  preprocessIiif = (collection, req, callback) ->
    url = req.body.images[0].value

    collection.parameters = parameterHelper.matchParams(req.body.inputs, req.body.highlighter.segments,serviceInfo.parameters,folder,folder, "", req)
    if(ResultHelper.checkCollectionResultAvailable(collection))
      collection.result = ResultHelper.loadResult(collection)
      callback null, collection
    else
      #if results not available, load images and create processes
      images = ImageHelper.loadCollection(collection.name)
