Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  
  Why is getting a LWJGL applet to display in the browser utter hell!?  (Read 2719 times)
0 Members and 1 Guest are viewing this topic.
Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Posted 2012-10-06 00:32:02 »

I'm serious... I've tried... I put in hours a night for over a week and a half now, and I cannot get (http://kappa.dreamhosters.com/bubblemark/bubblemark.html) to display in a webpage. I know it can be done, I can see it on bubblemark.html!

Do I suck!? Should I light my CS degree on fire!? Why is it such a bitter pill to place an applet running slick/LWJGL in a browser?

I tried following the tutorial here: http://ninjacave.com/lwjglapplet and I get one error after another. Is there anyone out there that knows how to get this thing running, I'm fresh out of ideas...



-Scott

Offline Ultroman

JGO Knight


Medals: 24
Projects: 1


Snappin' at snizzes since '83


« Reply #1 - Posted 2012-10-06 00:45:11 »

Hi

I'm sorry, but I know nothing of this subject yet, but you need to post some code. Something you've tried. Your main way of setting it up. We don't even know if you're using webstart or whatever. Give the guys something, and I'm sure they'll help you.

- Jonas
Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #2 - Posted 2012-10-06 00:46:44 »

Thanks Ultroman, I'll post something up here in just a second.  Smiley


So basically this is what I've got:

Directory Structure:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
myproject
+--> .settings\
        --> org.eclipse.jdt.core.prefs
+--> bin
        --> applet.html
        --> Ball.class
        --> DisplayExample.class
        --> myproject.jar
+--> build
        +--> classes
                +--> appletComponentArch
                       --> Ball.class
                       --> DisplayExample.class
+--> lib (I don't think I really need all of these... I could be wrong though)
        --> AppleJavaExtensions.java
        --> asm-debug-all.jar
        --> jinput.jar
        --> linux_natives.jar
        --> lwjgl.jar
        --> lwjgl_applet.jar
        --> lwjgl_test.jar
        --> lwjgl_util.jar
        --> lwjgl_util_applet.jar
        --> lwjgl-debug.jar
        --> slick.jar
        --> solaris_natives.jar
        --> windows_natives.jar

+--> src
        --> Ball.jara
        --> DisplayExample.java
.classpath
.project


Ball.java
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;

public class Ball {

   float x, y;
   float dy, dx;
   
   DisplayExample test;
   
   Image ballImage;
   
   public Ball(Image ballImage, int x, int y) {
      this.ballImage = ballImage;
     
      this.x = x;
      this.y = y;
     
      this.dx = 0.1f;
      this.dy = 0.1f;
   }
   
   public void update(int delta) {
     
      // ball movement
     x += dx * delta;
      y += dy * delta;
     
      // wall collision
     if (x < 0) {
         x = 0;
         dx = -dx;
      }
     
      if (x > 1500 - 52) {
         x = 1500 - 52;
         dx = -dx;
      }
     
      if (y < 0) {
         y = 0;
         dy = -dy;
      }
     
      if (y > 300 - 52) {
         y = 300 - 52;
         dy = -dy;
      }
   }
   
   public void draw(Graphics g) {
      ballImage.draw(x, y);
   }
   
   public boolean isCollision(Ball other) {
     
      // perform circle collision test
     float dx = other.x-x;
      float dy = other.y-y;
     
      if ((dx * dx) + (dy * dy) < (26 + 26) * (26 + 26)) {
         return true;
      }
     
      return false;
   }
   
   public void collidedWith(Ball other) {
     
      // hack to stop balls stick on top of each other
     if ((int) x == (int)other.x && (int)y == (int)other.y) {
         other.x = (int)(Math.random() * 1500);
         other.y = (int)(Math.random() * 300);
         return;
      }
     
      // calculate some vectors
       double dx = this.x - other.x;
        double dy = this.y - other.y;
        double dvx = this.dx - other.dx;
        double dvy = this.dy - other.dy;
       
        double distance2 = dx*dx + dy*dy;
       
        // make absolutely elastic collision
       double mag = dvx*dx + dvy*dy;
       
        // test that balls move towards each other
       if (mag > 0)
            return;
       
        mag /= distance2;
       
        double delta_vx = dx*mag;
        double delta_vy = dy*mag;
       
        this.dx -= delta_vx;
        this.dy -= delta_vy;
       
        other.dx += delta_vx;
        other.dy += delta_vy;
   }
}


DisplayExample.java
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
import static com.esotericsoftware.scar.Scar.keystore;
import static com.esotericsoftware.scar.Scar.lwjglApplet;
import static com.esotericsoftware.scar.Scar.lwjglAppletHtml;

import java.io.IOException;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.opengl.renderer.Renderer;


import static com.esotericsoftware.scar.Scar.*;
import com.esotericsoftware.scar.Scar;
import com.esotericsoftware.wildcard.Paths;
import com.esotericsoftware.scar.Project;

import com.esotericsoftware.wildcard.Paths;

/**
 * Bubble Mark
 *
 */

public class DisplayExample extends BasicGame {
   
   /** Number of Balls */
   Ball balls[] = new Ball[2500];
   
   /** number of Balls to display */
   int numberOfBalls = 16;
   
   /** Collision Delay */
   int collisionDelay = 30, collisionTime;
   
   /** Slick container */
   GameContainer container;
   
   /** Vsync */
   boolean vsync = false;
   
   /**
    * Create a new image rendering test
    */

   public DisplayExample() {
      super("BubbleMark");
   }
   
   /**
    *
    */

   public void init(GameContainer container) throws SlickException {
     
      this.container = container;
     
      container.setShowFPS(false);
     
      // load ball image
     Image ballImage = new Image("C:\\Users\\Scott\\Desktop\\slick\\ball.png");
     
      // initilise balls
     for (int i = 0; i < balls.length; i++) {
         balls[i] = new Ball(ballImage, (int)(Math.random() * 1000), (int)(Math.random()* 300));
      }
     
   }

   /**
    *
    */

   public void update(GameContainer container, int delta) {
     
      // update ball movement
     for (int i = 0; i < numberOfBalls; i++) {
         balls[i].update(delta);
      }
     
     
      if (collisionDelay < collisionTime) {
         collisionTime = 0;
         
         // run colllision test
        for (int i = 0; i < numberOfBalls; i++) {
            for (int j = i+1; j < numberOfBalls; j++) {
               Ball ball = balls[i];
               Ball ball2 = balls[j];
               if (ball.isCollision(ball2)) {
                  ball.collidedWith(ball2);
               }
            }
         }
      }
      else {
         collisionTime += delta;
      }
   }
   
   /**
    * draw the balls
    */

   public void render(GameContainer container, Graphics g) {
      g.setBackground(Color.white);
     
      for (int i = 0; i < numberOfBalls; i++) {
         balls[i].draw(g);
      }
     
      g.setColor(Color.red);
      g.drawString("FPS : " + container.getFPS(), 10, 10);
      g.drawString("Balls : " + numberOfBalls, 10, 20);
      g.drawString(vsync ? "vsync : on" : "vsync : off", 10, 30);
   }

   /**
    *
    */

   public static void main(String[] argv) {
     
      try {
         
         // enable VA's
        Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);        
         
         AppGameContainer container = new AppGameContainer(new DisplayExample());
         container.setDisplayMode(1000,300,false);
         container.start();
         
      } catch (SlickException e) {
         e.printStackTrace();
      }
   }
   

   /**
    *
    */

   public void keyPressed(int key, char c) {
      switch (key) {
           case Input.KEY_1: numberOfBalls = 1; break;
           case Input.KEY_2: numberOfBalls = 2; break;
           case Input.KEY_3: numberOfBalls = 4; break;
           case Input.KEY_4: numberOfBalls = 8; break;
           case Input.KEY_5: numberOfBalls = 16; break;
           case Input.KEY_6: numberOfBalls = 32; break;
           case Input.KEY_7: numberOfBalls = 64; break;
           case Input.KEY_8: numberOfBalls = 128; break;
           case Input.KEY_9: numberOfBalls = 256; break;
           case Input.KEY_0: numberOfBalls = 2000; break;
           case Input.KEY_V: vsync = !vsync;
                         container.setVSync(vsync);break;
      }
   }
}



I'm sure many of you guys area aware... but I didn't write any of that code, and I plan on rewriting it once I can get the applet working in a browser.

applet.html
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
<html>
<head><title>Applet</title></head>
<body>
<applet code='org.lwjgl.util.applet.AppletLoader' archive='lwjgl_util_applet.jar, lzma.jar' codebase='.' width='640' height='480'>
<param name='al_version' value='1.0'>
<param name='al_title' value='applet'>
<param name='al_main' value='DisplayExample'>
<param name='al_jars' value='myproject.jar.pack.lzma'>
<param name='al_logo' value='appletlogo.png'>
<param name='al_progressbar' value='appletprogress.gif'>
<param name='separate_jvm' value='true'>
<param name='java_arguments' value='-Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false'>
</applet>
</body></html>



When I run the code, this is what I get:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
java.lang.ClassNotFoundException: org.lwjgl.util.applet.AppletLoader
   at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)



I'd really appreciate any help... Like I said, it's going on two weeks, and I've told myself I'm getting this game done one way or the other... lwjgl seems like the only way to go for what I'm trying to do though.


-Scott

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #3 - Posted 2012-10-06 01:54:09 »

Works fine for me.

EDIT:
Windows 7, AMD Phenom II X4 975 Processor 3.61 GHz
8.00 Gigs of Ram
64-bit
 
1  
2  
3  
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #4 - Posted 2012-10-06 02:06:51 »

Works fine for me.

EDIT:
Windows 7, AMD Phenom II X4 975 Processor 3.61 GHz
8.00 Gigs of Ram
64-bit
 
1  
2  
3  
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)



Same setup and everything!? man... what am I doing wrong : /

Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #5 - Posted 2012-10-06 02:10:53 »

This might be helpful, I don't know:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
basic: Applet initialized
basic: Starting applet
basic: completed perf rollup
basic: Applet made visible
basic: Applet started
basic: Told clients applet is started
Fri Oct 05 17:12:02 PDT 2012 INFO:Slick Build #239
ATTEMPTING METHOD 1
METHOD 1 SUCCESSFUL
Fri Oct 05 17:12:03 PDT 2012 INFO:Starting display 500x300
Fri Oct 05 17:12:03 PDT 2012 INFO:Controllers not available
Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #6 - Posted 2012-10-06 02:15:43 »

Ok, I added the following files to the /bin directory:

appletLogo.png
appletprogress.png
lwjgl_util_applet.jar

and I now get the following error:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
Java Plug-in 10.7.2.11
Using JRE version 1.7.0_07-b11 Java HotSpot(TM) Client VM
User home directory = C:\Users\Scott
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@b524aa
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security:  --- parseCommandLine converted : -Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false
into:
[-Dsun.java2d.noddraw=true, -Dsun.awt.noerasebackground=true, -Dsun.java2d.d3d=false, -Dsun.java2d.opengl=false, -Dsun.java2d.pmoffscreen=false]
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1b17b4c
basic: Plugin2ClassLoader.addURL parent called for file:/C:/Users/Scott/workspace/myproject/bin/lwjgl_util_applet.jar
basic: Plugin2ClassLoader.addURL parent called for file:/C:/Users/Scott/workspace/myproject/bin/lzma.jar
security: Blacklist revocation check is enabled
security: The jar file isnt signed so the blacklist check will be skipped
security: Trusted libraries list check is enabled
security: Trusted libraries list file not found
security: The jar file isnt signed so the blacklist check will be skipped
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/myproject/bin/lwjgl_util_applet.jar, version: null]
security: The jar file isnt signed so the blacklist check will be skipped
security: Trusted libraries list file not found
security: The jar file isnt signed so the blacklist check will be skipped
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/myproject/bin/lwjgl_util_applet.jar, version: null]
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 314050 us, pluginInit dt 490364 us, TotalTime: 804414 us
java.io.FileNotFoundException: \C:\Users\Scott\workspace\myproject\bin\lzma.jar
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsResource(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsResource(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsStream(Unknown Source)
   at sun.plugin2.applet.Applet2ClassLoader.getResourceAsStreamFromJar(Unknown Source)
   at com.sun.deploy.uitoolkit.impl.awt.Applet2ImageFactory$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.deploy.uitoolkit.impl.awt.Applet2ImageFactory.createImage(Unknown Source)
   at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$AppletContextImpl.getImage(Unknown Source)
   at java.applet.Applet.getImage(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.getImage(AppletLoader.java:2048)
   at org.lwjgl.util.applet.AppletLoader.getImage(AppletLoader.java:2018)
   at org.lwjgl.util.applet.AppletLoader.init(AppletLoader.java:365)
   at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
java.io.FileNotFoundException: \C:\Users\Scott\workspace\myproject\bin\lzma.jar
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
   at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsResource(Unknown Source)
   at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsStream(Unknown Source)
   at sun.plugin2.applet.Applet2ClassLoader.getResourceAsStreamFromJar(Unknown Source)
   at com.sun.deploy.uitoolkit.impl.awt.Applet2ImageFactory$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.deploy.uitoolkit.impl.awt.Applet2ImageFactory.createImage(Unknown Source)
   at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$AppletContextImpl.getImage(Unknown Source)
   at java.applet.Applet.getImage(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.getImage(AppletLoader.java:2048)
   at org.lwjgl.util.applet.AppletLoader.getImage(AppletLoader.java:2018)
   at org.lwjgl.util.applet.AppletLoader.init(AppletLoader.java:365)
   at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/myproject/bin/, version: null]
basic: Loaded image: file:/C:/Users/Scott/workspace/myproject/bin/appletlogo.png
basic: Loaded image: file:/C:/Users/Scott/workspace/myproject/bin/appletprogress.gif
basic: Applet initialized
basic: Starting applet
basic: completed perf rollup
basic: Applet made visible
basic: Applet started
basic: Told clients applet is started
no lwjgl natives files found
This occurred while 'Determining packages to load'
access denied ("java.util.PropertyPermission" "deployment.user.cachedir" "read")
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "deployment.user.cachedir" "read")
   at java.security.AccessControlContext.checkPermission(Unknown Source)
   at java.security.AccessController.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
   at java.lang.System.getProperty(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.getLWJGLCacheDir(AppletLoader.java:1064)
   at org.lwjgl.util.applet.AppletLoader$3.run(AppletLoader.java:1050)
   at org.lwjgl.util.applet.AppletLoader$3.run(AppletLoader.java:1038)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.util.applet.AppletLoader.getCacheDirectory(AppletLoader.java:1038)
   at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:843)
   at java.lang.Thread.run(Unknown Source)


-Pickle Smiley

Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #7 - Posted 2012-10-06 02:24:28 »

I also noticed the following in the output:

--no lwjgl natives files found
  - I placed ( linux_natives.jar, windows_natives.jar, solaris_natives.jar, and macosx_natives.jar) all in the bin directory... still get msg.

-- java.security.AccessControlException: access denied
  - I'll try signing the .jar file and see if that fixes this problem. (I thought it was signed)


-Pickle Smiley

Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #8 - Posted 2012-10-07 12:23:05 »

The link you put at the top seems to work fine for me, the applet loads fine?

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #9 - Posted 2012-10-07 16:59:13 »

The link works fine for me as well... but that's not something I put up... I'm trying to duplicate what they did on that link.


-Scott

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #10 - Posted 2012-10-07 18:46:04 »

That bubblemark applet is pretty old now and doesn't use any of the latest slick/lwjgl stuff (there have been tons of bug fixes to both libraries since).

I'd suggest you download the LWJGL Applet Package from the downloads page and start from there as it contains a working applet example inside.
Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #11 - Posted 2012-10-08 05:55:43 »

Well it looks like I'm actually making headway Smiley

When I run applet.html, It will display a popup asking the user if they want to run this signed applet, then windows asks if I want to block the applet.

After clicking yes to run the applet, and then clicking "no, don't block", I get the following error:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
Java Plug-in 10.7.2.11
Using JRE version 1.7.0_07-b11 Java HotSpot(TM) Client VM
User home directory = C:\Users\Scott
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@118a770
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.org.apache.xerces.internal.utils.,com.sun.org.apache.xalan.internal.utils.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security:  --- parseCommandLine converted : -Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false
into:
[-Dsun.java2d.noddraw=true, -Dsun.awt.noerasebackground=true, -Dsun.java2d.d3d=false, -Dsun.java2d.opengl=false, -Dsun.java2d.pmoffscreen=false]
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@116aeb
basic: Plugin2ClassLoader.addURL parent called for file:/C:/Users/Scott/workspace/LWJGLdemo/bin/LWJGLdemo.jar
basic: Plugin2ClassLoader.addURL parent called for file:/C:/Users/Scott/workspace/LWJGLdemo/bin/lwjgl_util_applet.jar
basic: Plugin2ClassLoader.addURL parent called for file:/C:/Users/Scott/workspace/LWJGLdemo/bin/lzma.jar
security: Blacklist revocation check is enabled
security: Trusted libraries list check is enabled
security: Trusted libraries list file not found
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/LWJGLdemo.jar, version: null]
security: Accessing keys and certificate in Mozilla user profile: null
security: Loading Deployment certificates from C:\Users\Scott\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
security: Loaded Deployment certificates from C:\Users\Scott\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Validate the certificate chain using CertPath API
security: Loading Root CA certificates from C:\Program Files\Java\jre7\lib\security\cacerts
security: Loaded Root CA certificates from C:\Program Files\Java\jre7\lib\security\cacerts
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is enabled
security: Use OCSP setting from certificate
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
basic: Dialog type is not candidate for embedding
security: User has granted the priviledges to the code for this session only
security: Adding certificate in Deployment session certificate store
security: Added certificate in Deployment session certificate store
security: Saving certificates in Deployment session certificate store
security: Saved certificates in Deployment session certificate store
security: Trusted libraries list file not found
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/lwjgl_util_applet.jar, version: null]
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is enabled
security: Use OCSP setting from certificate
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
security: Trusted libraries list file not found
security: Trusted libraries list file not found
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/lwjgl_util_applet.jar, version: null]
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is enabled
security: Use OCSP setting from certificate
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is enabled
security: Use OCSP setting from certificate
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 353526 us, pluginInit dt 3195223 us, TotalTime: 3548749 us
security: Trusted libraries list file not found
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/lzma.jar, version: null]
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is enabled
security: Use OCSP setting from certificate
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
security: Trusted libraries list file not found
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/, version: null]
basic: Dialog type is not candidate for embedding
basic: Loaded image: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/appletlogo.png
basic: Loaded image: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/appletprogress.gif
network: Cache entry not found [url: file:/C:/Users/Scott/workspace/LWJGLdemo/bin/lzma.jar, version: null]
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is enabled
security: Use OCSP setting from certificate
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
basic: Applet initialized
basic: Starting applet
basic: completed perf rollup
basic: Applet made visible
basic: Applet started
basic: Told clients applet is started
no lwjgl natives files found
This occurred while 'Calculating download size'
null
java.lang.NullPointerException
   at org.lwjgl.util.applet.AppletLoader.getJarInfo(AppletLoader.java:1348)
   at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:868)
   at java.lang.Thread.run(Unknown Source)


Anyone know what's wrong with this? or how to get around it?



-Pickle Smiley

Offline Pickleninja

JGO Coder


Medals: 10
Projects: 1


I'm tired of working for someone else.


« Reply #12 - Posted 2012-10-10 21:01:47 »

I got it working!

Thanks to all that helped me, especially Nate and ctomni231


Now I can finally begin reworking my game Cheesy



-Scott

Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #13 - Posted 2012-10-10 21:40:41 »

Woohoo! Smiley

Offline ctomni231

JGO Wizard


Medals: 98
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #14 - Posted 2012-10-11 00:50:17 »

No problem... If you have another problem, post it up Smiley

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.

ctomni231 (37 views)
2014-07-18 06:55:21

Zero Volt (35 views)
2014-07-17 23:47:54

danieldean (28 views)
2014-07-17 23:41:23

MustardPeter (31 views)
2014-07-16 23:30:00

Cero (46 views)
2014-07-16 00:42:17

Riven (47 views)
2014-07-14 18:02:53

OpenGLShaders (36 views)
2014-07-14 16:23:47

Riven (36 views)
2014-07-14 11:51:35

quew8 (32 views)
2014-07-13 13:57:52

SHC (69 views)
2014-07-12 17:50:04
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!