We upgraded the project from Java 11 to Java 17, and mvn test hits the Fatal error compiling: error: invalid target release: 17 . This article will show how to fix this Maven error.
Maven compiles and hits the following fatal error messages: Fatal error compiling: error: invalid target release: 1.11 . The article will show you how to fix this error
Here’s a simple “HttpSessionListener” example to keep track the total number of active sessions in a web application. If you want to keep monitor your session’s create and remove behavior, then consider this listener.
Learn how to use JAR tool: 1 – Create a jar file, 2 – Update a jar file , 3 – Extract a jar file , 4 – List files from a jar file, 5 – Add manifest into jar file
In Java, you can use manifest file to define application’s entry point, adding classpath or package version for a JAR file. In this short tutorial , we will show you how to add a custom manifest file into a Jar file.
In this tutorial, we will show you how to create a executable JAR – When you double click on it, it runs the defined main class in manifest file.
Is there a function in Java to retrieve the Tomcat (Catalina) home directory? Yes, Tomcat home directory or Catalina directory is stored at the Java System Property environment. If the Java web application is deployed into Tomcat web server, we can get the Tomcat directory with the following command: System.getProperty(“catalina.base”);
The Java development kit (JDK) contains tools for Java development, and the Java Runtime Environment (JRE) contains a JVM to convert byte code .class to machine code, and execute it, in short, the JRE runs Java program. We can use javac -version to find out the version of the installed JDK. We can use java -version to find out the version of the installed JRE. The JDK and JRE versions can be different on the same computer. Multiple JDK and JRE versions are allowed on the same computer; it is better to find out which version is configured in the system classpath to run or compile the Java program.
Apache Tomcat is a web server and servlet container that is used to serve Java applications. It’s an open source implementation of the Jakarta Servlet, Jakarta Server Pages, and other technologies of the Jakarta EE platform. In this tutorial, you’ll deploy Apache Tomcat 10 on Ubuntu 20.04. You will install Tomcat 10, set up users and roles, and navigate the admin user interface.