[Jon's Java class] An Introduction to Java.

Jon™
by Jon™ · 4 posts
10 years ago in JAVA
Posted 10 years ago · Author
Java is a programming language that is both compiled and interpreted. Unlike other programming languages such as C, C++, etc which are just compiled or Python, which is only interpreted, Java is first compiled into an into an intermediate language that goes by the name class file and then interpreted into executable files.

What is a class file?

A class file is written in something that goes by the name of Java byte code and this byte code is in non-human readable form. The language cannot be understood by human beings but only can be understood by Java Virtual Machine or JVM( So, if you can actually understand bytecode, you can call yourself JVM ).

What is the use compiling something into a class file and then into an executable file? Doesn't it slow down the entire process?

No, it does not slow down the process of generating an executable file but in fact, makes Java standout from all the other languages in the world. The beauty of Java is that it's platform independent. You can run Java on any machine or any operating system. All you need is a JVM to convert the class file that is developed by the developer into an executable file.

Alright, enough with the theory and lets move to the fun part...

But before we begin with Java, you need the following;

• Java Virtual Machine
• Notepad++ or EditPlus

Later on, after we learn the basics of Java and Object Oriented Programming Concepts, we will move on to Eclipse to write Java Programs. But for beginners, it is recommend not to use Eclipse yet.

Installing JVM

Step 1:
Go to Oracle's Java Archive section and download the correct file for your machine.

The above file contains JDK ( Java Development Kit ) and JDK contains JVM, JRE and all the necessary files needed to compile and interpret your Java programs.

Step 2: Run the file by double clicking it and install it in your computer. I prefer the drive containing OS for this process just to make the life easier. After all, we are here to learn Java and not to learn how to install JDK!

Step 3: Set the environment variables.

To do this, go to Computer option, right click -> Go to Properties -> Environment settings -> Under System variables, chose Path variable and click on edit.

Do NOT do anything to the existing paths, take your cursor to the end of the paths that are already existing type a ";".

Once done, paste the following
Code
C:\Program Files\Java\jdk1.7.0_45\bin
( Replace C:\Program Files\ with wherever you have installed ).

Do not leave a white space after the ";" or it will not work.

Finally click on "ok" everywhere.

How to check if you have installed JDK properly?

Click on start -> type in cmd and then hit enter.

A command prompt window should open up.
Once done, type in
Code
javac -version
and hit enter.

If everything is fine, you must get this window.

Image

In the next tutorial we will start with the actual programming by creating a simple Java program.

If you have any questions regarding Java or installation then post here.
Posted 10 years ago
Very interesting! Thanks for this, hope to see more additions in the future!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts