Of course. Just use variables in the appropriate commands, and they will be substituted for whatever dynamic values they current hold during execution.
Also, pursuant to our private conversation, please note that a Java project template exists and is provided with InstallAware. Just click File->New->Other and then choose the Templates tab to view the templates, then choose Java Script for a template setup script that will install the Java VM.