JAVA


  Generate certificate in Java -- Certificate chain

In previous post, we have introduced the use of Certificate and how to generate self signed certificate using Java. In this post, we will show you how to generate a certificate chain. Sometimes we may only have a certificate request or we don't have a trusted certificate which can be used for business. Now we need to have a trusted CA to sign our certificate so that it can be used on SSL communications.To generate a certificate chain, we may first have our own certificate(A), then we may use other certificate(B) and its associated private key to sign the certificate we have, then we will use a...

41,086 2       JAVA CERTIFICATE CHAIN CREATION PURE JAVA


  Want to be a Java developer?

Java is one of the top 3 programming languages in the world. It can be used to develop both web applications and desktop applications and more importantly it is cross platform--write once, run everywhere. Also, it's easy to pick up. If you want to be a Java developer, please get to ask yourself whether you know below listed topics.This list is summarized by Vivek Vermani, a Senior Java Developer:For a Core Java Developer , Ffollowing topics should be good.OOPs ConceptsAbstract Classes and InterfacesConstructors and initialization orderFile IO and SerializationCollections - List , Map , SetAcce...

7,213 2       JAVA DEVELOPER RESOURCE


  Hexadecimal and long in Java

Today I encountered a hexadecimal operation problem when I was implementing a bit reverse function for integer type. Basically in the implementation, there is an operation which is to do the bit operation & between one long integer and a hexadecimal number 0x00000000FFFFFFFFF. I was expecting that the high 32 bits of the long integer will be zeroed. But unfortunately I didn't get the expected result.The basic implementation is:long num=0x00F0_0000;num = (num>>16) | (num<<16); //Here the result will be 0x000000F0000000F0num = num & 0x00000000_FFFFFFFF;System.out.println("...

4,655 0       JAVA HEXADECIMAL LONG BITWISE OPERATION


  Eclipse 4.4 is going to fully support Java 8

Eclipse is the most popular IDE for developing Java applications, but it seems lag behind the Java 8 release a couple of months ago. The current Eclipse is not supporting Java 8 and if you want to run Java 8 programs on it, you need to install a plugin. You can find the plugin at the Eclipse market place. Now Eclipse 4.4 is coming to us on 25th June and the code name for it is Luna.This new version of Eclipse introduces some new features which can ease developer's work, these features including Java 8 support, dark theme and show line number by default, split editors etc. All these features ar...

4,853 0       ECLIPSE JAVA 8 LUNA


  MaxHeapSize in JVM

MaxHeapSize is an option which is to set the JVM maximum heap size can be allocated. We can specify the MaxHeapSize as VM argument when we run the program by setting -XX:MaxHeapSize=, here can be 2M, 20M, 200M etc.We can also view the current MaxHeapSize set by setting different JVM options. To view the MaxHeapSize, we can use two JVM options : -XX:+PrintFlagsFinal and -XX:+PrintCommandLineFlags. Below is one example when running -XX:+PrintFlagsFinal: bool MaxFDLimit = true {product}uintx MaxGCMinorPauseMillis = 4294967295 {pro...

13,151 0       JVM MAXHEAPSIZE ALIGNMENT


  Browse OpenJDK Java source code in Eclipse

Java 8 was recently released, many developers are now trying to extract the source code of Java 8 to find out how the new added features such as Lambda expressions, default method in interfaces, new Time API are implemented. How do you manage to download and browse the source code? Today we are going to show how to extract OpenJDK Java source code to Eclipse.Since OpenJDK is adopting Mercurial as its distributed version control system, you need to install Mercurial on your computer first before you can clone the repository from OpenJDK. You can get more info about the use of Mercurial in OpenJ...

9,472 0       SOURCE CODE ECLIPSE JAVA 8 OPENJDK


  Want to make your Eclipse run faster? Try this

Lots of us may find that our Eclipse takes a long time to launch, remember how many times you want to close this heavy machine and shout "F**K". Do you know why Eclipse launches slowly? Is it because we have too many plugins installed or we have created too many projects? No, it's not. Sometimes, it's because we don't have the correct configuration. So where to start? Go to eclipse.ini.First, you may want to add below line in your eclipse.ini configuration file:-Xloggc:gc.logThis is to show what Eclipse has done while launching.Next we can start to do some optimization. Here we take one exampl...

3,294 0       OPTIMIZATION ECLIPSE SPEED


  this keyword in Lambda expression in Java 8

Since the release of Java 8, people are excited to see a big feature added to this language which is existing in other languages for a long time -- Lambda expression. The introduction of lambda expression in Java 8 gives people an easy way or a vertical to horizontal way to solve problems. There are many posts on the Internet which shows how to use lambda expression in Java, such as Lambda Quick Start and Java 8 Lambda Expressions Tutorial with Examples. In this post, we will only focus on the this keyword in lambda expression.Unlike anonymous functions, a lambda expression can be considered a...

17,893 2       THIS LAMBDA EXPRESSION JAVA 8