Skip to main content
Version: 1.0

Guide

This charter include JDK and Java application Server: Tomcat, Jetty

Tutorial

Use Maven

A sample to use Maven

mvn archetype:generate -DgroupId=com.companyname.automobile -DartifactId=trucks -DarchetypeArtifactId=maven-archetype-webapp  -DinteractiveMode=false

Web Framework

Change JDK version

Troubleshoot

Parameters

Path

Java installation directory:  /data/java
Java logs directory:  /data/logs/java

Tomcat install directory: /usr/local/tomcat
Tomcat configuration file: /usr/local/tomcat/conf/server.xml
Tomcat logs: /var/log/tomcat

CLI

These tools from docs: Tools and Commands Reference

  • javac: You can use the javac tool and its options to read Java class and interface definitions and compile them into bytecode and class files.
  • javap: You use the javap command to disassemble one or more class files.
  • javadoc: You use the javadoc tool and its options to generate HTML pages of API documentation from Java source files.
  • java: You can use the java command to launch a Java application.
  • appletviewer: You use the appletviewer command to launch the AppletViewer and run applets outside of a web browser.
  • jar: You can use the jar command to create an archive for classes and resources, and to manipulate or restore individual classes or resources from an archive.
  • jlink: You can use the jlink tool to assemble and optimize a set of modules and their dependencies into a custom runtime image.
  • jmod: You use the jmod tool to create JMOD files and list the content of existing JMOD files.
  • jdeps: You use the jdeps command to launch the Java class dependency analyzer.
  • jdeprscan: You use the jdeprscan tool as a static analysis tool that scans a jar file (or some other aggregation of class files) for uses of deprecated API elements.

Version

java -v

Service

# Docker
sudo docker start jdk
sudo docker stop jdk
sudo docker restart jdk
sudo docker stats jdk