You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/03/25 20:54:55 UTC

[GitHub] [netbeans] dyorgio commented on pull request #3866: [NETBEANS-6329] Tools > Show In Finder don't works on JDK 17

dyorgio commented on pull request #3866:
URL: https://github.com/apache/netbeans/pull/3866#issuecomment-1079427054


   Hi @matthiasblaesing, yes it does, but only if you call getParentFile:
   ```java
   // Current Implementation
   final Class<?> fmClz = Class.forName("com.apple.eio.FileManager");      //NOI18N
   final Method m = fmClz.getDeclaredMethod("revealInFinder", File.class); //NOI18N
   m.invoke(null, new File("/PATH/FILE.EXT"));
   
   // Suggested Implementation
   Desktop.getDesktop().browse(new File("/PATH/FILE.EXT").getParentFile().toURI());
   ```
   
   But I only tested on macOS 12.3 (latest), with 1.8 and 17 java versions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists