Articles about Java

The Java programming language is a popular object-oriented programming language that is used for creating many server and mobile applications in the world.

In this page, you will find articles relating to Java. Some of the topics include Java references, Java coding and Java application setup.

How I make my Java programs run faster on my Raspberry Pi 3

When my first attempt to install GitBucket on my Raspberry Pi 3 highlighted to me that it was the JVM that caused GitBucket to have sluggish performance, I did not invest more time to improve the performance of the JVM that I had installed on my Raspberry Pi 3. Instead, I went on to install Go Git Service on my Raspberry Pi 3 to act as the Git server to manage the source codes of my hobby projects.

However, I just couldn’t get over my belief that Java programs would perform badly on my Raspberry Pi 3; after all Java was the first programming language that I learnt and I often use it to build software at work. Furthermore, with an Ubuntu Server 15.10.3 setup on my Raspberry Pi 3, I could use my Raspberry Pi 3 as an integration server for my Java hobby projects and be pretty sure that if my Java hobby projects run on my Raspberry Pi 3, they will most probably run on a Ubuntu Server 15.10.3 DigitalOcean droplet as well.

After spending some time researching the topic, I did manage to make my Java programs run around 10 times faster on my Raspberry Pi 3. This post documents the steps that I went through to speed up my Java programs on my Raspberry Pi 3.

Setting up GitBucket on Raspberry Pi 3 with an Ubuntu Server 15.10.3 image

With multiple Raspberry Pis around the house, it was time for me to setup a Git server to synchronise the source codes residing on my development laptop with those that are deployed on my Raspberry Pi servers.

As I am using GitHub at my workplace, I seek to emulate similar development operations at home. GitBucket seems to be an ideal candidate for my home Git server since it comes as a war file having API compatibility with GitHub.

Since I had created a LEMP server on my Raspberry Pi 3 with on Ubuntu Server 15.10.3, it makes sense for me to setup my GitBucket server on it.

This post describes how I setup GitBucket on my Raspberry Pi 3 with an Ubuntu Server 15.10.3 image. To make this post complete, the first seven steps are taken from previous posts.

What are the benefits that the Java Programmer and Java Developer certifications bring to me

It had been over 10 years since I got my both my Sun certified Java Programmer and Sun certified Java Developer certifications.

Along my career path, I had met studious individuals who had asked me whether they should pursue the Java Programmer and Developer certifications.

A good way for me to answer their questions will be to reflect on how the Java Programmer and Java Developer certifications had contributed towards my career in software development.

Hence, I write this post to discuss the benefits that my Java Programmer and Java Developer certifications had brought to me.

Books that helped me understood Java and became proficient in it

The Java programming language had opened up a lot of opportunities for me ever since I was acquainted with it. Most people say that learning Java is easy, however mastering it is hard. For me, mastering Java could have been harder if not for some of the books that I had read. In this post, I list some of the books that had taught me a great deal of Java, so much so that I am able to be proficient with it.

How to upload a file via a HTTP multipart request in Java without using any external libraries

There was this situation when there was a need for my applet to send some log files (generated by some desktop application) on the remote clients.

To keep my applet lean, I chose to implement this file upload function by sending a HTTP multipart request when my applet loads on the remote client’s browser. Policies were in place to ensure that my applet was able to read the log files and send them back to a web server which will collect the log files.

This post documents how I can upload a file by sending a HTTP multipart request in Java without using any external libraries. For the sake of brevity, I used the server endpoint that I had discussed earlier to accept the file from the codes that will be mentioned in this post.

Books that prepared me well for my Java Programmer and Java Developer certifications

Back in the days when I was still a student, I found some motivation to pursue the Java Programmer and Java Developer certifications. As a student, I did not have the extra cash to pay for the Java preparation courses provided by education institutions which were marketed to increase the chances of students passing the the exams required to earn the Java Programmer and Java Developer certifications. As such, I chose to go the cheaper route of reading books that I could find in the market back then.

This post lists the books that I had used to prepare myself for the Java Programmer and Java Developer certifications from Sun Microsystems.

How to create a thumbnail of an image in Java without using external libraries

I had a situation when I wanted to display thumbnails of the images that my user had uploaded to my web application. A straightforward way could be to return the images in its entirety and use css techniques to scale down the image into a thumbnail. However, this is costly for my users who mainly access my web application from mobile devices.

One strategy for optimizing the web experiences of my users would be to generate the thumbnails at the server end so as to reduce the sizes of the HTTP responses that my server sends back to the mobile devices. And to reduce bloat from external libraries, I decided to use the facilities provided from Java standard libraries.

This post documents how I create a thumbnail from an image without using external Java libraries. For the sake of brevity, let’s assume that we had downloaded an image via HTTP GET from a web server and saved that image to the path /images/sample.jpg.

How to send HTTP GET request with Java without using any external libraries

There was this time when I need to build a program to check whether my web server is running fine. To determine that my web server is running fine, I wrote a Java applet that sends a HTTP GET to one of my web resources when the applet runs for the first time. And to keep the applet light, I look into Java in-built features for sending HTTP GETs to my server. This post documents a proof of concept that I did to communicate with my server endpoint via HTTP GET using Java in-built features.

How to send HTTP POST request with Java without using any external libraries

I need to create a Java solution that will be able to send some bulk processing information back to a HTTP server endpoint. The Java solution should be as lean as possible, using as many facilities that Java provides out of the box. Luckily for me, Java do provides the java.net.HttpURLConnection class for me to build my solution. This post details a proof of concept which I did to get to know more about the java.net.HttpURLConnection class.

In this proof of concept, I create a Java console program that will hit the php endpoint which I had created earlier to proof that I can use jQuery to push a dynamically generated file to the web browser based on the user’s input.