How to get user home directory in java for all OS?

How to get user home directory in java for all OS?
DeeKay September 23, 2017 at 10:05 pm · JAVA API

How to get user home directory in java is the common question arises while creating Java/Swing GUI applications. You can get home directory of user using System.getProperty(“user.home”) function. Below java code shows you how to get User home directory. This code will work on Java 1.8 for all OS. Output: There is a bug#JDK-6519127 which…
Continue Reading »


Vue.js Conditional Directives Example

Vue.js Conditional Directives Example
DeeKay September 21, 2017 at 3:54 am · Vue.js

In this tutorial we will see how to use Vue.js Conditional Directives. You can also checkout other Vue.js tutorial as listed below Other Vue.js tutorial Vue.js Hello World Example Vue.js v-bind Directive Example Most of the dynamic web application expect an ability to show or hide elements based on conditions in any front-end framework. Vue.js…
Continue Reading »


How to convert java.util.Date from java.time.LocalDate?

How to convert java.util.Date from java.time.LocalDate?
DeeKay August 12, 2017 at 3:13 am · JAVA API

The following Java code snippet shows how to convert java.util.Date from java.time.LocalDate  and vice versa. In the first part of the code snippet we convert java.util.Date from java.time.LocalDate and back to LocalDate object. In the second part we convert java.time.LocalDate from java.util.Date and back to java.util.Date object.


Web Application with Spring Boot and Thymeleaf Example

Web Application with Spring Boot and Thymeleaf Example
DeeKay July 28, 2017 at 2:19 am · Spring, Spring Boot

Introduction In this article, I will show you a web application with Spring Boot and Thymeleaf example but first of all lets see what is Spring Boot and how it helps in development of Spring Framework based web application development. A Spring Boot is a new framework by team Pivotal, designed and aimed to simplify…
Continue Reading »


How to get Free, Used and Total Memory in Java ?

How to get Free, Used and Total Memory in Java ?
DeeKay June 20, 2017 at 2:02 am · How To, JAVA API

As you know that Java does the automatic garbage collection which you need not worry about. However sometime you want to know how large the java heap space is and how much of it is left. Information about Free, Used and Total memory in java can be used for checking your code efficiency. To obtain…
Continue Reading »


Vue.Js v-bind Directive Example

Vue.Js v-bind Directive Example
DeeKay January 23, 2017 at 2:23 am · Vue.js

In the previous example, we created Vue.js Hello World example using the text interpolation method in Vue.js. Here we will see Vue.js v-bind directive example to bind the HTML element to data. Directives in Vue.js are extended HTML attributes with the prefix v-. There are many directives provided by Vue.js and one of them is v-bind…
Continue Reading »


Vue.js Hello World Example

Vue.js Hello World Example
DeeKay January 21, 2017 at 4:44 am · Vue.js

Vue Js Hello World Example is the best way to kick start the learning of Vuejs. Vue.js is the pure frontend development javascript library. It is becoming popular as a JS library for reactive components. It is lightweight, simple and focused on the view layer only. Other Vue.js tutorial Vue.js v-bind Directive Example Vue.js Conditional Directives…
Continue Reading »


How to convert String to Int in Java ?

How to convert String to Int in Java ?
DeeKay January 20, 2017 at 3:25 am · JAVA API

To convert String to Int in Java, you can use the below methods of Integer class. Methods to convert String to Int 1) Integer.parseInt() code example /** * Created on Nov 19, 2016 Copyright(c) https://kodehelp.com All Rights Reserved. */ package com.kodehelp.java.lang; /** * @author https://kodehelp.com */ public class ConvertStringToInt { public static void main(String args[]){…
Continue Reading »


Log4j2 configuration file examples

Log4j2 configuration file examples
DeeKay January 6, 2017 at 4:14 am · How To

Log4J2 Properties configuration through a configuration file can be achieved in below 4 different file formats. Properties file format – log4j2.properties YAML file format – log4j2.yaml or log4j2.yml JSON file format – log4j2.json XML file format – log4j2.xml I don’t see many examples available for log4j 2 configuration. Here are the few examples of Log4j 2…
Continue Reading »


How to delete folder recursively on remote server using SFTP in java?

How to delete folder recursively on remote server using SFTP in java?
DeeKay January 5, 2017 at 3:46 am · How To, SFTP

Deleting or removing a folder recursively on the remote server in java is easy using JSCH (SFTP) API. Nowadays it is a common use case in software projects where you need to delete or remove a folder from the remote server using SFTP connection. Below java code shows you how you can delete or remove…
Continue Reading »