BCS SDK Manager Install

The Software Development Kit Manager

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates. Formerly known as GVM the Groovy enVironment Manager, it was inspired by the very useful RVM and rbenv tools, used at large by the Ruby community.

The zip and unzip applications must be installed prior to installing SDK manager.

sudo apt-get install zip
sudo apt-get install unzip

The SDK install can commence by issuing the following commands.

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version

At this point installations may commence.

sdk list
sdk list >> lst.txt

The following depicts the list of available candidates on this workstation.

Available Candidates
q-quit                                  /-search down
j-down                                  ?-search up
k-up                                    h-help
Ant (1.10.1)                                             https://ant.apache.org/
Apache Ant is a Java library and command-line tool whose mission is to drive
processes described in build files as targets and extension points dependent
upon each other. The main known usage of Ant is the build of Java applications.
Ant supplies a number of built-in tasks allowing to compile, assemble, test and
run Java applications. Ant can also be used effectively to build non Java
applications, for instance C or C++ applications. More generally, Ant can be
used to pilot any type of process which can be described in terms of targets and
                                                               $ sdk install ant
AsciidoctorJ (1.5.6)                                     http://asciidoctor.org/
AsciidoctorJ is the official library for running Asciidoctor on the JVM. Using
AsciidoctorJ, you can convert AsciiDoc content or analyze the structure of a
parsed AsciiDoc document from Java and other JVM languages.
                                                      $ sdk install asciidoctorj
Ceylon (1.3.3)                                           http://ceylon-lang.org/
Ceylon is a modern, modular, statically typed programming language for the Java
and JavaScript virtual machines. The language features a flexible and very
readable syntax, a unique and uncommonly elegant static type system, a powerful
module architecture, and excellent tooling.
                                                            $ sdk install ceylon
CRaSH (1.3.0)                                            http://www.crashub.org/
The Common Reusable SHell (CRaSH) deploys in a Java runtime and provides
interactions with the JVM. Commands are written in Groovy or Java and can be
developed at runtime making the extension of the shell very easy with fast
development cycle.
                                                             $ sdk install crash
Gaiden (1.1)                                       http://kobo.github.io/gaiden/
Gaiden is a tool that makes it easy to create documentation with Markdown.
                                                            $ sdk install gaiden
Glide (0.9.2)                                      http://glide-gae.appspot.com/
Glide makes it incredibly easy to develop apps that harness the power of Google
App Engine for Java using expressiveness of Groovy and sweetness of Gaelyk's
syntactic sugar.
                                                             $ sdk install glide
Gradle (4.4)                                                  http://gradle.org/
Gradle is a build automation tool that builds upon the concepts of Apache Ant
and Apache Maven and introduces a Groovy-based domain-specific language (DSL)
instead of the more traditional XML form of declaring the project configuration.
Gradle uses a directed acyclic graph (DAG) to determine the order in which tasks
can be run.
                                                            $ sdk install gradle
Grails (3.3.2)                                               https://grails.org/
Grails is a powerful web framework, for the Java platform aimed at multiplying
developers productivity thanks to a Convention-over-Configuration, sensible
defaults and opinionated APIs. It integrates smoothly with the JVM, allowing you
to be immediately productive whilst providing powerful features, including
integrated ORM, Domain-Specific Languages, runtime and compile-time
meta-programming and Asynchronous programming.
                                                            $ sdk install grails
Griffon (1.5.0)                                    http://griffon-framework.org/
Griffon is desktop application development platform for the JVM.Inspired by
Grails, Griffon leverages the use of the Groovy language and concepts like
Convention over Configuration. The Swing toolkit is the default UI toolkit of
choice however others may be used, for example JavaFX.
                                                           $ sdk install griffon
Groovy (2.4.13)                                      http://www.groovy-lang.org/
Groovy is a powerful, optionally typed and dynamic language, with static-typing
and static compilation capabilities, for the Java platform aimed at multiplying
developers' productivity thanks to a concise, familiar and easy to learn syntax.
It integrates smoothly with any Java program, and immediately delivers to your
application powerful features, including scripting capabilities, Domain-Specific
Language authoring, runtime and compile-time meta-programming and functional
                                                            $ sdk install groovy
GroovyServ (1.1.0)                            https://kobo.github.io/groovyserv/
GroovyServ reduces startup time of the JVM for runnning Groovy significantly. It
depends on your environments, but in most cases, it’s 10 to 20 times faster than
regular Groovy.
                                                        $ sdk install groovyserv
Java (8u152-zulu)                                              https://zulu.org/
Java Platform, Standard Edition (or Java SE) is a widely used platform for
development and deployment of portable code for desktop and server environments.
Java SE uses the object-oriented Java programming language. It is part of the
Java software-platform family. Java SE defines a wide range of general-purpose
APIs – such as Java APIs for the Java Class Library – and also includes the Java
Language Specification and the Java Virtual Machine Specification.
                                                              $ sdk install java
JBake (2.5.1)                                                  http://jbake.org/
JBake is a Java based, open source, static site/blog generator for developers
and designers.
                                                             $ sdk install jbake
Kobalt (0.720)                                           http://beust.com/kobalt
Kobalt is a build system inspired by Gradle and Maven. It reuses the best
concepts from these two successful and popular build systems while adding a few
modern features of its own. Kobalt is written entirely in Kotlin and its build
files are valid Kotlin files as well.
                                                            $ sdk install kobalt
Kotlin (1.2.0)                                           https://kotlinlang.org/
Kotlin is a statically-typed programming language that runs on the Java Virtual
Machine and can also be compiled to JavaScript source code.
                                                            $ sdk install kotlin
kscript (2.2.1)                          https://github.com/holgerbrandl/kscript
Enhanced scripting support for Kotlin on *nix-based systems. kscript provides an
easy-to-use, very flexible, and almost zero-overhead solution to write
self-contained mini-applications with Kotlin.
                                                           $ sdk install kscript
Lazybones (0.8.3)                        https://github.com/pledbrook/lazybones/
Lazybones allows you to create a new project structure for any framework or
library for which the tool has a template.
                                                         $ sdk install lazybones
Leiningen (2.7.1)                                          http://leiningen.org/
Leiningen is the easiest way to use Clojure. With a focus on project automation
and declarative configuration, it gets out of your way and lets you focus on
your code.
                                                         $ sdk install leiningen
Maven (3.5.2)                                          https://maven.apache.org/
Apache Maven is a software project management and comprehension tool. Based on
the concept of a project object model (POM), Maven can manage a project's build,
reporting and documentation from a central piece of information.
                                                             $ sdk install maven
sbt (1.0.4)                                            http://www.scala-sbt.org/
SBT is an open source build tool for Scala and Java projects, similar to Java's
Maven or Ant. Its main features are: native support for compiling Scala code and
integrating with many Scala test frameworks; build descriptions written in Scala
using a DSL; dependency management using Ivy (which supports Maven-format
repositories); continuous compilation, testing, and deployment; integration with
the Scala interpreter for rapid iteration and debugging; support for mixed
Java/Scala projects
                                                               $ sdk install sbt
Scala (2.12.4)                                        http://www.scala-lang.org/
Scala is a programming language for general software applications. Scala has
full support for functional programming and a very strong static type system.
This allows programs written in Scala to be very concise and thus smaller in
size than other general-purpose programming languages. Scala source code is
intended to be compiled to Java bytecode, so that the resulting executable code
runs on a Java virtual machine. Java libraries may be used directly in Scala
code and vice versa. Scala is object-oriented, and uses a curly-brace syntax.
Scala has many features of functional programming languages, including currying,
type inference, immutability, lazy evaluation, and pattern matching. It also has
an advanced type system supporting algebraic data types, covariance and
contravariance, higher-order types, and anonymous types. Other features of Scala
include operator overloading, optional parameters, named parameters, raw
strings, and no checked exceptions.
                                                             $ sdk install scala
Spark (2.2.0)                                          https://spark.apache.org/
Apache Spark is an open-source cluster-computing framework. Spark provides an
interface for programming entire clusters with implicit data parallelism and
                                                             $ sdk install spark
Spring Boot (1.5.9.RELEASE)               http://projects.spring.io/spring-boot/
Spring Boot takes an opinionated view of building production-ready Spring
applications. It favors convention over configuration and is designed to get you
up and running as quickly as possible.
                                                        $ sdk install springboot
Sshoogr (0.9.25)                             https://github.com/aestasit/sshoogr
Sshoogr is a Groovy based DSL and command line tool for working with remote
servers through SSH.
                                                           $ sdk install sshoogr
Vert.x (3.5.0)                                                  http://vertx.io/
Vert.x is a tool-kit for building reactive applications on the JVM.
                                                             $ sdk install vertx
VisualVM (1.3.9)                                     https://visualvm.github.io/
VisualVM is a tool that provides a visual interface for viewing detailed
information about Java applications while they are running on a Java Virtual
                                                          $ sdk install visualvm

To review the usage of SDKMAN! click here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Install Tomcat 9 Mint

The web application for Java and Grails is the Apache Tomcat Server 9.

Step 1. Verify Java


Step 2. Get the server.

cd /opt
sudo wget http://www.us.apache.org/dist/tomcat/tomcat-9/v9.0.0.M22/bin/apache-tomcat-9.0.0.M22.tar.gz

Below observe the result of the wget command.

Next we must unzip Tomcat 9 and move the extracted sub directory to its permanent location.

Issue the following commands to facilitate installation.

sudo tar xzf apache-tomcat-9.0.0.M22.tar.gz
sudo mv apache-tomcat-9.0.0.M22 tomcat9

Below you can observe each command execution followed by the dir command to reveal the contents of the directory.

At this point we are ready to start the server by issuing the following two commands.

cd /opt/tomcat9/bin

The screen below illustrates the tomcat startup script.

Now issue the following command at the browser http://localhost:8080 and the following screen will appear.

The next step provides credentials for Tomcat Managers.

<user username="tomcat" password="secretPassword" roles="admin-gui,manager-gui"/>

Make sure you have this entry in the tomcat-users.xml file.

By default if Tomcat (version 9) is loaded on a server you use a client to access the interface but additional configuration is required.

Two files must be modified to relax the default restriction.  Both files are named context.xml.

The first location is /opt/tomcat9/webapps/host-manager/META-INF.  The second location is /opt/tomcat9/webapps/manager/META-INF.

<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"/>

This value should be commented out as indicated below.

<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"/> -->

You should be able to access all components of Tomcat (version 9) at this point without restrictions.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Java Date Difference

There are may solution to Java challenges. Today our challenge surrounds calculating elapsed years, months, days, hours, minuets and seconds between two dates.

The primary workhorse for this task is JodaTime utility. Click on the Releases option and the Downloads sub option to download jars and utilities. Simply add the downloaded jar to tour Java project and you are ready for action.

package dtt;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.joda.time.Interval;
import org.joda.time.Period;
public class ft {
	public static void main(1.5.0/docs/api/java/lang/String.html">String[] args) {
		1.5.0/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat simpleDateFormat = new 1.5.0/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat("dd/M/yyyy hh:mm:ss");
		try {
			5+0%2Fdocs%2Fapi+Date">Date date1 = simpleDateFormat.parse("10/10/2016 11:30:10");
			5+0%2Fdocs%2Fapi+Date">Date date2 = simpleDateFormat.parse("13/11/2017 20:35:55");
			// obj.printDifference(date1, date2);
			printDifference(date1, date2);
		} catch (1.5.0/docs/api/java/text/ParseException.html">ParseException e) {
	public static void printDifference(5+0%2Fdocs%2Fapi+Date">Date startDate, 5+0%2Fdocs%2Fapi+Date">Date endDate) {
		Interval interval = new Interval(startDate.getTime(), endDate.getTime());
		Period period = interval.toPeriod();
		1.5.0/docs/api/java/lang/System.html">System.out.println("  Start Date : " + startDate.toString());
		1.5.0/docs/api/java/lang/System.html">System.out.println("    End Date : " + endDate.toString());
		1.5.0/docs/api/java/lang/System.html">System.out.printf("Elapsed Time : " + "%d years, %d months, %d days, %d hours, %d minutes, %d seconds%n", period.getYears(),
				period.getMonths(), period.getDays(), period.getHours(), period.getMinutes(), period.getSeconds());

The execution of the program is listed below.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Install Oracle JDK On Linux Mint

OpenJDK does not support JavaFX while Oracle JDK does contain support for FX.  Installation of Oracle JDK on Mint is required.

To proceed with installation of Oracle JDK issue the following command.

sudo apt-get update && apt-get remove openjdk*

Traverse to the location where JDK is stored.

cd ~/Downloads

Unzip the JDK with the following command.

tar -zxvf jdk-8u131-linux-x64.tar.gz

Create a permanent directory for the JDK.

sudo mkdir -p /opt/java

Next send the JDK to its permanent location by issuing the following command.

sudo mv jdk1.8.0_131 /opt/java

Install the JDK bu issuing the following command.

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0_131/bin/java" 1

Set JDK Alternatives as follows.

sudo update-alternatives --set java /opt/java/jdk1.8.0_131/bin/java

Finally check the the version information.

$ java -version

You have successfully installed the Oracle JDK on Linux Mint.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Fix FX File Specification

In order to use strings to represent file specs in Java and c++ the back slash indicated the beginning of the escape sequence.  The double back slash indicates no escape sequence and the single back slash is interpreted.
This application takes care of file specification to be used in Java and c++ and places the results on the clipboard for subsequent use.

A 32-bit executable program may be down loaded by clicking here.
A 64-bit executable program may be down loaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS How To Launch A Java Archive (No Bat File)

To enable the launching of a java archive (jar) file traverse to the executable java archive’s location using windows explorer.  Right click on the jar file then select the Send To Desktop option.

Once the shortcut is created rename it to a name of your liking.  At this point you may also change its icon if so desire.

To launch the jar double click the icon or right click and choose the open option.

This technique will function for all the java tasks you care to launch from the windows desktop.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Java Swing Development

The current BCS Java development environment employs Eclipse Neon and the SwingBuilder plugin.

After the new java project was created click on the source folder and select New followed by the Other option until the SwingBuilder appears in the tree.


The following dialog appears and the FirstSwing name is keyed in the name field.


The SwingBuilder generated the code that appears below without coding a single line of code.

package swing;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JTable;
import java.awt.BorderLayout;
public class FirstSwing {
	private JFrame frmFirstSwingApp;
	 * Launch the application.
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FirstSwing window = new FirstSwing();
				} catch (Exception e) {
	 * Create the application.
	public FirstSwing() {
	 * Initialize the contents of the frame.
	private void initialize() {
		frmFirstSwingApp = new JFrame();
		frmFirstSwingApp.setTitle("First Swing App");
		frmFirstSwingApp.setBounds(100, 100, 450, 300);

Below is a screen shot of the SwingBuilder designer.swb03

To understand the layouts used by the swing designer click here.

A 32-bit executable program may be downloaded by clicking here.
A 64-bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Java

amb01Java programming language was employed to develop many computer applications.  Applications developed are stand alone as well as web based.

Grails is employed using Groovy programming language as well as other technologies to deliver rich internet applications via the Java Virtual Machine (JVM).

To read more about Java as a programming language click here.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Ubuntu Internet Server

There are those times when you are required to produce an active internet server to support delivery of web content and relational database management systems services.  My first choice is the Ubuntu headless server.  This server allows enough flexibility to support Apache, Java, Grails, Ruby on Rails, PHP, Yii, Action Message Format (AMF) Flash Builder and Flex,  (32 and 64 bit) thin client windows application and dot net web application servers. The RDBMS of choice is MySQL.  The significance of using this approach is that it supports thin client windows application to become conversant with MySQL.  This thin client does not require any additional middle ware layer such as ODBC or any other layer.

Another advantage of using Ubuntu is it supports practically all known web technologies and practically all domain specific languages (DSL).

On occasions I develop end user applications on the windows platform and the port them to the server via a web archive (WAR) file where Tomcat 8 application server hosts the allows access to the end user application.

tomcat 8

On other occasions I develop shell scripts to invoke the desired commands which builds the application.  This is typically used for Grails and Ruby On Rails applications.  Also shell scripts are useful whenever a series of shell command need to be executed for various purposes.

Normally when I develop software the Eclipse IDE is the IDE of choice.  There are those occasions when I use Delphi to develop 32 and 64 bit windows and OS X applications.  Plus Delphi has the environment to develop all the mobile and tablet applications in a single platform development environment.

Webmin is a windows based GUI that provides a vehicle to perform almost all the system administration tasks required to keep your server current.

web admin base
Below is a screen shot of the File Manager of Webmin.

webmin file manager

Below is an example of the editor for Webmin.

webmin edit

Putty a secured shell server that is also used to handle other server administration tasks.  The primary difference between Putty and Webmin is the lack of a GUI for issuing commands.  Putty is strictly a command line shell.


The secure connection employed by Putty offers a peace of mind and a sense of security for an environment as powerful as the command environment.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.