Do I have a button for viewing an image attached to a journal entry, and when the user clicks this button, I want it to open the image in the default image viewer on a Windows computer?
How do I know which viewer is in the default image viewer?
Right now I am doing something like this, but this does not work:
String filename = "\""+(String)attachmentsComboBox.getSelectedItem()+"\""; Runtime.getRuntime().exec("rundll32.exe C:\\WINDOWS\\System32\\shimgvw.dll,ImageView_Fullscreen "+filename);
And it doesn’t work, I mean that it does nothing. I tried to run the command only on the command line, and nothing happened. No mistake, nothing.
source share