Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 874 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
Thanks
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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (21 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (49 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (105 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!