GithubHelp home page GithubHelp logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Thank you very much for reporting this issue and for providing a possible fix.

I currently do not have the possibility to test against OS X so I have to rely 
on the community.

If you agree, I'll include your fix into the next release of jvmtop.



Original comment by [email protected] on 12 Sep 2013 at 12:53

  • Changed state: Accepted

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Sounds good to me!  I tested and am using the updated .sh on my Mac.   Pretty 
neat tool btw.

Original comment by [email protected] on 13 Sep 2013 at 2:40

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Additionally to this, JAVA_HOME detection in OS X is done with java_home.
See 
http://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x
/ for example.

I've added similar changes to the JAVA_HOME detection in the jvm_top shell 
script and it fixes it on my OS 10.9 Mavericks Mac.

if [ -z "$JAVA_HOME" ] ; then
        if [ `uname` == 'Darwin' ] ; then
                JAVA_HOME=$(/usr/libexec/java_home)
        else
                JAVA_HOME=`readlink -f \`which java 2>/dev/null\` 2>/dev/null | \
                        sed 's/\/bin\/java//'`
        fi
fi

Original comment by [email protected] on 13 Nov 2013 at 4:45

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Just to add, i'm using latest homebrew version:

$ brew info jvmtop
jvmtop: stable 0.8.0
https://code.google.com/p/jvmtop/
/usr/local/Cellar/jvmtop/0.8.0 (5 files, 116K) *
  Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/jvmtop.rb

Original comment by [email protected] on 13 Nov 2013 at 4:47

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Mark, thanks for the update!

Two questions:

1. Do you have a clue why 
                JAVA_HOME=`readlink -f \`which java 2>/dev/null\` 2>/dev/null | \
                        sed 's/\/bin\/java//'

does not work on your OS X?
- According to comment #2, it works on at least one mac system
- even if the environment variable is named java_home, it should work 
nevertheless, because JAVA_HOME is set using the readlink autodection (see 
above) and only read afterwards

2. Regarding your suggestion: Will the path /usr/libexec/java_home work on 
every OX X system / JDK installation? If not - how should a safe OS X 
autodection of this path look like?

Original comment by [email protected] on 13 Nov 2013 at 7:44

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Maybe it's a different OS X version - for me, on Mavericks, the $JAVA_HOME 
should always be /Library/Java/Home. So by adding:

if [ `uname` = Darwin ]; then
    JAVA_HOME=/Library/Java/Home
fi

to the beginning of the shell script should always work.

Original comment by xuhdev on 30 Nov 2013 at 7:46

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Plus, skip the tools.jar code for OS X.

Original comment by xuhdev on 30 Nov 2013 at 7:48

from jvmtop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
@xuhdev: 
Thanks for the information.
I am wondering that tools.jar does not exist for OS X. jvmtop needs some 
classes within this jar - are they part of another jar?

Original comment by [email protected] on 19 Aug 2014 at 8:25

  • Changed state: NeedInfo

from jvmtop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.