Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
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  
  Exporting Slick Game  (Read 545 times)
0 Members and 1 Guest are viewing this topic.
Offline tdegroot96

Junior Devvie


Projects: 1



« Posted 2013-08-26 21:26:46 »

Hey guys,

I want to submit my game to the Work in Progress, so I need to export the game.
So I made the jar, finished it off with JarSplice, ran it in cmd and suddenly this Exception occured:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
C:\Users\TIMONDESKTOP>java -jar C:\Users\TIMONDESKTOP\Desktop\Jars\Nemesis.jar
Mon Aug 26 23:26:58 CEST 2013 INFO:Slick Build #237
Mon Aug 26 23:26:59 CEST 2013 INFO:LWJGL Version: 2.9.0
Mon Aug 26 23:26:59 CEST 2013 INFO:OriginalDisplayMode: 1920 x 1080 x 32 @60Hz
Mon Aug 26 23:26:59 CEST 2013 INFO:TargetDisplayMode: 1920 x 1080 x 32 @60Hz
Mon Aug 26 23:26:59 CEST 2013 INFO:Starting display 1920x1080
Mon Aug 26 23:26:59 CEST 2013 INFO:Use Java PNG Loader = true
Mon Aug 26 23:26:59 CEST 2013 INFO:Controllers not available
Exception in thread "main" java.lang.RuntimeException: Resource not found: resou
rces/spritesheets/birk_anim.png
        at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoa
der.java:69)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTex
tureLoader.java:185)
        at org.newdawn.slick.Image.<init>(Image.java:192)
        at org.newdawn.slick.Image.<init>(Image.java:166)
        at org.newdawn.slick.Image.<init>(Image.java:154)
        at org.newdawn.slick.Image.<init>(Image.java:132)
        at nl.tdegroot.games.nemesis.gfx.Resources.<init>(Resources.java:36)
        at nl.tdegroot.games.nemesis.Nemesis.init(Nemesis.java:34)
        at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
        at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
        at nl.tdegroot.games.nemesis.RunGame.main(RunGame.java:14)


This means that I need to include class folder, but I have already done this in Eclipse and I can't really find an alternative in IntelliJ(My main IDE).

Do you guys know how to kill this problem?

Thank you in advance!
Offline tdegroot96

Junior Devvie


Projects: 1



« Reply #1 - Posted 2013-08-27 11:08:30 »

Anyone?
Offline Phased
« Reply #2 - Posted 2013-08-27 11:15:47 »

To what I can tell you, and anyone can tell you based on what you have given us.

1  
2  
Exception in thread "main" java.lang.RuntimeException: Resource not found: resou
rces/spritesheets/birk_anim.png


so  birk_anim.png is not found, and I bet it is the first image you try and load. you have something wrong with the path to your images.

You need to look into reading stack traces, you should be able to understand stack traces if your making games, they are easy to read, and will save you time. They usually point to exactly where the problem is.

1  
 at nl.tdegroot.games.nemesis.gfx.Resources.<init>(Resources.java:36)


The problem is within Resources file on line 36.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tdegroot96

Junior Devvie


Projects: 1



« Reply #3 - Posted 2013-08-27 11:42:11 »

I know what the problem is, and I know how to read Stack Traces.
The only problem is, that in project I use resources/spritesheets/birk_anim.png, but when I export it, the resources folder gets extracted, which means, all first-child folders in the resources folder get moved to the root directory of the jar.
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.

PocketCrafter7 (12 views)
2014-11-28 16:25:35

PocketCrafter7 (7 views)
2014-11-28 16:25:09

PocketCrafter7 (8 views)
2014-11-28 16:24:29

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

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

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (28 views)
2014-11-24 19:59:16
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!