GETTING/UPDATING JAVA AND ECLIPSE:

1.) Update java 

Which version of java am I using? 

On mac, open Terminal, on Windows, open the DOS Prompt and (either way) write:

java -version

The first line of out put will be:

java version “1.X….” where X is the java version that you are running.

Unfortunately, you’re probably not running 1.8 and Eclipse Luna requires 1.7 or ‘better’ (thanks Gavin for pointing this out).

If you’re using 1.7 or 1.6, download 1.8 here (agree to the license and choose the download for your operating system):

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2.) Update to or download Eclipse Luna:

Direct download way: download Eclipse Luna as a zip here:

https://www.eclipse.org/downloads/ 

(Choose the first one in the list: “Standard”)

Install Eclipse once it downloads (open the zip, open the installer, agree to the legal stuff, etc…)

Update from an existing eclipse way: 

Open your current version of eclipse and open Preferences.

Find the Install/Update category on the left.

Find sub-category: Available Software Sites.

Click Add… and add this site:

Name: Luna

Site: http://download.eclipse.org/releases/luna 

Go to the Automatic Updates category and check ‘Automatically find new updates and notify me’.

Click ‘OK’.

Go to the Help menu and choose Check for Updates.

SETTING UP A NEW PROJECT FOR YOUR VOXEL ENGINE (with github):

These instructions apply to all versions of Eclipse.

1.) Choose or create an Eclipse workspace. (The Documents folder on mac is a reasonable place to put your workspace if you don’t have one.)

2.) Go to File > Import

3.) Choose Git > Projects from Git (click Next)

4.) Choose Clone URI (next)

5.) For the URI field copy/paste:

https://github.com/melsov/voxels_initial_setup

and click Next

6.) The project may take a little time to download. Click ‘Next’ for a while and agree to all defaults (to create a clone of the project on your computer).

7.) Hurray! You have the project but, there are probably lots of errors. Click the src folder and then the voxels package

8.) Open VoxelWorld.java.

9.) There are lots of red error warnings because you need to add the JMonkey jars to your build path.

10.) Click the arrow next to ‘lib’ to show a long list of ‘.jar’ files

11.) Highlight all of the jar files.

12.) Right-click any one of them and choose ‘Build Path’ > ‘Add to Build Path’

13.) The errors should now all be gone. Try hitting the green ‘run’ arrow at the top of the eclipse window. You should see the JMonkey splash screen and then a window with some green lines (your camera is in the middle of a cylinder, use WASD + (QZ) to move out of it to see a less confusing view)

14.) Note quite done! You’ll eventually need Google guava. Click the google-guava folder and right click the guava jar file. Choose Build Path > ‘Add to Build Path’. (There are also a bunch of sudoplay.joise libraries that you should leave as is).

15.) To check that you successfully added guava and that you can use the joise library, paste the following under the existing imports in VoxelWorld.java (you should get warnings, but no errors):

import com.google.common.collect.*;

import com.sudoplay.joise.*;

(You can delete these two lines after doing this check)

SETTING UP A NEW PROJECT FOR YOUR VOXEL ENGINE (manually):

You can pretty easily set up your project without using github. Make a new project in eclipse. Download zip from:

https://github.com/melsov/voxels_initial_setup

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation