Posts

Is the JVM a compiler or an interpreter?

First, let's have a clear idea of the following terms Javac  is Java Compiler -- Compiles your Java code into  Bytecode JVM  is Java Virtual Machine -- Runs/ Interprets/ translates Bytecode into  Native Machine Code JIT  is Just In Time Compiler -- Compiles the given bytecode instruction sequence to machine code at  run-time  before executing it natively. It's main purpose is to do heavy optimizations in performance. So now, Let's find answers to your questions.. 1) JVM: is it a compiler or an interpreter?  --  Ans:  Interpreter 2) what about JIT compiler that exist inside the JVM?  --  Ans:  If you read this reply completely, you probably know it now 3) what exactly is the JVM?  --  Ans: JVM is a virtual platform that resides on your RAM Its component,  Class loader  loads the  .class  file into the RAM The  Byte code Verifier  component in JVM checks if there ar...

Example AES technology

import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.commons.io.IOUtils; public class Test {     /**      * @param args      */     public static void main(String[] args) {           System.out.println("Listing all table name in Database!");           Connection con = null;           String url = "jdbc:mysql://localhost:3306/";           String db = "test";           String driver = "com.mysql.jdbc.Driver";           String user = "root";           String pass = "root";           String name="";     ...

Heap size for JVM

Two JVM options are often used to tune JVM heap size: -Xmx for maximum heap size, and -Xms for initial heap size. Here are some common mistakes made by developers while using them: Missing m, M, g or G at the end (they are case insensitive). For example, java -Xmx128 BigApp java.lang.OutOfMemoryError: Java heap space The correct command should be: java -Xmx128m BigApp . To be precise, -Xmx128 is a valid setting for very small apps, like HelloWorld. But in real life, I guess you really mean -Xmx128m Extra space in JVM options, or incorrectly use =. For example, java -Xmx 128m BigApp Invalid maximum heap size: -Xmx Could not create the Java virtual machine. java -Xmx=512m HelloWorld Invalid maximum heap size: -Xmx=512m Could not create the Java virtual machine. The correct command should be java -Xmx128m BigApp , with no whitespace nor =. -X options are different than -Dkey=value system properties, where = is used. Only setting -Xms JVM option and its value is greater tha...

Encrypt MySQL data using AES techniques

CREATE   TABLE ` user ` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT , `first_name` VARBINARY(100) NULL , `address` VARBINARY(200) NOT NULL , PRIMARY KEY (`id`) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ci   You may be expected the table structure should be: CREATE   TABLE ` user ` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT , `first_name` VARCHAR (50) NULL , `address` VARCHAR (100) NOT NULL , PRIMARY KEY (`id`) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ci   To encrypt & decrypt mysql data we will use AES_ENCRYPT() and AES_DECRYPT() functions. These functions used the official AES (Advanced Encryption Standard) algorithm & encode data with a 128-bit key length. 128 bits is much faster and secure enough for most purposes. Why we used VARBINARY data type instead of VARCHAR : Because AES_EN...

How to Share Your 3G/4G Data Card Over Wifi with Ubuntu Linux

follow the link:: http://www.svsarana.com/share_3G_data_internet_over_wifi.php?redirect=1

unlock mobile sony sk17i from too many pattern attemps

You can check whether or not the phone is "hard locked" as a result of incorrectly entering an unlock code. tap the following in - as if you were dialing a number to make  phone a call... *#*'#7378423#*#* A new "hidden" menu will appear. Tap on "service info" Tap on "SIM lock" Look at the entry for "Network" - there's a number after it.   That number is how many unlocking attempts you have left - so if it shows zero - "0" - then you'll know that you've reached the limit for unlock code entries - i.e. [x] Network 0 If it shows a number higher than zero, the problem lies elsewhere. Also - when looking at that "Network" entry, there are brackets in front of the name that will look something like this... [x] Network 5 If there's no x in those brackets, it means that the phone is already unlocked, e.g. [] Network 5 - that's an unlocked phone which may also b...

JavaHL problem in eclipse solved

In most of the cases is due to the lack of the libsvn-java library, so just install it: $ sudo apt-get install libsvn-java         Now you have to tell eclipse where to find this libraries. First, locate where the is: view sourceprint? $ sudo updatedb      now run:                                                                                                                                                                               $ locate libsvnjavahl-1.so     /usr/lib/jni/lib...