0

I am making a simple MP3 Tag editor using JavaFx for my own use on my Mac

I can right click an MP3 file and view the info with Get Info and set the association for MP3s to be my tag editor when the file is double clicked

A command line version of the app would accept the path/filename through the String args passed on the command line but with a JavaFx application this is not passed.

So I was wondering, how do I get the path to the file that launched the JavaFx app?

Pagrate
  • 141
  • 2
  • 10
  • Do I understand you correctly: You want to double-click on a file, this should open your JavaFX application, and you then want to find out which file your application has been opened for? – Markus Weninger Oct 05 '17 at 16:23

1 Answers1

1

This will not help you much but there is a bug report asking for exactly this. https://bugs.openjdk.java.net/browse/JDK-8187992

mipa
  • 10,369
  • 2
  • 16
  • 35
  • Thanks this was useful as the bug provides some source code which gave me an example of what i was looking for in setFXFileHandler() – Pagrate Oct 06 '17 at 08:46
  • Glad to hear that. There is also a discussion on SO concerning this topic. https://stackoverflow.com/questions/34569389/missing-openfilesevent-for-javafx-on-mac/46457669#46457669 – mipa Oct 06 '17 at 11:27