Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Deploying madness w/ applets  (Read 4134 times)
0 Members and 1 Guest are viewing this topic.
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #30 - Posted 2011-11-22 10:13:25 »

"Stream Closed" means "Resource does not exist". The path is wrong or the resource is not, in fact, present in your jars.

Cas Smiley

Online ra4king

JGO Kernel


Medals: 340
Projects: 2
Exp: 5 years


I'm the King!


« Reply #31 - Posted 2011-11-22 11:08:25 »

If it didn't exist, the method would return null.

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #32 - Posted 2011-11-22 11:11:44 »

Regardless of what you think, I am right Cheesy

Cas Smiley

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 #33 - Posted 2011-11-22 23:08:02 »

Regardless of what you think, I am right Cheesy

Cas Smiley

 Cool I have my own opinion too! The resource is present, where it should be, and the stream gets closed.
Here's what happens:
http://javadaemon.com/games/skrollr/

Here's the same thing, loading differently:
http://javadaemon.com/games/skrollr/test1/

This is a reproducion of the original problem, so it's easier to read. Please take a look inside of it!

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #34 - Posted 2011-11-22 23:32:14 »

The stream doesn't "get" closed - it never opens, because the resource doesn't exist. Try changing the resource name to something you know doesn't exist like "xyzzy" and note the same error message.

Cas Smiley

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #35 - Posted 2011-11-22 23:36:53 »

Try it without the initial / in the resource path.

Cas Smiley

Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #36 - Posted 2011-11-22 23:37:26 »

The stream doesn't "get" closed - it never opens, because the resource doesn't exist. Try changing the resource name to something you know doesn't exist like "xyzzy" and note the same error message.

Cas Smiley

I see. Can you please take a peek though, because it is definitely where it should be.
javadaemon.com/games/skrollr/test1/test.jar

Try it without the initial / in the resource path.

Cas Smiley

That's what I did. Same error anyway though.

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #37 - Posted 2011-11-22 23:38:48 »

I can see it's there - have a go using "res/tileset.png" instead of "/res/tileset.png"...
<edit>Ok, was just checking. Looks like it may be a slick issue then. Can you read the input stream yourself using that piece of code (instead of passing it off to Slick)?

Cas Smiley

Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #38 - Posted 2011-11-23 00:07:37 »

I can see it's there - have a go using "res/tileset.png" instead of "/res/tileset.png"...
<edit>Ok, was just checking. Looks like it may be a slick issue then. Can you read the input stream yourself using that piece of code (instead of passing it off to Slick)?

Cas Smiley

Locally, no. However, I can do a "new Image("res/tileset.png"); and it will work, locally.
Fizzy Bricks (the physics game Kevin Glass wrote in two evenings to introduce the Fizzy overlay of box2d), initializes it's resources this way, in the applet: new Image("res/whatevs.png"); and it works in the applet as well.
Jar structure looks the same to me, of the two.

Online ra4king

JGO Kernel


Medals: 340
Projects: 2
Exp: 5 years


I'm the King!


« Reply #39 - Posted 2011-11-23 00:14:57 »

What if you are accessing the wrong file perhaps Wink
1  
java.security.AccessControlException: access denied ("java.io.FilePermission" ".\res\background.png" "read")




Where's background.png? Wink

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 #40 - Posted 2011-11-23 01:01:05 »

What if you are accessing the wrong file perhaps Wink
1  
java.security.AccessControlException: access denied ("java.io.FilePermission" ".\res\background.png" "read")




Where's background.png? Wink


f**k this! I quit!  Grin
http://www.javadaemon.com/games/skrollr

Control keys are right, left, and space.
Debugging is found at a, s, and d.

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #41 - Posted 2011-11-23 01:03:33 »

Ho ho Smiley Anyway - works nicely, smooth as a baby's bum.

Cas Smiley

Online ra4king

JGO Kernel


Medals: 340
Projects: 2
Exp: 5 years


I'm the King!


« Reply #42 - Posted 2011-11-23 01:23:18 »

So using forward slash to indicate the root of the jar does work, you just have to account for user forgetfulness Smiley

Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #43 - Posted 2011-11-23 03:03:15 »

So using forward slash to indicate the root of the jar does work, you just have to account for user forgetfulness Smiley

Nope, that was the last I think Smiley

Pages: 1 [2]
  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.

CogWheelz (11 views)
2014-07-30 21:08:39

Riven (21 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (29 views)
2014-07-23 21:07:15

Riven (30 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!