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

 ALL


  Recursive class initialization in Java

When a Java class is referenced and initialized, it has to go through the loading and linking first. Once the loading and linking complete successfully. The class will be initialized. The static variables and constant variables will be initialized during this process. Once the class is initialized, it is ready for use.If when class A is initialized and it is referencing a class B, the class B will also get initialized. But what will happen if class B is referencing class A as well? This is called recursive class initialization. Will there be a deadlock if this case happens? No, JVM will take c...

12,718 0       JAVA JVM CLASS INITIALIZATION STATIC FINAL


  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,018 0       JVM MAXHEAPSIZE ALIGNMENT


  Java vs F#

Dr Cliff Click of Azul Systems, specialists in manycore JVM systems, recently published a blog post about the performance of Java compared primarily to C and C++ but also discussing C# and .NET. Three of Cliff's comments are of particular interest:Under the heading "Places where C/C++ beats Java for obvious reasons":"Value Types, such as a 'Complex' type require a full object in Java." - Dr Cliff ClickWhat Cliff forgot to mention is that .NET also provides value types and a far more compelling example than complex numbers is the humble hash table.Consider the task of filling a hash table with ...

4,017 0       JAVA PERFORMANCE JVM F#


  Tricks with Direct Memory Access in Java

Java was initially designed as a safe managed environment. Nevertheless, Java HotSpot VM contains a “backdoor” that provides a number of low-level operations to manipulate memory and threads directly. This backdoor – sun.misc.Unsafe â€“ is widely used by JDK itself in packages like java.nio or java.util.concurrent. It is hard to imagine a Java developer that uses this backdoor in any regular development because this API is extremely dangerous, not portable, and volatile. Nevertheless, Unsafe provides an easy way to look into HotSpot JV...

4,052 0       JAVA TRICKS JVM DIRECTLY MEMORY ACCESS


  The craziest Javascript implementations

Since its birth in 1994, Javascript has come a long way. Today it’s one of the most popular programming languages on the web because of high popularity of AJAX based web-applications. Also the rise of micro-frameworks such as jQuery (also Prototype, Moo Tools etc) which have reduced dramatically the complexity of code developers needed to write, it is well tested, has a ton of plug-ins, has a large development community and reduced development time.And lately even Server-Side JavaScript (SSJS) like Node.js which allows you to create high performance, real-time web applica...

3,371 0       JAVASCRIPT JVM TURING MACHINE CRAZY IMPLEMENTATION


  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 machine code but to a special byte code which is then run on a virtual machine which is usually implemen...

4,720 0       JAVASCRIPT JVM BICAVM CROSS PLATFORM JAVASCRIPT WRITTEN JVM