I created a new extension with jnlp - I used the association tag. after clicking a file with the special extension, It's open the program. How the program can get the content of the file?
The file services demo. has a complete example of declaring the .zzz
extension.
Basically the file name is passed as a String
in the arguments to the main(String[])
method. The arguments is preceded by a string with either open or print.
Once the code has the file name, create a File
and load it as you might load any other file.