Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong usage of Java home #73

Open
timber-they opened this issue May 17, 2021 · 1 comment
Open

Wrong usage of Java home #73

timber-they opened this issue May 17, 2021 · 1 comment

Comments

@timber-they
Copy link

When calling the program, e.g.

 java -jar sjk.jar hh -p 12556

the first output is:

Java home points to C:\Program Files\Java\jre1.8.0_202 make sure it is not a JRE path

However, my JAVA_HOME variable is set as follows (result of set JAVA_HOME):

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202

So apparently the tool uses some other Java home, which I don't know how to change. I'd suggest to use the value of the JAVA_HOME environment variable instead. Currently I am unable to use the tool at all.

I downloaded the newest version using wget https://bit.ly/2H3Uqck -O sjk.jar. My OS is Microsoft Windows 10 Pro (Version: 10.0.19042 Build 19042) and I tried cmd and Powershell. Please let me know if you need any further information.

@pchang388
Copy link

I had the same issue, in our case we have a locked down environment where I would have to install openjdk-devel instead of just openjdk (only includes JRE not tools which is required for sjk), but since it's locked down I would have to request an install and wait X days/weeks. What I did was just install openjdsk-devel locally and copy it to target server then specify the entire path for java when running, like this:

$ /opt/druid/sjk-profiling/java-1.8.0-openjdk-1.8.0.332.b09-2.el8_6.x86_64/bin/java -jar sjk.jar stcap -p 3692004 -o druid-3692004-overlord.std -t 30s -i 50ms

Writing to /opt/druid/sjk-profiling/druid-3692004-overlord.std
Collected 651
Collected 1085
Collected 1519
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants