Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Java



  Java AbstractMethodError explained and demonstrated

According to Oracle Java API documentation, AbstractMethodError is a kind of runtime error where the application is having some incompatible changes which leads to a missing implementation of an abstract method. Below is the official description. Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last co...

   JAVA,ABSTRACTMETHODERROR     2016-07-22 22:03:20

  Using Java keytool programmatically

Java provides a command line tool to access and operate different keystore which store keys and certificates. This tool is named keytool and is located at \bin.  On command line, you can issue below command to generate a keystore named mytest.jks which contains a private key and certificate chain. keytool -genkeypair -alias mykey -keyalg RSA -sigalg SHA256withRSA -dname CN=Java -storetype JKS -keypass password -keystore mytest.jks -storepass password Sometimes, in testing purpose, w...

   JAVA,KEYTOOL     2016-01-09 06:28:07

  JavaScript JVM runs Java

The world of software is made slightly crazy because of the huge flexibility within any computer language. Once you have absorbed the idea of a compiler written in the language it compiles what else is there left to gawp at? But... a Java Virtual Machine JVM written in JavaScript seems like another level of insanity.In fact it is a quite reasonable idea which is only made mad by the usual positions that Java, the top dog, and JavaScript the underling, usually occupy. Java is compiled not to mach...

   JavaScript,JVM,BicaVM,Cross platform,JavaScript written JVM     2011-11-22 02:51:38

  Multithreading interview questions in Java

Multithreading as a widespread programming and execution model allows multiple threads to exist within the context of a single process. These threads share the process' resources but are able to execute independently. The threaded programming model provides developers with a useful abstraction of concurrent execution. However, perhaps the most interesting application of the technology is when it is applied to a single process to enable parallel execution on a multiprocessor system.Many programme...

   Multithreading,Java,Interview     2012-05-28 06:33:25

  Access control in Java -- Permission check order

Previously we showed you how to turn on SecurityManager in Java. After SecurityManager is turned on, a series of permission checks will be applied on the code you are calling in your application to protect some resources against malicious access such as files, sockets etc. To perform these permission checks, a set of Permissions will be created and checked using the AccessController. The AccessController has three purposes : To decide whether an access to a critical system resource is to be all...

   JAVA,SECURITY,ACCESSCONTROLLER     2016-03-07 04:17:40

  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...

   OpenJDK,Java 8,Source code,Eclipse     2014-06-16 00:53:34

  C vs Java Complete Comparison

Similarities: Java and C have same syntax operators. Difference—thinking Two paradigms: Java: Object oriented language C: Structured language Differences: --Syntax No preprocessor Java does not include a preprocessor and does not define any analogs of the #define, #include, and #ifdef directives. Constant definitions are replaced with static final fields in Java. (See the java.lang.Math.PI field for an example.) Macro definitions are not available in...

   C,Java,Comparison,Difference,Similaritie     2011-10-06 12:46:39

  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 ...

   JAVA,KEYSTORE,OVERVIEW,JKS,PKCS12,JCEKS,PKCS11,DKS,BKS     2014-08-18 02:09:54

  ByteBuffer in Java

ByteBuffer is introduced in java.nio since Java 1.4. It provides a way of representing raw structured data such as from a file or from network. It enables fast access of underlying data compared to traditional ways like byte[] Prior to Java 1.4, if you want to represent a structured raw data, you need to create a byte[] and then having a set of checks to delimit the byte array to get the expected tokens. There are three ways to create a ByteBuffer: Wrapping an exiting array by calling ByteBuffe...

   JAVA,BYTEBUFFER,ALLOCATION     2015-07-08 03:17:44

  Different types of keystore in Java -- PKCS11

PKCS11 keystore is designed for hardware storage modules(HSM). It's an interface to talk to the HSMs. It doesn't actually store any keys but provide a set of classes to communicate with the underlying HSM. The actual keys and certificates are stored on the HSMs. The reason for storing the keys and materials is to ensure security and efficiency. Since the keys are on the HSMs, they are safe to be stolen. All encryption/decryption operations are performed on the HSMs as well, this incre...

   PKCS11,keystore,HSM,Java     2015-01-08 00:39:12