Here is what I do
tree -R /Applications/NetBeans/NetBeans\ 7.0.app/ | perl -e 'while (<>) { print if /java$/ }'
but of course this doesn't return the result I want.
What I want is to display an executable java file along with its recursive directory so that I would know where that java file is. Something like this structure below
`-- Contents
`-- Resources
`-- NetBeans
`-- ExecutableJavaEnv
`-- java
This question is inspired from my question on SU. The structure display above actually is not really important because I'm not sure if I can get what I want using find. What I need is just get the path so that I can set my TextMate to run NetBeans' Java instead of /usr/bin/java from my Mac OS X 10.5.8. Advice? Help?
1st Edit:
Thanks for answers so far, I appreciate it. Here is the result of the command I tried:
. find /Applications/NetBeans/NetBeans\ 7.0.app/ -name java
/Applications/NetBeans/NetBeans 7.0.app//Contents/Resources/NetBeans/java
. ll /Applications/NetBeans/NetBeans\ 7.0.app/Contents/Resources/NetBeans/
total 632
-rw-rw-r-- 1 arie admin 6.6K Apr 8 09:29 CREDITS.html
-rw-rw-r-- 1 arie admin 1.7K Apr 8 09:29 DISTRIBUTION.txt
-rw-rw-r-- 1 arie admin 2.1K Apr 8 09:30 LEGALNOTICE.txt
-rw-rw-r-- 1 arie admin 78K Apr 8 09:30 LICENSE.txt
-rw-rw-r-- 1 arie admin 5.4K Apr 8 09:30 README.html
-rw-rw-r-- 1 arie admin 158K Apr 8 09:30 THIRDPARTYLICENSE.txt
drwxrwxr-x 8 arie admin 272B Apr 8 09:29 apisupport/
drwxrwxr-x 3 arie admin 102B Apr 8 10:32 bin/
drwxrwxr-x 9 arie admin 306B Jul 1 15:56 cnd/
drwxrwxr-x 9 arie admin 306B Apr 8 09:29 dlight/
drwxrwxr-x 9 arie admin 306B Apr 8 09:30 enterprise/
drwxrwxr-x 6 arie admin 204B Apr 8 09:30 ergonomics/
drwxrwxr-x 6 arie admin 204B Jun 11 22:17 etc/
drwxrwxr-x 7 arie admin 238B Apr 8 09:30 groovy/
drwxrwxr-x 21 arie admin 714B Jun 11 22:15 harness/
drwxrwxr-x 11 arie admin 374B Jun 11 22:25 ide/
drwxrwxr-x 12 arie admin 408B Jul 1 15:56 java/
drwxrwxr-x 10 arie admin 340B Apr 8 10:15 mobility/
-rw-rw-r-- 1 arie admin 33K Apr 8 09:30 moduleCluster.properties
drwxrwxr-x 15 arie admin 510B Jun 11 22:17 nb/
-rw-rw-r-- 1 arie admin 15K Apr 8 09:30 netbeans.css
drwxrwxr-x 11 arie admin 374B Apr 8 09:30 php/
drwxrwxr-x 11 arie admin 374B Jun 11 22:25 platform/
drwxrwxr-x 10 arie admin 340B Apr 8 09:30 profiler/
drwxrwxr-x 3 arie admin 102B Apr 8 08:43 ruby/
drwxrwxr-x 7 arie admin 238B Apr 8 09:30 websvccommon/
.
And for another answer is this
. find /Applications/NetBeans/NetBeans\ 7.0.app -type f -executable -name java
find: -executable: unknown option
javasomewhere under a directory on your system? Are you looking for a file calledjavaanywhere on your system? Are you trying to parse the output oftree, to extract only the parts that are the steps to a file calledjava? Something else? – Gilles Jul 23 '11 at 12:03javawith its complete absolute path somewhere under/Applications/NetBeans/NetBeans\ 7.0.appdir. I apologize for the confusion. – Arie Jul 23 '11 at 12:09