InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac Command Line tutorials

  • Bulk convert jpeg files to png using sips on mac
  • Custom terminal tab title and ssh on mac
  • How to convert text to speech on Mac using command line utility say
  • How to join multiple pdf files on Mac
  • How to use qpdf to add/remove password from pdf on mac
  • Install redis on Mac
  • Mac - find which process is listening on a port
  • Mac - hide and unhide a file or directory
  • Mac - open a terminal from a folder
  • Mac - print java home on command line
  • Mac - search files on command line using mdfind
  • Mac command line convert svg to png
  • Mac command line utility open - some handy tips for better productivity
  • Mac terminal - how to close shell on exit
  • mac pkgutil - quick start guide
 
  • Home
  • > Tutorials
  • > Mac
  • > Mac Command Line

Mac – print java home on command line

on Jun 24, 2016

To print Java (JVM) home path on command line the following command (jave_home) can be used as shown below:

$ /usr/libexec/java_home 
/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home

To display all path of all JVMs:

$ /usr/libexec/java_home -V
/usr/libexec/java_home -V
Matching Java Virtual Machines (3):
    1.7.0_65, x86_64:	"Java SE 7"	/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home
    1.6.0_65-b14-468, x86_64:	"Java SE 6"	/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386:	"Java SE 6"	/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home

Suggested posts:

  1. Java System.out.print and println
  2. Java – print exception as string examples
  3. Command line – top IP list from apache access log
  4. Memcache – how to dump all keys and values on command line
  5. Perl command line – replace multi line comments
  6. Mac – search files on command line using mdfind
  7. How to convert text to speech on Mac using command line utility say
  8. Mac command line utility open – some handy tips for better productivity
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Mac Command Line, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2023 InfoHeap.

Powered by WordPress