Skip to content

Blog

Install Package Based on Distros

Depending on the Linux distribution you are using, it will have a different Linux package manager. Here's a quick list of each package manager for popular distributions.

https://en.wikipedia.org/wiki/List_of_Linux_distributions

Debian Based

Example

Debian, Ubuntu, Linux Mint

Package Format: .deb
APT (Advanced Package Tool): The primary package management system.

sudo apt update: Updates the package index.
sudo apt upgrade: Upgrades all installed packages to their latest versions.
sudo apt install <package_name>: Installs a package.
sudo apt remove <package_name>: Removes a package.
sudo apt autoremove: Removes unnecessary packages.

Backend: dpkg (Debian Package) is the low-level tool that APT uses to handle .deb files.

dpkg -i <package.deb>: Installs a package file.
dpkg -r <package_name>: Removes a package.
dpkg -l: Lists all installed packages

Alternatives to Oracle Java / Web Start

There are a few alternatives to Oracle Java, including an alternative for Java WebStart (which Oracle deprecated).

Name Price JCK certified Versions OpenJFX/JavaFX¹ Supported platforms
Eclipse Adoptium free no 8+ no Linux (.deb, .rpm, .tar), Mac, Windows
Amazon Corretto free yes 8, 11 Bundled with 8 only Linux (.deb, .rpm, .tar), Mac, Windows
Azul Zulu free yes 6+ Bundled (choose JDK FX download) Linux (.deb, .rpm, .tar), Mac, Windows
Bellsoft Liberica free 8+ Bundled (choose Full JDK download) inux (.deb, .rpm, .tar), Mac, Windows
Oracle OpenJDK free yes 7+ Linux (⚠ .tar only), Mac, Windows
Red Hat OpenJDK free yes 8+ Separate download for Java 8, Windows only Linux (⚠ RHEL only), Windows

Due to Oracle no longer releasing updates for long-term support (LTS) releases under a permissive license, others have begun offering builds.Linux distributions have always offered their builds, and Windows also offers one now, which can be installed with the Windows Package Manager.

Clear the Java Web Start (javaws) cache

  1. Open your computer's DOS prompt by selecting the Start menu followed by the Run option. Then, enter command followed by pressing the Enter key.

  2. Type javaws at the DOS prompt followed by the Enter key to see the Java Web Start command-line options.

  3. Type javaws -Xclearcache followed by the Enter key to clear Java Web Start Cache on your computer. After the cache has been cleared, the local drive prompt will appear on the DOS prompt.

How to check all the apache httpd processes in Linux

When we want to find a list of processes running on a Linux box, we use.

ps -fax
Now apply the grep command to filter out only httpd process list.

ps -fax | grep httpd

or

ps -ef | grep httpd

To know the number of httpd processes running apply ‘wc -l’ command like

ps -fax | grep httpd | wc -l
ps -ef | grep httpd | wc -l

[Fixed] Unsigned application requesting unrestricted access to system

Subject/ Problem Description

The following error is displayed when launching applications signed with the MD5withRSA or MD5withDSA algorithms after upgrading to Java.

Unable to launch the application.
Unsigned application requesting unrestricted access to system
Unsigned application requesting unrestricted access to system. 
The following resource is signed with a weak signature algorithm MD5withRSA 
and is treated as unsigned: http://example.net/ExampleApplication.jar
Symptoms / Root Cause:

Applications signed with the MD5withRSA or MD5withDSA algorithms are treated as unsigned by Java starting with the Java 8 Update 131 release.

java vs javaw vs javaws

java: Java application executor which is associated with a console to display output/errors

javaw: (Java windowed) application executor not associated with console. So no display of output/errors. It can be used to silently push the output/errors to text files. It is mostly used to launch GUI-based applications.

javaws: (Java web start) to download and run the distributed web applications. Again, no console is associated.

All are part of JRE and use the same JVM.

Difference between java, javaw, javaws and javac

https://javapapers.com/core-java/java-vs-javaw-vs-javaws/

What is the difference between 'java', 'javaw', and 'javaws'?

JDK VS JRE VS JVM

JDK is the development platform, while JRE is for execution. JVM is the foundation, or the heart of the Java programming language, and ensures the program's Java source code will be platform-agnostic. JVM is included in both JDK and JRE—Java programs won't run without it.

How to set semaphore limits

In some scenario, the application had a semaphore limit issue. We need to increase some semaphore limits, such as semaphore array.

How do we set the semaphore limits?

What values should we set for the semaphore limits?

# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 1024              ## SEMMNI
max semaphores per array = 250           ## SEMMSL
max semaphores system wide = 256000      ## SEMMNS
max ops per semop call = 32              ## SEMOPM
semaphore max value = 32767

What is -h vs --help in Linux command?

-h vs --help

To sum up, the Linux shell provides access to help information for commands through both -h and —help.

However, —help is a more uniform and universal option that may be used with a variety of commands. Shorter and occasionally used, -h can have varying availability and significance.

It is advised to use --help to reliably obtain help information, particularly for commands that are unknown.