Skip to main content

Posts

Showing posts with the label Java

Maven (0) - Preface

During our java based microservice development, we extensively use build tools like  Maven or Gradle.  Usually, IDEs do a lot on our behalf or we just run some predefined commands without checking what's happening inside. Here in this series of 6 posts, I tried to explain Maven. Before I start talking about what Maven is, and its different components, let’s discuss the “why”. Why do we even need Maven?  For this, I’ve to first explain the nature of a Java-based project and also need to take you back in history. The “Build” Step. Java is a compilable language, Unlike Python or Javascript, which are interpreted. ie, the code we write in java, can not as-is run on a Java virtual machine (JVM). JVM understands only the bytecode. Therefore, in the Java world, there is always a need for an  intermediary step.  A step that compiles the java code files into bytecode. That's why after writing the java code, we “somehow” create some deployable (jar, war, ear) to run on ma...

Installing & switching between multiple JDK on macOS

N one of the operating systems comes with a preinstalled JDK, including macOS. In this post, let's see how to manually install and manage multiple JDK on macOS. If you are not interested in any explanation, go to the very end of the post for commands. But I’ll recommend reading it. A well-known process for installing any software on macOS is, either clicking an app icon or drag-and-drop the app icon into the Applications folder. This hides all installation details under the fancy app icons and an in-progress bar. However, we developers like to see the logs and play with the command line tools. For this purpose,  Linux Distros  use package managers like  yum  or  apt-get . But as with all things Apple, Most common free software don't work in macOS. This is where  HomeBrew  comes to the rescue HomeBrew As the tool's homepage says, it is The Missing Package Manager for macOS. Homebrew is the easiest and most flexible way to install the UNIX tools Apple d...