Saturday, October 17, 2009

Java Virtual Machine

Every programmer talks about Java Virtual Machine (JVM) and JVM is everywhere. But most people who knows Java do not really know what a JVM is, how it is implemented and why it is very popular. I will try my best to explain what I understand about JVM in this post. All comments, suggestions and corrections are welcomed.

What is Java Virtual Machine?
Like the name said, it's a virtual machine. It's a machine that executes Java Codes. It's a light weight and portable program that comes with all Java download. If you ever used VMWare to run an OS which is different from the one installed in your machine, then it'll be easier for you to understand how JVM works. In VMWare, you don't need to install the other OS, you create a virtual environment in which the OS runs. Same concept is here, you don't need a certain hardware or programs for your Java programs to run. All you need is a JVM and all the different Java programs will run on your machine.

Virtual Machine Implementation
Java has become a very popular language because of its JVM. Java itself is a high level programming language. If you write a Java program and ask your computer to run, it won't understand what it means. There are only 0's and 1's in the lowest level of our implementation. So, there's a way to convert what programmers write to what machines understand and that is where compilers come in. Those converted codes are called machine codes. When a Java program is compiled, it is converted to bytecode. Bytecodes are machine independent and can be further compiled in machine codes. Because of its machine independence, a Java program can be run anywhere as long as you have Java Runtime Enviroment installed in your computer. JRE is a program that takes of Java bytecodes according to the machines. All JRE comes with JVM. Since programmers do not have to worry about different machines, they can focus more on their programs.

You must be familiar with Java Applets from different websites. Because of JVM, those developers don't have to worry about different browsers, OS and hardware when creating Java applets. That's why Java has been a popular programming language and JVM has been a popular environment.



Thursday, October 15, 2009

My First Mac Laptop

After using Windows for more than 10 years, I got my first Mac laptop. It is 13.3 inch Mac Pro which comes with built in webcam and audio speakers.

I use Mac Mini at work and the OS was Mac OSX 10.5. Honestly, I am not a Mac fan. As much as I like iTouch and Apple's softwares, I'm not used to the way programs work. And it's hard to get some software for Mac OSx(e.g GTalk). In my country, GTalk is the only chat client that is permitted to use. All other messengers were blocked. So, I was a bit disappointed about not being able to use GTalk. But I just installed the Google voice for my gmail and am pleased about it. For those who are wondering how to use GTalk voice on Mac OS, you can check out http://www.google.com/chat/video.

Another program I have it installed on my laptop was VM Fusion. I installed Windows XP on it. I'm still a windows fan. I'll see if this changes after some time.