• Post Reply Bookmark Topic Watch Topic
  • New Topic

help with compiling GridWorld.jar and gridworld projects  RSS feed

 
Mark Polanski
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I've begun the second term of my java class and we're starting GridWorld. Unfortunately, I cannot SSH into the school's computers because I've forgotten the new password I was given and I've been trying to follow my instructor's directions for homework on my Windows 8 pc, using cmd.exe.

I know it's probably a silly mistake, but I would really appreciate it if someone could point out what I'm doing wrong.
I've downloaded and unzipped the GridWorld case study files, and stuck them in a folder called gridworld.
The instructor told me to:

"
4. cd into a project
cd projects/firstProject

5. Compile the project
javac -cp ../../gridworld.jar:. *java
"

and that's what I've done.
I also copied the gridworld.jar file into the firstProject directory and tried

javac -cp gridworld.jar:. *java

Both times, it returned 7 errors, which can be seen in the attached image.

Can anyone give me any pointers?
Thanks in advance
Problems.png
[Thumbnail for Problems.png]
 
Serg Masow
Ranch Hand
Posts: 50
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

according to compiler errors it seems like the packages defined within the gridworld.jar cannot be found. It can be the problem with the separator sign in the class path. on windows systems you have to use ; instead of :. let's try with the following command

javac -cp .;gridworld.jar *.java

regards
Serg
 
Mark Polanski
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow. Thank you so much, everything works perfectly now.
If you don't mind, is there any sort of documentation where I can find similar syntax differences?

Thanks again.
 
Serg Masow
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,

docs are available on the oracle home page, e.g.
http://docs.oracle.com/javase/6/docs/technotes/tools/index.html#basic

and especially about semi colon in the class path here

http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html

kind regards
Serg
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!