using System.Environment; ... def program_name = GetCommandLineArgs()[0]; ...