JAVA


  Different types of keystore in Java -- PKCS12

PKCS12 is an active file format for storing cryptography objects as a single file. It can be used to store secret key, private key and certificate.It is a standardized format published by RSA Laboratories which means it can be used not only in Java but also in other libraries in C, C++ or C# etc. This file format is frequently used to import and export entries from or to other keystore types.Next we will explain the operations which can be performed on PKCS12 keystore.Create PKCS12 keystoreBefore storing an entry into a PKCS12 keystore, the keystore has to be loaded first. This means we have t...

78,746 10       JAVA PKCS12 KEYSTORE TUTORIAL


  Remote execute command in Java example

Frequently there is a need to logon to a remote system and run some commands or programs to get the output, many software can serve this purpose such as putty and gitshell.These software usually provide secure access to the remote system. But have you ever wondered what to do if you need to run commands on many different systems at the same time and get all these results back at a single place? Especially in big data era, many tasks may run on different distributed systems and you want o have a single place to accumulate the result.In this post, we will introduce a Java library which can help ...

45,792 11       JSCH EXAMPLE DISTRIBUTED SYSTEM SSH2


  Use Memory Analyzer Tool in Eclipse

When developing applications, we often encounter memory issues of an application. To analyze how much memory each class takes, we need to have some specific tools to assist us. One of them is Memory Analyzer Tool on Eclipse.The Eclipse Memory Analyzer is a fast and feature-rich Java heap analyzer that helps you find memory leaks and reduce memory consumption.To use the Memory Analyzer Tool, you first need to install it on Eclipse. You can go to Help -> Install New Software.... Paste  http://download.eclipse.org/mat/1.4/update-site/ in Work with field and press Enter. Then follow the st...

13,193 1       MEMORY ANALYZER TOOL ECLIPSE HEAP DUMP HPROF


  ConcurrentHashMap vs Collections.synchronizedMap()

ConcurrentHashMap and Collections.synchronizedMap() both provide thread-safe operations of collections of data. They are used in multithreaded programs to provide both thread safety and performance improvements. In many cases, we can use either of them.But the realization of thread safety is different for these two implementations. ConcurrentHashMap will create an HashEntry[] array internally to store the elements passed in from a Map, while Collections.synchronizedMap() will return a SynchronizedMap.The main difference between these two is that ConcurrentHashMap will lock only portion of the ...

56,772 1       CONCURRENTHASHMAP COLLECTIONS.SYNCHRONIZEDMAP


  Different types of keystore in Java -- JKS

JKS is Java Keystore, a proprietary keystore type designed for Java. It can be used to store private keys and certificates used for SSL communication, it cannot store secret keys however. The keytool shipped with JDKs cannot extract private keys stored on JKS. This type of keystore usually has an extension of jks.Next we will show how to operate the JKS keystore with pure Java code.Create JKS keystoreThe simplest method to create a JKS keystore to create an empty keystore. We can first get an instance of KeyStore and then load a null keystore. After loading the null keystore, we just need to c...

45,843 3       DEMO EXAMPLE KEYSTORE JKS


  IDEs for Java programmers

IDEs are great helpers to programmers. They can help programmers write less error-prone programs with less time. They have become an inevitable part of many programmers. As a Java developer, you may be familiar with Eclipse already. But do you know other IDEs for Java programmers?We will give an overview of different IDEs for Java programmers. These IDEs are Eclipse, Intellij IDEA, NetBean and BlueJ.EclipseEclipse is the most widely used IDE for Java programmers. It's an open source IDE which is originally developed by IBM. Now it can not only be used to write Java programs, but also C++, C, J...

8,688 4       ECLIPSE JAVA IDE BLUEJ NETBEANS


  Understanding abstract interface in Java

Have you read about an interface declaration as public abstract interface InterfaceName in Java? At the first glance, is it a weird declaration? Why should we declare an interface as abstract? For example, we may see below code in some projects:public abstract interface MyInterface { public void check(); public abstract boolean check(boolean really);}Actually here abstract is redundant, an interface is implicitly abstract, we no need to put an abstract in front of interface. But it does no harm if you do.You can find the below statement about abstract interface in JLS:9.1.1.1 abstra...

4,451 0       JAVA ABSTRACT INTERFACE


  Different types of keystore in Java -- Overview

Keystore is a storage facility to store cryptographic keys and certificates. They are most frequently used in SSL communications to prove the identity of servers and clients. A keystore can be a file or a hardware device. Three are three kinds of entries can be stored in a keystore depending on the types of keystores.The three types of entries are:PrivateKey : This is a type of keys which are used in asymmetric cryptography. It is usually protected with password because of its sensitivity. It can also be used to sign a digital signature.Certificate : A certificate contains a public key which c...

137,032 4       JAVA KEYSTORE OVERVIEW JKS PKCS12 JCEKS PKCS11 DKS BKS