Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (672)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Build Paths evade me [solved]  (Read 1093 times)
0 Members and 1 Guest are viewing this topic.
Offline nhmllr

Senior Devvie

Medals: 1
Projects: 3

slow and steady...

« Posted 2012-07-22 18:55:14 »

In my previous topic, you all got to watch in suspense as I learned about build paths and how to load buffered images. Everything went well, and it did. That was a test project where the res folder consisted of one .png and there was only one source folder.

Well now I'm trying to get the image processor into the actual game, and things aren't quite working out.
Currently I have two source folders (and I am positive that number will increase) but that hasn't been a problem yet. My res folder has several sub folders in which I organize a bunch of different resources, but that hasn't been a problem either (just thought I'd tell you if it was important)
One of the folders in my res folder is "levels" and in that folder I keep my .pngs of my level layouts. So I implemented my image reading class and everything should work. I put my res folder in my build path and fire up the game in eclipse. But then eclipse said that there's an error and asks if I should "run it anyway". Well, I run it anyway and it says that it can no longer find my main method "GameRunner"

What? Why not? This wasn't a problem before. I take the res folder out of the build path and edit the source code so it never runs the ImageProcessor class, and it runs just as it did before I implemented that class with no problem.

What did I do wrong now? :p
Offline sproingie

JGO Kernel

Medals: 202

« Reply #1 - Posted 2012-07-22 18:58:50 »

If there's an error in your build, then you really can't have any idea what state your build is in if you choose to run it anyway.  Fix the error, and do a clean and full rebuild.
Offline nhmllr

Senior Devvie

Medals: 1
Projects: 3

slow and steady...

« Reply #2 - Posted 2012-07-22 19:03:10 »

But I don't know how to fix the error and have the res folder in my build path. The error is not because I missed a semi-colon in my source or anything like that. The error pops up whenever the res folder is in the build path, and disappears whenever I take it out.

Basically what I'm saying here is that I have no idea how build paths work.

If anybody would just tell me how they would structure their build path, or say, "I just do X Y and Z and that works" that'd be fine
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mads

JGO Ninja

Medals: 26
Projects: 3
Exp: 6 years

One for all!

« Reply #3 - Posted 2012-07-22 19:51:10 »

What error do you get exactly?

Offline nhmllr

Senior Devvie

Medals: 1
Projects: 3

slow and steady...

« Reply #4 - Posted 2012-07-22 20:19:18 »

Oh hey... It started working. (?)

(To reply anyway, the error was something to the effect of "The Main Class "path.GameRunner" could not be found")

I was fiddling around with all the options, and here's what I did that worked:
I took the "res" folder out of the build path
I put only the "levels" folder into the build path

I hate it when threads end like this, but what can ya do. I'm happy. Smiley
Thanks everybody, sorry to have wasted a little bit of your time
Offline Rorkien
« Reply #5 - Posted 2012-07-22 21:13:19 »

Create the habit of pressing F5 on eclipse's navigator everytime you change/add something.

I've lost track of how many hours i lost because of path errors  Cranky
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

IanParcs (45 views)
2016-04-18 14:18:53

KaiHH (45 views)
2016-04-18 08:35:41

KaiHH (75 views)
2016-04-15 12:43:58

theagentd (78 views)
2016-04-14 02:16:17

theagentd (90 views)
2016-04-14 02:15:43

IanParcs (104 views)
2016-04-12 03:51:16

IanParcs (47 views)
2016-04-12 03:50:03

IanParcs (43 views)
2016-04-12 03:49:54

IanParcs (38 views)
2016-04-12 03:49:52

IanParcs (48 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!