Minecraft Blogs

Java Programming Tutorial #1 - Installing JDK and Eclipse

  • 21
  • 16
  • 27
avatar SourC00kie
Retired Moderator
Level 45 : Master Blob
196
Click here to see Java Programming Tutorial #2 - Hello World

IMPORTANT: Install Java first, BEFORE you install Eclipse.


Java:

Note: Java is already installed in all Macintosh devices, so you do not need to worry about that.

A typical Java installation takes about 400 megabytes of disk space. The installation process reports the exact size.

Downloading:

1. Click Java SE Downloads
A page, with this label in orange, will be displayed in your browser.

2. Find the section labeled JDK 7 Update 1 and click its Download button (the fourth one from the top). Click Yes to the Security Window pop-up, if it appears. A page, with the label Download in orange, will be displayed in your browser.

3. Click the Accept button, which appears under Required in red (it is in a small font: look for it carefully).
Again, click Yes to the Security Window pop-up, if it appears. This page will re-display itself, with this information absent.

4. Find the black bar labeled Windows Platform - J2SE(TM) Development Kit 7 Update 1

5. Click the link labeled Windows Online Installation (typical download size is ~33.7MB), Multi-language

6. Save the file it is about to download somewhere on your disk drive. The file will be named jdk-1_7_0_01-windows-i586-p-iftw.exe. The exact form of this interaction will depend on the version of your operating system (on mine clicked Save to the File Download - Security Warning pop-up; then I specified the location for the file; and then I clicked Close to the Download complete pop-up). Store this exe file somewhere permanent on your disk drive, so that you can re-execute it (reinstall Java) later, if necessary. This file is only about 250KB (1/4 MB).

7. Terminate (X) any windows remaining from this process (e.g., the Download window).

Installing:

1. Double-click the file that you just downloaded, to run it.
Click Run to the Open File - Security Warning pop-up. You will see a Windows Installer window temporarily then a Preparing to Install window temporarily. You will then see a License Agreement window.

2. Click the "I accept the terms..." button.

3. Click the Next> button.
You will see a Custom Setup window, for J2SE Development Kit 7 Update 1. The default is to get a full installation (~264Mb), which is what you want.

4. Click the Next> button.

5. You will see an Installing window (for J2SE Development Kit 7 Update 1), whose progress is shown by progress bars (on various panes). Be patient: many megabytes of information is being downloaded and then used to perform the actual installation; sometimes the progress bars lool like they are making no progress.

6. Eventually, you will see another Custom Setup window, for J2SE Runtime Environment 7 Update 1. The default is to get a full installation (~131Mb), which is what you want.

7. Click the Next> button.

8. You will see a Browser Registration window. Select whatever browsers you want to register for,

Click the Next> button.

9. You will see another Installing window (for J2SE Runtime Environment 7 Update 1), whose progress is shown by progress bars (on various panes). This installation will take less time than one for the Development Kit.

10. Click the Finish button on the Installation Completed pop-up window.

Eclipse:

The following instructions were composed for installing Eclipse on Windows. The process for Mac/Linux should be similar.

A typical installation takes about 134 Mb of disk space (plus the 120 Mb download, which you should keep on your machine, in case you need to reinstall it).

Downloading:

1. Click Eclipse 3.7.1
A page, with the label eclipse downloads, will be displayed in your browser.

In the first section, find the text Download Now: Eclipse SDK 3.7.1, Windows (120 MB)

2. Click the icon to the left of this text, or the part of the text labeled Eclipse SDK 3.7.1
If you are using a Mac, it should sense it and display Mac instead of Windows. If you are not using the operating system it recognizes, click the link labeled Other downloads for 3.7.1 instead.

3. Click the icon to the left of the text Download from: for using the default mirror site (or click a site from the list displayed in the box).

4. Click the Save button to download, somewhere on your disk, the file named eclipse-SDK-3.7.1-win32.zip (for PCs). The exact form of this interaction will depend on the version of your operating system. Store this zip file somewhere permanent on your disk drive, so that you can unzip it (recreate Eclipse) later, if necessary

5. Terminate (X) any windows remaining from this process.

Installing:

1. Unzip this file that you just downloaded.
On most Windows machines, you can
Right-click the file.
Move to the WinZip command.
Click Extract to here
It creates a folder named eclipse. You can leave this folder here or move it elsewhere on your disk drive.

2. Create a shortcut on your desktop to the eclipse.exe file.
On most Windows machines, you can
Right-press the file eclipse.exe
Drag it to the desktop.
Release the right button.
Click Create shortcut here
Now you are ready to perform a one-time only setup of Eclipse.

3. Double-click the shortcut to Eclipse that you just created. In the Workspace Launcher window, in the box following Workspace:, should appear something like C:Documents and Settingsusernameworkspace (where username is your login on the machine). If you want, you can type in (or browse) another location for the workspace file to be created, but I advise accepting the default.

4. Check the box labeled Use this as the default and do not ask again.
Aside: you will be using one workspace during the semester, checking projects in and out of this workspace. If you ever want to re-enable the display of this window, once Eclipse starts, you can
Select Window | Preferences.
Click the + in front of General or double-click General (after the +)
Click Startup and Shutdown
Check the box labeled Prompt for workspace on startup.

5. Click OK

6. If you want easy access to the workspace, create a shortcut to it (see the instructions above), putting the shortcut on your desktop.

7. Download (right-click and Save As) Course Library Jar into the same folder that you are using as your workspace (or move this file in the workspace fodler after downloading it elsewhere).

8. In Eclipse, select Windows | Preferences

9. Click the + in front of Java or double-click Java (after the +)

10. Click Installed JREs

11. Under the Name column, double-click jre1.7.0_01.

12. Click the Add External Jars... button.

13. In the Jar Selection window, navigate to your workspace folder, and double-click the file cs15-1xx.library.

14. In the Edit JRE window, click OK

15. In the Installed JREs window, click OK

16. Terminate (X) the Welcome window
You can always get it back by selecting Help | Welcome

17. Terminate (X) the Eclipse window.

I hope you got it, if not then I would recommend looking up a video on YouTube for it as you may be confused by the text. I will be create many more Java tutorials so I hope you enjoyed and stay tuned for the next ones.
Tags

1
09/20/2013 7:34 pm
Level 21 : Expert Taco
FLAMESS123
plz do how to configure mcp plz :) thx
1
09/16/2013 5:12 pm
Level 21 : Expert Taco
FLAMESS123
please help :) I totally got lost on number 7. Can you please explain what "Course Library Jar" is?

Some of us have a bit harder time at learning stuff... so be more specific, like say "Open This" or "On Your Right/Left. :) I understood until Number 7. plz explain :D and don't call me stupid for asking you thses questions XD Idc, I can accept that, as long as I get it downloaded right this time :)
1
10/01/2012 9:15 pm
Level 14 : Journeyman Scribe
Kerbex
No offense, but did you get this information from
http://www.ics.uci.edu/~pattis/common/handouts/librariesineclipse.html
?
1
10/01/2012 8:41 pm
Level 14 : Journeyman Scribe
Kerbex
Thanks for this great, easy to understand tutorial.
1
11/23/2011 1:56 pm
Level 35 : Artisan Nerd
MonkeyMoney101
You completely lost me on installing eclipse #7
1
11/20/2011 12:13 am
Level 16 : Journeyman Skinner
DusteroftheCentury
Cant wait to start coding stuff.
1
11/17/2011 7:53 pm
Level 16 : Journeyman Skinner
DusteroftheCentury
If I have Java Runtime Enviroment Do I still Need the JDK?
1
11/07/2011 1:11 am
Level 43 : Master Musician
Vanilla Crafter
no don't use eclipse use net beans it finds errors for you
1
11/07/2011 2:13 pm
Level 60 : High Grandmaster Modder
Vangoule273
Eclipse does it better :S
1
11/06/2011 9:46 pm
Level 47 : Master Modder
john111898
These tutorials are a great idea. Keep up the good work. :D
1
11/06/2011 7:43 am
Level 2 : Apprentice Miner
Uppy
guys, with doing this, u arent making mods. this is just setting it up, for the real modding u have to search on youtube.
1
11/06/2011 6:09 am
Level 46 : Master Droid
beasteye
can i just say something most of the time eclipse isnt the best program to use for programing because it points out things that it thinks are mistakes when they really arnt and then if u try to change them u can stuff up what ever u are doing
1
11/06/2011 9:26 am
Level 45 : Master Blob
SourC00kie
Never in my entire life of programming has that ever happened to me. If you are getting mistakes, that means you are MAKING mistakes.
1
11/05/2011 7:36 pm
Level 18 : Journeyman Modder
X-MODIFICATIONS
NO MAN PLEASE DONT TEACH PPL TO MOD the more ppl that won't take the time to look up how to do it on youtube that learn how to mod THE MORE DIRT TO DIAMOND MODS WE GET!
1
11/05/2011 7:47 pm
Level 45 : Master Blob
SourC00kie
Read the comments below. If people think I'm teaching them how to mod Minecraft they are mistaken. This is Java Programming, if people are smart enough and master this, their mods will be exceptional.
1
11/05/2011 9:46 pm
Level 18 : Journeyman Modder
X-MODIFICATIONS
yes but this is setting ppl up for MODDING or java programming
1
11/05/2011 10:07 pm
Level 45 : Master Blob
SourC00kie
I don't see what's wrong with that.
1
11/06/2011 12:43 am
Level 18 : Journeyman Modder
X-MODIFICATIONS
cause half of the ppl that don't look it up on youtube are probably lazy and lazy ppl make lazy ppl mods
1
11/06/2011 12:47 am
Level 45 : Master Blob
SourC00kie
People have different methods in learning. I prefer books over anything. However just because you think one method is better than the other doesn't automatically make people "lazy" for anyone can call you lazy for just looking at a video to learn.
1
11/05/2011 6:39 pm
Level 16 : Journeyman Skinner
DusteroftheCentury
K I get it now.
1
11/05/2011 6:11 pm
Level 16 : Journeyman Skinner
DusteroftheCentury
Very helpful but dont you also need Modloader, MCP, WinRar or 7zip?
1
11/05/2011 6:14 pm
Level 45 : Master Blob
SourC00kie
These tutorials aren't for Minecraft modding. They are for Java Programming which then can be used to Mod Minecraft.
Planet Minecraft Logo

Website

© 2010 - 2020
www.planetminecraft.com

Welcome