Comments (8)
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.
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.
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.
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.
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.
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.
Plus, skip the tools.jar code for OS X.
Original comment by xuhdev
on 30 Nov 2013 at 7:48
from jvmtop.
@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)
- APIs for jvmtop HOT 2
- NOT COMPATIBLE WITH RED_HAT_5 HOT 10
- sles11 s390x with IBM SDK - java.io.IOException: ATTACH_ERR HOT 1
- Enhancement : Need Break-up details on NHCUR HOT 2
- Connecting to a PID with -p or --pid does not work HOT 1
- Don't cut thread list in detail mode (as option) HOT 2
- Add sort options in detail mode HOT 1
- reports incorrect cpu usage when running on multi core server HOT 3
- ERROR: Connection refused/access denied HOT 5
- jvmtop.sh cannot be linked HOT 1
- Memory leak in VMOverviewView HOT 1
- HPMAX returns the committed memory of the application and not the actual memory allocated HOT 1
- ERROR: Connection refused/access denied HOT 1
- Processes running under a user with no shell cannot be examined by jvmtop HOT 2
- "Once" function does not show threads for PID
- Improve error message for AttachNotSupportedException
- jvmtop.bat throws an exception when JAVA_HOME has spaces
- JavaTop not running on Ubuntu 14.0
- Operation not permitted
- Exception in thread "main" java.lang.NoClassDefFoundError: com/jvmtop/JvmTop
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jvmtop.