InfoHeap
Tech
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. AngularJS format date using date filter
  2. PhantomJS – find all fonts-families on a web page
  3. Java – string to int example
  4. Java – equals vs ==
  5. AngularJS hello world example
  6. CSS padding inside a box
  7. Convert mp3 to ogg on Mac using ffmpeg
  8. Find used ports by an app on Android using Adb
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Mac Command Line, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | 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 | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress