Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 3243 times)
0 Members and 1 Guest are viewing this topic.
Offline princec
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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

Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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!
Try the Free Demo of Droid Assault
Offline Mads

JGO Ninja


Medals: 23
Projects: 3


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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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: 23
Projects: 3


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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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: 23
Projects: 3


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.

Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


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!
Play the free demo of Revenge of the Titans!
Offline Mads

JGO Ninja


Medals: 23
Projects: 3


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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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

Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


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: 23
Projects: 3


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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (81 views)
2013-05-17 21:29:12

alaslipknot (91 views)
2013-05-16 21:24:48

gouessej (122 views)
2013-05-16 00:53:38

gouessej (114 views)
2013-05-16 00:17:58

theagentd (126 views)
2013-05-15 15:01:13

theagentd (113 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (180 views)
2013-05-12 15:36:09

UnluckyDevil (187 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.112 seconds with 20 queries.