You are here

Step by Step: How to use Intro to Neural Networks in Eclipse (Edition2, Java) Examples

In this tutorial I will show you how to download, install, and execute the examples for
"Introduction to Neural Networks for Java, 2nd Edition". This example shows how to use the Eclipse IDE. If you would like to use NetBeans, this is covered in a separate tutorial.
The first step is to download the book’s examples. These can be found at the following URL:

http://www.heatonresearch.com/download

The file you should download is named.

IntroNeuralJavaExampesEdition2.zip

You should download it to your computer and unzip it. This archive unzips to a folder of the same name. For this example, I am going to unzip it to the following path:

c:\JavaIntroNeuralNetworkEdition2

It can be unzipped to any directory you choose. You can see the unzipped files here.

You are now ready to start Eclipse. If this is the first time running Eclipse, then a workspace will need to be created. Eclipse will display a dialog similar to the following.

You can create your workspace anywhere you like. Usually it is best to accept the default location that Eclipse suggests.
Once you are actually inside of Eclipse, you should see a window similar to the following. You are now ready to import the examples.

The examples were created using Eclipse, so the download file is packaged as an Eclipse project. This makes it very easy to import into Eclipse. Choose “Import” from the File menu. Eclipse will now prompt you for what you would like to import. Choose an “Existing Projects into Workspace”, as seen here:

On the next window, you will need to choose the folder that you downloaded the examples into. This should be entered at the top of the window. Additionally, you might want to check the box “Copy Projects into Workspace”, as this will keep all of your files in one place. You can see this window here.

You can now select “Finish” and the project will be imported. An imported project will appear like this.

It may take from a few seconds, to a few minutes, for everything to compile. The number of warnings you will get will vary depending on the version of Eclipse you are using. However, you should see no errors. If you do see any errors they will most likely be from missing components, check the errors see if you can resolve them. If you cannot, feel free to post a form message here. Please include the specific error you are getting.

http://www.heatonresearch.com/forum

Now that the project is compiled and ready we will run an example. However, first it is useful to view the files hierarchically. This can be done by selecting the option as shown here.

Now that you are viewing the project packages hierarchically you can navigate to one of the examples. We will use Chapter 5’s XOR example. The following shows how to navigate to this example.

Right-click this example and choose “Run As”, and then “Java Application”. The XOR example will now run and display its output to the console pane. You can see this here.

You have now run your first example. As you work through the book, you can post any questions to the forums at our website.

http://www.heatonresearch.com/forum

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer