How to Sort a Map by key in Java?

How to Sort a Map by key in Java?

Here we will see how to sort a Map by key in java. There are two ways to sort a Map by Key –   First Approach Second Approach

Read More

How to make SFTP or SSH connection using public key authentication in java?

How to make SFTP or SSH connection using public key authentication in java?

Using SFTP or SSH public key authentication to make the connection to remote system is more secure and robust method than login with account password. SSH public key authentication is an authentication method that relies on asymmetric cryptographic algorithms that generate a pair of  separate keys, one private and the other public. Private Key is the secret key …

Read More

How To Setup SSH Public Key Authentication To Connect Remote System ?

How To Setup SSH Public Key Authentication To Connect Remote System ?

Overview Nowadays passwords are not much secured. If you pick a strongest password including all upper case, lower case alphabet and numbers with special characters, the password is still susceptible to the brute-force attack. It’s a human nature to use a same password for different remote hosts which can put you at more risk of a …

Read More

How to write Bubble Sort in Java ?

How to write Bubble Sort in Java ?

We all have learnt sorting techniques in our college academic curriculum. Out of those sorting techniques the simplest technique we learnt is Bubble Sort in Java. The Bubble sort takes an array of numbers and sort them within the array indexes in either ascending or descending order. Bubble sort is simplest of all sorting techniques …

Read More

How To Send a Plain Text EMail in Java using JavaMail API ?

How To Send a Plain Text EMail in Java using JavaMail API ?

Java Mail API is used to create your own email client. This class provides the code required to model your email client similar to Outlook, Hotmail and many others. In JavaMail you’ll find APIs and provider implementations allowing you to develop fully functional email client applications. Below java program shows you how to send a plain text …

Read More

How to use Preferences API to store application/Program configurations ?

How to use Preferences API to store application/Program configurations ?

Introduction Preferences (Java.util.pref) API is included in JDK can be used to remember and retrieve application preferences. Using this API you can manage preference data such as storing, retrieving, removing and cleaning preference data. This API is not intended to save application data. Also it reduces the burden of application developer to write the code …

Read More

Nodejs HelloWorld Example

Nodejs HelloWorld Example

This tutorial is the quick guide to show you how to write the classic “Hello World!!!” example in Nodejs. This example is using the 0.8.x version of Nodejs installed on Windows 7. Install Nodejs Refer this article for installing Node.js on Windows. This installation very easy and it starts with downloading the executable on windows …

Read More

Installing Node.js on Windows

Installing Node.js on Windows

In this tutorial we will show you how to install the Node.js on Windows and Linux. This example shows you installation of Node.js version 0.8.16. 1. Node.js Installation on Windows Below steps shows you how to install Node.js on Windows – Download Node.js Download Node.js from official Node.js website. Choose appropriate version and click to …

Read More

JavaServer Faces (JSF) 2.0 Tutorial

JavaServer Faces (JSF) 2.0 Tutorial

Introduction to JavaServer™ Faces (JSF) Java Server Faces (JSF) is the MVC web framework based on Java Programming Language. JSF mainly focus on simplifying the building of web user interface by providing ready to use UI tags. It simplifies the assembling of reusable UI components in a page. Javaserver Faces is based on a component-driven …

Read More

JavaServer Faces (JSF) 2.0: Hello World Example

JavaServer Faces (JSF) 2.0: Hello World Example

To start with any tutorial is to start Hello World Example. In this tutorial we will see JSF 2.0 Hello World Example below   Download Source code for tutorial Download here – JavaServerFaces 2.0 – Hello World Example – Source code Setup Development Environment For JSF 2.0 Hello World Example To start with JavaServer Faces Hello …

Read More

Video Tutorial: Getting Started with Struts

Video Tutorial: Getting Started with Struts

Struts is the one of the most famous, classic and proven Model-View-Contraller (MVC) framework. Struts 1.x is a complete web framework, provides complete web form components, validator, internalization, error handling, tiles layout, low learning curve and easy to implement it. The framework provides three key components: A “request” handler provided by the application developer that is mapped …

Read More

How to download a file from SFTP Server using Zehon API ?

How to download a file from SFTP Server using Zehon API ?

Zehon SFTP is a file-transfer component for Java language that provides secure file system access over an SSH channel using the SFTP protocol. It makes it easy to transfer files between your application and Unix/Windows SSH servers. All popular SSH/SFTP and proxy servers are supported. Below is the feature list for Zehon SFTP Stable and …

Read More

How to upload a file to SFTP server using Zehon API ?

How to upload a file to SFTP server using Zehon API ?

Compared to the earlier SCP protocol, which allows only file transfers, the SFTP protocol allows for a range of operations on remote files – it is more like a remote file system protocol. An SFTP client’s extra capabilities compared to an SCP client include resuming interrupted transfers, directory listings, and remote file removal. SFTP attempts to be more platform-independent than …

Read More

How to Use File Separator to construct file path in java?

How to Use File Separator to construct file path in java?

Many java developers might have came across the code where the developer need to use file separator for the file path or directory path. Many of them are using “/” or “\” depending upon the operating system. Using the forward or backward slash is not a good practice while coding in the java, because your code may …

Read More

How to back up files from Linux to Gmail?

Below steps shows you how to back up files from Linux to Gmail – # cd / && mkdir backup Now, you need to create a script, which will perform backup and mail it for you. # vim /usr/bin/backup copy and paste the following into the file : cd /backup rm -rf /backup/* cp LIST_OF_FILES …

Read More