Posts

Showing posts from January, 2022

Sample bash script to start and stop Java application on Linux

Image
Do you have trouble running your Java/Springboot applications on Linux? How do you start and stop your Java applications on a Linux server? Executing a standalone Java application or Springboot executable jar in your local machine is simple and easy. You can use any of the Java IDE like Eclipse, Idea IntelliJ, NetBeans, etc. during development. If you have developed a Java application that you need to execute on a Linux machine then you need a shell script to start your Java executable jar file. Without a proper shell script, it is a big pain to provide all required arguments in a command prompt every time to execute your Java application. Here is a sample script that I prepared during my college days to execute my college project which I developed in Java. I have used this script for various other projects and I still found it helpful to execute my Springboot applications.  It is one of the traditional approaches not suitable for the applicat...

Creating simple Maven multi module project in Java

Image
In this post, I will discuss how to create a simple Maven multi-module project. In multi-module projects, we have multiple modules to be built using Maven. We have external dependencies as well as internal dependencies between different modules. Let's figure out how we can create multi-modules projects in Maven and how the internal and external dependencies are handled by Maven during the build process?. Technologies used: Maven 3.3.3 JDK 1.6 Simple Structure for Multi-Module Project There are multiple ways to create the structure for multi-module maven projects. It depends on the project requirements, code repository structure, and project lifecycle (need for parent pom release, packaging, etc.). One of the simplest structures is given below: Sample Project - RoketApp In order to understand in a better way, let us create a sample multi-module project - RocketApp , similar to the above structure. RocketApp consist of two module - rocket-core & rocket-ut...

How to update existing CCDT file (AMQCLCHL.TAB) for successful MQueue connection

The client channel definition table ( CCDT) file contains the MQ channels definitions and authentication information used by the client program/application to connect to the queue manager. It is a binary file so we cannot modify using any text editor. Change in the channel properties like SSLCIPH, USERID, etc. in Queue manager also required change in the CCDT file. Otherwise, it will break the application MQ connection. From IBM MQ v8.0 onwards we can create and modify the CCDT file on client machines directly. Below are the steps to modify the existing CCDT file. Set the necessary environment properties First set the location of CCDT on the client machine. You can do it using the following environment variables: MQCHLLIB – Specify the directory path where the CCDT file is located. MQCHLTAB – Specify the file name of CCDT (a default name – AMQCLCHL.TAB) #Only path (exclud...