JStack for Java 1.5? - java

I want to use the JStack in a Java 1.5 VM. I found in several web pages that a version of JStack exists for this version, but I can't find it.
I have versions 1.5.0_22 and 1.5.0_10 of the JDK and jstack is not included. It is included in Java SDK 1.6
Is it a separate download? or is it included in a different revision?

From
http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstack.html
jstack is not currently available on Windows platforms or on the Linux Itanium platform.
Do you happen to use Windows or Itanium?

Related

How to monitor JVM with JRE only

I have a Centos7 server and I want to monitor the JVM in order to identify performance issue but I have only JRE installed on the prod environment as follows:
Based on the research I saw there were some tool available such as Java Mission Control but it is only available with JDK but I have JRE installed. Any idea what open source tool I can use to monitor the jvm on centos with only JRE installed?
jattach gives you access to a few powerful tools, namely jcmd which you can then use to run various diagnostics commands against the java app.
Works with plain JRE - check https://github.com/apangin/jattach
See also https://docs.oracle.com/en/java/javase/17/docs/specs/man/jcmd.html

When JRE is a subset of JDK, why do we have to download JRE separately in a PC?

When the JDK already includes JRE for the execution of code, why do I have to download JRE separately to execute my java code is the doubt that's bothering me
As far as I remember this depends on your OS, browser and JDK version.
Eg. if you're using a 64-bit OS and installed a 64-bit JDK, but are using a 32-bit browser, then you might have to install a 32-bit JRE if you need Java support in the browser.
Otherwise a separate JRE installation should not be required, since the JDK installation also installs the JRE.
JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on.
JDK: It is a group of utilities one needs to develop programs in Java including JRE, and the compilers and tools (like JavaDoc, and Java Debugger) to convert the source code into bytecode.
Refer: http://javarevisited.blogspot.de/2011/12/jre-jvm-jdk-jit-in-java-programming.html
Similar, post is there on below link as well.
What is the difference between JDK and JRE?

Is there any way to run a Windows-based Eclipse with a Linux-based Java SDK?

I want to test my code against the (beta) IBM Java SDK 8.0, which will be a part of IBM Java products in future and support Java SE 8. The beta version is available for download from here, but it's only available for Linux on x86 (/ x86_64), and not Windows. But my development environment is Windows. Of course, I could run the Java SDK through Cygwin or equivalent, so it's possible to execute the binaries, but is there any easy way to trigger them from an Eclipse instance running on Windows?
I don't think you can do this. I would be surprised if it worked under Cygwin too.
The usual strategy for this type of problem is to create a Linux VM and test using that. There are free VM solutions around such as VirtualBox.

What version of visualvm works with Java 6?

I'm using Mac 10.9.1 and Java 1.6.45 . It is not an option for me to upgrade my Java version at this time. I want to use visualvm to analyze heap dumps, but the latest version on http://visualvm.java.net/download.html only works with Java 7 and above. What version of VisualVM will work with Java 6 and where can I find this mystical version?
VisualVM 1.3.6 works with JDK 6. You can download it from this page: http://visualvm.java.net/releases.html. You can also install JDK 7 next to JDK 6 and use VisualVM 1.3.7.
According to this Oracle site it should be a command-line tool built in to your JDK distribution. From here, it was first bundled in Java 6u7, so you should definitely have it.

Mint Linux - Downgrade Java to 1.5

Currently, I am running Mint Linux (Release 9). I need to downgrade Java from version 1.6 to 1.5, and have been trying to figure out how to go about this. So far, I've had no luck. The package manager doesn't seem to have it.
Does anyone have any suggestions?
Thanks,
- Chris
As you explained in your comments, you need JDK 5 because you are working on the source code of Android itself and the instructions say:
Ubuntu Linux (64-bit x86)
... JDK 5.0, update 12 or higher.Java 6 is not supported, because of incompatibilities with #Override.
You can do this:
Uninstall any Java that you got via the package system of your Linux distro
Download JDK 5 Update 22 for Linux
Run the JDK installer with sudo, install it wherever you like (for example in /opt or /usr/local)
Set your PATH environment variable to include the bin directory of the JDK
There should be no need to downgrade your Java installation to develop for Java 1.5. If you are using a tool such as Eclipse, you can set the project attributes so that it tests for Java 1.5 compatibility, and gives errors if you use a Java 6 feature. If you absolutely insist on having a Java 1.5 JDK then just install it alongside the default installation and use it in place of Java 1.6.
This should be a question for SuperUser.com, but my recommendation is to download the 1.5 JDK, and change Java path to where you downloaded it.
Or you could use the info on Ubuntu Help, it should work for you since Mint is based on Ubuntu. That link explains how to select the version of Java.

Categories