Is it possible to open a file with processing sketch? (command line)

How would I configure my processing sketch to recognise that I have opened it with the context of the selected document though? I’ve managed to set it as a default before but I haven’t found a way to actually get it to open a document that way.