I am using Ubuntu. I would like to have a user be able to double-click (or whatever they have set to open a file) on the save file for a java game i'm making, and have the game start and automatically load the save. How could I make the game launch instead of opening the file, and then pass the save's file name or location as an argument? Would i have to have the game create a new mime type the first time it ran, or something similar, so that Ubuntu knows what to do with the save when the user tries to open it?
Asked
Active
Viewed 361 times
0
-
`Desktop` checkout Javadoc – jmj Aug 22 '14 at 01:30
-
1This is not so much an issue with Java, but with the OS. You need to register the file type to launch your application... – MadProgrammer Aug 22 '14 at 01:31
-
1possible duplicate of [Associate file format with my program (Java)](http://stackoverflow.com/questions/9321402/associate-file-format-with-my-program-java) – Erwin Bolwidt Aug 22 '14 at 01:49
-
File association solves the "make the game launch" part of the problem, but would any arguments be passed to the program by default? And if so, in what order, or if not, how can I make them? – Giaphage47 Aug 23 '14 at 03:33