Jdk Osx



  1. Osx Jdk 8 Download
  2. Jdk Os X
  3. Jdk Osx Download
  1. Get Started with NetBeans from a Mac OSX Installer Officially, it is important that you verify the integrity of the downloaded files using the PGP signatures (.asc file) or a hash (.sha1 files). The PGP keys used to sign this release are available here.
  2. Android JDK Download. Mac OSX Linux; 1.8 u77: 32位(提取码: c98h)/64位(提取码: 2c9i) 64位.
  3. The Java JDK ships with the jps command which lists all Java process ids. You can run this command like this: jps -l 70660 sun.tools.jps.Jps 70305. Note: In Linux and UNIX, you may have to run this command as sudo -u user jps -l, where 'user' is the username of the user that the Java process is running as.
  4. AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.
Jdk download mac os x

How can I take thread dumps from a JVM on Linux, UNIX or Windows?

A thread dump is a list of all the Java threads that are currently active in a Java Virtual Machine (JVM).

Click to see our best Video content. Take A Sneak Peak At The Movies Coming Out This Week (8/12) Iconic quotes from the cast of The Office.

There are several ways to take thread dumps from a JVM. It is highly recommended to take more than 1 thread dump. A good practice is to take 10 thread dumps at a regular interval (for example, one thread dump every ten seconds).

The first piece of information you will need to be able to obtain a thread dump is your Java process's PID.

The Java JDK ships with the jps command which lists all Java process ids. You can run this command like this:

Jdk Osx

jps -l 70660 sun.tools.jps.Jps 70305

Note: In Linux and UNIX, you may have to run this command as sudo -u user jps -l, where 'user' is the username of the user that the Java process is running as.

If this doesn't work or you still cannot find your Java process, (path not set, JDK not installed, or older Java version), use

  • UNIX, Linux, and Mac OS X: ps -el | grep java
  • Windows: Press Ctrl+Shift+Esc to open the task manager and find the PID of the Java process

If installed/available, we recommend using the jstack tool. It prints thread dumps to the command line console.

To obtain a thread dump using jstack, run the following command:
jstack -l <pid>

You can output consecutive thread dumps to a file by using the console output redirect/append directive:
jstack -l <pid> >> threaddumps.log

Notes:

Osx Jdk 8 Download

  • The jstack tool is available since JDK 1.5 (for JVM on Windows, it's available in some versions of JDK 1.5 and JDK 1.6 only).
  • jstack works even if the -Xrs jvm parameter is enabled
  • It's not possible to use the jstack tool from JDK 1.6 to take threaddumps from a process running on JDK 1.5.
  • In Linux and UNIX, you need to run the command as the user that owns the java process:
    sudo -u java-user jstack -l <pid>
    (<java-user> should be replaced with the id of the user that the Java process is running as)
  • In Windows, if you run jstack and get the error 'Not enough storage is available to process this command' then you must run jstack as the windows SYSTEM user or the user that owns the java process. You can do this by using psexec which you can download here. To run jstack as SYSTEM user, use a command like this:
    psexec -s jstack <pid> >> threaddumps.log
    If you are unable to install psexec on the server, then you can create a .bat file containing the command and run it using the Windows task scheduler (as a different user).
  • If the java process isn't responding, then it can sometimes help to use the option -J-d64 (on 64 bit systems), for example:
    jstack -J-d64 -l <pid> >> threaddumps.log
  • If the jstack command (jstack -l <pid> >> threaddumps.log) throws the error [1] below, then run the command as the user that owns the java process. For example:
    sudo -u sling jstack -l <pid> >> threaddumps.log

jstack script

Here's a script (adapted from the one on eclipse.org) that will take a series of thread dumps using jstack. It also takes the thread level cpu usage using top command as well.

Just run it like this:
sudo -u <user> jstackSeries.sh <pid> <aemserveruser> <count> <delay>

For example:
sudo -u aemuser jstackSeries.sh 1234 aemserveruser 10 3

  • 1234 is the pid of the Java process
  • cq5serveruser is the Linux or UNIX user that the Java process runs as
  • 10 is how many thread dumps to take
  • 3 is the delay between each dump

Note: The top output has the native thread id in decimal format while the jstack output has the nid in hexadecimal. You can match the high cpu thread from the top output to the jstack output by converting the thread id to hexadecimal.

In addition to the script above, we also have a similar Windows Powershell script and an Adobe AEM specific script on github.

Mac

Thread Dump Tool for Adobe Experience Manager

If you are using Adobe Experience Manager product then you can install this tool to have a simple UI for generating thread dumps.

Alternative ways to obtain a thread dump

If the jstack tool is not available to you then you can take thread dumps as follows:
Note: Some tools cannot take thread dumps from the JVM if the commandline parameter -Xrs is enabled. If you are having trouble taking thread dumps then please see if this option is enabled.

Jdk Os X

UNIX, Mac OS X, and Linux (JDK 1.4 or lesser version)

On UNIX, Mac OS X, and Linux, you can send a QUIT signal to the Java process to tell it to output a thread dump to standard output.

  1. Run this command to do this:
    kill -QUIT <pid>
    You may need to run this command as sudo -u user kill -QUIT <pid> where 'user' is the user that the Java process is running as.
  2. If you are starting CQSE using the crx-quickstart/server/start script then your thread dumps will be output to crx-quickstart/server/logs/startup.log. If you are using a third-party application server such as JBoss, WebSphere, Tomcat, or other, see the server's documentation to find out which file the standard output is directed to.
Windows:
JDK 1.X
  1. Download javadump.exe (attached below).
  2. Start the JVM with these three arguments (they must be in the right order):
    -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=C:tempjvmoutput.log
  3. Press Ctrl+Shift+Esc to open the Task Manager.
  4. Find the PID of the Java process.
  5. From the command line, run
    javadump.exe <pid>
  6. The thread dump will appear in the jvmoutput.log file mentioned in step 2.
JDK 1.6

Get a thread dump from jconsole tool, by using a plugin: [0]

Here's how you can request a thread dump:

  1. Add the following parameter to the jvm running Communique : -Dcom.sun.management.jmxremote
  2. Download and install JDK 1.6 (if not done yet).
  3. Download and extract the Thread Dump Analyzer utility. [1]
  4. Run jconsole.exe of JDK 1.6:
    jconsole.exe -pluginpath /path/to/file/tda.jar
  5. Click the Thread dumps tab.
  6. Click the Request Thread Dump link.
Note: If you are running AEM 6.* and want to observe the running threads, you can request http://<host>:<port>/system/console/status-Threads to get a thread list. However, please note that these thread dumps will not work with thread dump analysis tools such as samurai or tda.

Applies to

All Adobe Products running in a JVM

Thread dump analysis tools:

[0] http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
[1] https://github.com/irockel/tda
[2] https://fastthread.io/
[3] https://www.ibm.com/support/knowledgecenter/en/SSLLVC_5.0.0/com.ibm.esupport.tool.tmda.doc/docs/readme.htm

Download

Tomcat Setup

Table of Contents

Jdk OsxMac

Introduction

Jdk Osx Download

There are several ways to set up Tomcat for running on different platforms. The main documentation for this is a file called RUNNING.txt. We encourage you to refer to that file if the information below does not answer some of your questions.

Windows

Installing Tomcat on Windows can be done easily using the Windows installer. Its interface and functionality is similar to other wizard based installers, with only a few items of interest.

  • Installation as a service: Tomcat will be installed as a Windows service no matter what setting is selected. Using the checkbox on the component page sets the service as 'auto' startup, so that Tomcat is automatically started when Windows starts. For optimal security, the service should be run as a separate user, with reduced permissions (see the Windows Services administration tool and its documentation).
  • Java location: The installer will provide a default JRE to use to run the service. The installer uses the registry to determine the base path of a Java 8 or later JRE, including the JRE installed as part of the full JDK. When running on a 64-bit operating system, the installer will first look for a 64-bit JRE and only look for a 32-bit JRE if a 64-bit JRE is not found. If a JRE cannot be found when running on a 64-bit operating system, the installer will look for a 64-bit JDK. Finally, if a JRE or JDK has not been found, the installer will try to use the JAVA_HOME environment variable. It is not mandatory to use the default JRE detected by the installer. Any installed Java 8 or later JRE (32-bit or 64-bit) may be used.
  • Tray icon: When Tomcat is run as a service, there will not be any tray icon present when Tomcat is running. Note that when choosing to run Tomcat at the end of installation, the tray icon will be used even if Tomcat was installed as a service.
  • Defaults: The defaults used by the installer may be overridden by use of the /C=<config file> command line argument. The configuration file uses the format name=value with each pair on a separate line. The names of the available configuration options are:
    • JavaHome
    • TomcatPortShutdown
    • TomcatPortHttp
    • TomcatMenuEntriesEnable
    • TomcatShortcutAllUsers
    • TomcatServiceDefaultName
    • TomcatServiceName
    • TomcatServiceFileName
    • TomcatServiceManagerFileName
    • TomcatAdminEnable
    • TomcatAdminUsername
    • TomcatAdminPassword
    • TomcatAdminRoles
    By using /C=... along with /S and /D= it is possible to perform fully configured unattended installs of Apache Tomcat.
  • Refer to the Windows Service How-To for information on how to manage Tomcat as a Windows service.

The installer will create shortcuts allowing starting and configuring Tomcat. It is important to note that the Tomcat administration web application can only be used when Tomcat is running.

Unix daemon

Tomcat can be run as a daemon using the jsvc tool from the commons-daemon project. Source tarballs for jsvc are included with the Tomcat binaries, and need to be compiled. Building jsvc requires a C ANSI compiler (such as GCC), GNU Autoconf, and a JDK.

Before running the script, the JAVA_HOME environment variable should be set to the base path of the JDK. Alternately, when calling the ./configure script, the path of the JDK may be specified using the --with-java parameter, such as ./configure --with-java=/usr/java.

Using the following commands should result in a compiled jsvc binary, located in the $CATALINA_HOME/bin folder. This assumes that GNU TAR is used, and that CATALINA_HOME is an environment variable pointing to the base path of the Tomcat installation.

Please note that you should use the GNU make (gmake) instead of the native BSD make on FreeBSD systems.

Tomcat can then be run as a daemon using the following commands.

When running on Java 9 you will need to additionally specify the following when starting jsvc to avoid warnings on shutdown.

You may also need to specify -jvm server if the JVM defaults to using a server VM rather than a client VM. This has been observed on OSX.

jsvc has other useful parameters, such as -user which causes it to switch to another user after the daemon initialization is complete. This allows, for example, running Tomcat as a non privileged user while still being able to use privileged ports. Note that if you use this option and start Tomcat as root, you'll need to disable the org.apache.catalina.security.SecurityListener check that prevents Tomcat starting when running as root.

jsvc --help will return the full jsvc usage information. In particular, the -debug option is useful to debug issues running jsvc.

The file $CATALINA_HOME/bin/daemon.sh can be used as a template for starting Tomcat automatically at boot time from /etc/init.d with jsvc.

Note that the Commons-Daemon JAR file must be on your runtime classpath to run Tomcat in this manner. The Commons-Daemon JAR file is in the Class-Path entry of the bootstrap.jar manifest, but if you get a ClassNotFoundException or a NoClassDefFoundError for a Commons-Daemon class, add the Commons-Daemon JAR to the -cp argument when launching jsvc.