Tomcat

Installing Tomcat on macOS 13.x Ventura Apache Tomcat 10.1.8 implements specifications that are part of the Jakarta EE 10 platform. Please note that applications that ran on Tomcat 9 and earlier will not run on Tomcat 10 without changes. Java EE based applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee […]

Installing Java on macOS 13 Ventura

For some time now, Java is not (pre-)installed anymore, let’s fix that. As I’m writing this, Java 19.0.1 is the latest version and Adoptium is one of the best places to find Prebuilt OpenJDK Binaries. Adoptium was known as AdoptOpenJDK, before the project was moved  to the Eclipse Foundation. All available versions for supported platforms can be found here. […]

Installing Java on macOS 12 Monterey

For some time now, Java is not (pre-)installed anymore, let’s fix that. As I’m writing this, Java 17.0.3 is the latest LTS (Long Term Support) version and Adoptium is one of the best places to find Prebuilt OpenJDK Binaries. Adoptium was known as AdoptOpenJDK, before the project was moved  to the Eclipse Foundation. All available versions for supported platforms […]

Even or Odd – Lambda Edition

Very recently, I showed you one of the probably easiest ways, to host your very own Java-based web-service. Remember, we added providedCompile group: ‘javax.servlet’, name: ‘javax.servlet-api’, version: ‘4.0.1’ to the build.gradle file, implemented a WebServlet, and finally dropped a war file into Tomcat’s webapps directory. I know, you’ll have a hard time finding paying customers […]

Serverless compute with Java, on AWS Lambda

Serverless computing is a cloud computing execution model, in which the cloud provider dynamically manages the allocation of machine resources. Serverless computing allows running applications and services, without thinking much about servers, runtime resources, or scaling issues. A very simple serverless computing application is intended to be used as a template project, a model, or starting […]

Installing Java 8 and Tomcat 8 on Debian Jessie or Raspbian or RedHat

Apache Tomcat is a Servlet/JSP container and version 8.0 implements the Servlet 3.1 and JavaServer Pages 2.3 specifications. Please note that Apache Tomcat 8.0 requires a Java Standard Edition Runtime Environment (JRE) version 7 or later. So we start with installing a recent version of Oracle’s JRE. Install Oracle JRE 8 on Debian Linux (or Raspbian) […]

How private are private fields after all?

Last week, I sent the following brain teaser: public class Foo { private int secret = 47; public Foo() { new Hacker().hack(this); } public String tellSecret() { return String.valueOf(secret); } public static void main(String[] args) { System.out.println(”How secret are private members? ..”); System.out.println(”Psst: ” + new Foo().tellSecret(); } } Can you write a void hack(Object […]

Code Inspection

I recently got the chance to participate in another code inspection, in which among other things, the following line of code was heavily criticized for using String concatenation on constants and not using a StringBuffer object for the string operation in general. FindFile.FindFileInClasspath( kPropFilePrefix + “*”+ kPropFileSuffix + kKeyProperties, vPropFiles ); This is from a J2EE […]