You are here

Package does not exist

billy@billy-ThinkPad-R61:~/Documents/javaProg/JavaIntroNeuralNetworkEdition2/src/com/heatonresearch/book/introneuralnet/ch3/hopfield$ javac HopfieldApplet.java
HopfieldApplet.java:19: package com.heatonresearch.book.introneuralnet.neural.hopfield does not exist
import com.heatonresearch.book.introneuralnet.neural.hopfield.HopfieldNetwork;
^
HopfieldApplet.java:36: cannot find symbol
symbol : class HopfieldNetwork
location: class com.heatonresearch.book.introneuralnet.ch3.hopfield.HopfieldApplet
HopfieldNetwork network = new HopfieldNetwork(4);
^
HopfieldApplet.java:36: cannot find symbol
symbol : class HopfieldNetwork
location: class com.heatonresearch.book.introneuralnet.ch3.hopfield.HopfieldApplet
HopfieldNetwork network = new HopfieldNetwork(4);
^
3 errors

How can I get this to work. I'm currently running Ubuntu, is it designed for Windows? I found the HopfieldNetwork file in the zip file that I downloaded should it be moved?

Thanks for any help!

Neural Network Forums: 
jeffheaton's picture

Okay, part of the problem is where you are running javac from. You are attempting to compile just "HopfieldApplet.java". Which is just one piece of the program. You need to be running more from the root level, like the src directory. Or you should try using ANT, and run ant from the same directory as build.xml.

william.cipolli's picture

I'm running javac from that directory but I set my path to the src folder and still no luck. Any suggestions? I might try loading the whole project into eclipse.

AlexZ's picture

It's not enought!! A simply way to compile all your is to build firstly the build.xml with ANT ( this program will be correctly setted using its own environment variables, there is the link to [url=http://ant.apache.org/bindownload.cgi]download it[/url] and here there is a pretty good wiki site where it's explained how to proceed in setting all the variables correctly [url=http://wiki.apache.org/ant/FrontPage]here[/url] )
Afterthat you have to localize into the directory in which there is the extracted file and then write on your console or command line as well,

java -classpath *your_dir*/HopfieldNetwork.java

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer