#2 Pass file to open in explorer config


I couldn't work out a way to set up a shortcut to Oddjob that would open a file in the explorer. I have an RMI server running, and want to provide a shortcut that opens specific Oddjob config file that runs the RMI client. The best I can do normally is start the explorer and hope my RMI client oddjob is in the recently used file list.

Looking into what happens when the explorer runs normally, there's the default oddjob.xml in the distribution directory, which sets up a file persister and then calls explorer.xml to actually open the file.

The attached patch adds a "file" attribute to the MultiExplorerLauncher, that it passed through to the OddjobExplorer instances it creates. This in turn is consulted when there is no oddjob already configured on the explorer and triggers the equivalent of opening the file via the menu.

So now to set up a shortcut that loads a specific oddjob.xml (mine is called monitor.xml), I copy the default oddjob.xml and explorer.xml into a directory, then add file="${this.dir}/monitor.xml" to the explorer element in explorer.xml.

I can launch it with java -jar "%ODDJOB_DIR%\run-oddjob.jar" -f "%MONITOR_DIR%\oddjob.xml"


  • William Rose

    William Rose - 2011-10-13

    Add file attribute to explorer

  • Rob Gordon

    Rob Gordon - 2011-10-14
    • status: open --> closed-accepted
  • Rob Gordon

    Rob Gordon - 2011-10-14

    Thanks. A useful enhancement. I've also changed the default oddjob.xml so that any extra argument is passed to explorer as a file name - so you don't need a special monitor.xml.