Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Jan 2011
Offline Last Active Jul 06 2011 07:44 AM

Posts I've Made

In Topic: [java] How do I load resources for Web start?

26 June 2011 - 06:59 PM

Thanks mate.

What I ended up doing was ditching the Slick-util in favor of another texture loader borrowed from the space invaders example game for LWJGL.


After that the same command as the scanner worked for the imageIO.read() method in the new texture loader.

Thats what I reccomend to any people who find this thread, having the same trouble.

In Topic: [java] How do I load resources for Web start?

24 June 2011 - 03:27 AM

Thanks for the tip.

I dug into some logs in the deployment folder and this is the error message.

<message>java.io.FileNotFoundException: http:\www.mydomain.com\javatest\gameresources.jar!\stonewall02.png (The filename, directory name, or volume label syntax is incorrect)

This means it isn't the scanner. It's the texture loading.

I Just have to now figure out how to alter this line of code to work with web start

texture[0] = TextureLoader.getTexture("PNG", new FileInputStream("stonewall02.png"));

In Topic: [java] How do I load resources for Web start?

23 June 2011 - 05:44 AM

Thanks guys.

As it stands I couldn't get this working. Heres the additions I made based on a boolean flag for selecting webStart.

   if (useWebStart == true) {

        InputStream inputStream = getClass().getResourceAsStream( "/" + "stonewall02.png" );
        InputStream inputStream2 = getClass().getResourceAsStream( "/" + "dirt.png" );
        InputStream inputStream3 = getClass().getResourceAsStream( "/" + "stonefloor03.png" );
        texture[0] = TextureLoader.getTexture("PNG", inputStream);
        texture[1] = TextureLoader.getTexture("PNG", inputStream2);
        texture[2] = TextureLoader.getTexture("PNG", inputStream3);
        if (useWebStart == false ) { 
        texture[0] = TextureLoader.getTexture("PNG", new FileInputStream("stonewall02.png"));
        texture[1] = TextureLoader.getTexture("PNG", new FileInputStream("dirt.png"));
        texture[2] = TextureLoader.getTexture("PNG", new FileInputStream("stonefloor03.png"));        

        File typeFile = new File(filename);
        InputStream inputstream = getClass().getResourceAsStream( "/" + filename );
   	if (useWebStart == false) {
            fileReader = new Scanner(typeFile);
   	if (useWebStart == true) {
       	fileReader = new Scanner(inputstream);

These are the only places in the program that were accessing resource files... I can't imagine what's wrong except perhaps the Slick-util texture loader was expecting a fileInputStream and/or maybe the scanner which I hadn't mentioned the first time should be something different.

Any more ideas? Thanks I do appreciate the help.

In Topic: Lesson 10 is all MODELVIEW. How can i change?

21 June 2011 - 01:32 AM


Well I'm sorry for trying to help...it seems like this forum is dead so I thought it'd be okay to try and help with the little knowledge I have

Thanks mate you were helpful. I hadn't even considered gluLookat and I think it will solve a lot of my other problems.

Overlord thanks mate. You answered my question and taught me some very valuable stuff.

In Topic: Need help with Voxels (depth testing etc)

21 June 2011 - 01:27 AM

Thanks mate.

It would seem that the industry players such as Minecraft use Vertex buffer objects to get the job done. I'll have to focus my attention towards how they work, so far it seems quite confusing.