Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  Applet Demo smooth download and splash (Updated 2007-12-13) : New version  (Read 17964 times)
0 Members and 1 Guest are viewing this topic.
Offline DzzD
« Reply #30 - Posted 2007-12-04 21:23:16 »

Quote
you can easily have a big jar file without resources - and then this doesn't really work. It mitigates it a bit, but it doesn't really fix it

so why not loading it at runtime ?

My thought it that this JavaScript doesn't solve all problems but it make the first step of starting and applet looks a lot more better, if you want to use some big jar than simply load them at runtime!! and show a progress bar in java. that's all nothing really hard to achieve. the goal was to enable anyapplet to use it without modifications.

Quote
Yeah, just to instantiate URLClassLoader requires the "createClassLoader" permission, not given to applets. If you did have the permission, though, a custom class loader would be better because you could track the progress of the download, for the sake of a progress bar.


from http://forum.java.sun.com/thread.jspa?forumID=4&threadID=435579 cant work ?
Quote
For anyone else that has also run into this problem and wants a simple solution I created this class:
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  
/*
* Created on Aug 11, 2004
*/

import java.io.*;
import java.net.*;
import java.util.*;
import java.util.jar.*;

/**
* @author Matthew D. Hicks
*/

public class JARClassLoader extends URLClassLoader {
protected File file;
protected JarFile jar;

public JARClassLoader(File file) throws MalformedURLException, IOException {
super(new URL[] {file.toURL()});
this.file = file;
this.jar = new JarFile(file);
}

public Class[] getClasses() throws ClassNotFoundException {
ArrayList list = new ArrayList(500);
Enumeration e = jar.entries();
JarEntry entry;
while (e.hasMoreElements()) {
entry = (JarEntry)e.nextElement();
if ((!entry.isDirectory()) && (entry.getName().endsWith(".class"))) {
list.add(entry.getName().replaceAll("/", ".").substring(0, entry.getName().length() - 6));
}
}
Class[] classes = new Class[list.size()];
for (int i = 0; i < list.size(); i++) {
classes = this.loadClass((String)list.get(i));
}
return classes;
}

public static void main(String[] args) throws Exception {
File file = new File("myclasses.jar");
JARClassLoader loader = new JARClassLoader(file);
Class[] classes = loader.getClasses();
for (int i = 0; i < classes.length; i++) {
System.out.println("Class: " + classes.getName());
}
}
}

Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #31 - Posted 2007-12-04 23:41:34 »

I suggested 4 things already...

Then I must not have understood it. The typical example where this example probably would be applied, would be an applet game, say ~250K large and a user with win XP, FF 2.0 or IE 6-7 and Java 1.4.

Could you put up an example using your suggestions, where this user would get as pleasant loading and startup experience as a typical flash game or as this shared code example? I would really like to see that, since it would be really useful to me.

How do you fool someone when the applet you're delivering is 2-3MB, try his stuff with that... You will be looking at a boring gif for a long time...
Well, I am not quite sure how it works to be honest, but wouldn't an animated gif be a hell of a lot better than a frozen browser for the same amount of time? He is just offering some code to people who might want to use it. He never said that it would end world hunger or even make applets load in a perfect way for any conceivable situation, just that it might provide a more pleasant loading experience for typical applet games I assume.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #32 - Posted 2007-12-05 06:30:31 »

so why not loading it at runtime ?

My thought it that this JavaScript doesn't solve all problems but it make the first step of starting and applet looks a lot more better, if you want to use some big jar than simply load them at runtime!! and show a progress bar in java. that's all nothing really hard to achieve. the goal was to enable anyapplet to use it without modifications.
you can't load code at runtime, unless you're signed. Signing is bad because of the "scary" dialog.

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

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #33 - Posted 2007-12-05 06:39:11 »

Then I must not have understood it. The typical example where this example probably would be applied, would be an applet game, say ~250K large and a user with win XP, FF 2.0 or IE 6-7 and Java 1.4.
250k on a dial up modem is probably at least a minute of waiting where you dont see anything but the standard java loader. I want a fix where I can take over immediatly after bootstraping using a small 3-5k jar payload.

Could you put up an example using your suggestions, where this user would get as pleasant loading and startup experience as a typical flash game or as this shared code example? I would really like to see that, since it would be really useful to me.
it can't be done without signing the applet, which defeats the whole purpose.
You need to look at it this way. A flash applet is launched as soon as its possible to play the first part of the movie. An applet is launched as soon as _all_ of the code has been downloaded - regardless if its used from the instantiated applet class.

Well, I am not quite sure how it works to be honest, but wouldn't an animated gif be a hell of a lot better than a frozen browser for the same amount of time? He is just offering some code to people who might want to use it. He never said that it would end world hunger or even make applets load in a perfect way for any conceivable situation, just that it might provide a more pleasant loading experience for typical applet games I assume.
The freezing issue is the least of my worries - it usually just takes a second or two. My main problem is the lack of a proper splash screen on large applets - like Flash has. This solution doesn't fix it.
Furthermore I have continually said that this solution is a fine solution, but its still doesn't fix anything, its just hiding the issues. The real issue can unfortunately only be fixed by Sun.

Hopefully when the GPL'ed version of the new Java plugin is released we can fix it ourselves.

Offline thijs

Junior Duke




Lava games rock!


« Reply #34 - Posted 2007-12-05 09:16:21 »

250k on a dial up modem is probably at least a minute of waiting where you dont see anything but the standard java loader. I want a fix where I can take over immediatly after bootstraping using a small 3-5k jar payload.
it can't be done without signing the applet, which defeats the whole purpose.

You need to look at it this way. A flash applet is launched as soon as its possible to play the first part of the movie. An applet is launched as soon as _all_ of the code has been downloaded - regardless if its used from the instantiated applet class.

I understand your concerns and I struggled with this too when developing (applet) webgames. But a typical webgame is no more than 50K (for it's classes), while my data files where typically 200K+. The datafiles can be easily downloaded & cached at runtime with the technique described earlier in this thread while displaying some (loading) screens in your applet. This is what I did for Arcazoid and I never heard a complaint from modem users.

If your classes are over 250K you're maybe better off with a little bootstrap loader and a signed class which can be instanciated at runtime from this (sandboxed) loader class (also described somewhere in this thread). I shouldn't worry too much about users being scared away of the security dialog. Some of the most popular webgames require users accepting security warnings about activex, shockwave/java certificates, they almost always click any message away with OK (without even bothering what the message is about). Also a bootstrap class that initiates the signed class, you'd be able to show some fancy animation explaining the action to the user.

Edit:
Offcourse an improved JVM could help a lot with these issues, fixing this problem at its roots and enabeling us to do more fancy stuff. But unfortunatly most of us need to be backward compatible as older JVM's like 1.4 are probably here to stay for a little while longer. Using a combination of the techniques described in this post we could create an as good as possible user expirience even for the ones not fully up to date.

<a href="http://www.dzzd.net">3DzzD!</a>
<a href="http://www.arcazoid.com">Arcazoid!</a>
Offline DzzD
« Reply #35 - Posted 2007-12-05 09:51:52 »

Quote
The real issue can unfortunately only be fixed by Sun.

I undestand what you mean but!!! I have a good new  Smiley , there is maybe a warkaound that could works with any applets and any JVM,  I am working on such sample today if I have enought time I should be able to post it today.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #36 - Posted 2007-12-05 10:17:59 »

I understand your concerns and I struggled with this too when developing (applet) webgames. But a typical webgame is no more than 50K (for it's classes), while my data files where typically 200K+. The datafiles can be easily downloaded & cached at runtime with the technique described earlier in this thread while displaying some (loading) screens in your applet. This is what I did for Arcazoid and I never heard a complaint from modem users.
I dont do "typical" applets - but multiplayer applets that approach 500k in size, obfuscated.

If your classes are over 250K you're maybe better off with a little bootstrap loader and a signed class which can be instanciated at runtime from this (sandboxed) loader class (also described somewhere in this thread). I shouldn't worry too much about users being scared away of the security dialog. Some of the most popular webgames require users accepting security warnings about activex, shockwave/java certificates, they almost always click any message away with OK (without even bothering what the message is about). Also a bootstrap class that initiates the signed class, you'd be able to show some fancy animation explaining the action to the user.
Signing isn't an option. Not only do we support Java 1.1 but the distribution and signing of 1.1 and 1.3+ makes it less ideal. Furthermore a security dialog will make people less likely to play a game - this is a fact. We tried it.

Edit:
Offcourse an improved JVM could help a lot with these issues, fixing this problem at its roots and enabeling us to do more fancy stuff. But unfortunatly most of us need to be backward compatible as older JVM's like 1.4 are probably here to stay for a little while longer. Using a combination of the techniques described in this post we could create an as good as possible user expirience even for the ones not fully up to date.
Fortunately a lot of people are upgrading to 1.4 and once they get onto 1.4 they auto-update to newest version often. However we're still seeing a lot of people using 1.1 Sad
1.2 and 1.3 users are somewhat rare.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #37 - Posted 2007-12-05 10:18:39 »

I undestand what you mean but!!! I have a good new  Smiley , there is maybe a warkaound that could works with any applets and any JVM,  I am working on such sample today if I have enought time I should be able to post it today.
oh, that sounds nice - looking forward to whatever you come up with Smiley

Offline JonathanC

Senior Newbie





« Reply #38 - Posted 2007-12-05 18:10:32 »

The real issue can unfortunately only be fixed by Sun.

Sun will fix it, no doubt, but my worry is whether users will all have this new plugin. It's catch-22. Sad
Offline DzzD
« Reply #39 - Posted 2007-12-06 13:33:32 »

I slept all the day yesterday, but today I have done some work and after investigating a lot of differents possibilities I finnaly found a workable workaround :-), works with all JVM including MSJVM to SUNJVM 1.6, I have to polish it enought now, It simply enable runtime loading of an applet without signing problem, will try to post as soon as possible.

Tested on Window XP : Internet explorer/Firefox 1.5/Safari3.0.4

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DzzD
« Reply #40 - Posted 2007-12-06 19:43:22 »

Hum, this solution have some issue but it is fully compatible with all JVM, basically your load this applet using the above "3DzzDAppletScript.js" and replace int code this.appletToLoad="TestSimpleParticle"; by applet you would like to load.

Good things are : fully compatible all JVM, and near imediate starting of the Applet, does not requiere applet modification, allow customizing animation while loading

Bad things are: this does not allow use of archive applet tag (.jar),so to allow the applet to run you must expand your .jar server side, you have no information about loading progress.


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  
/**
 * Boot Applet Loader
 *
 * @author bruno augier
 * @email bruno.augier@dzzd.net
 * @website http://dzzd.net/
* @version 1.00 07/12/05
 */

 
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.io.*;
import java.lang.reflect.*;


public class BootAppletLoader extends Applet implements Runnable
{
   private Container panel;
   String appletToLoad;
   
   
   public void init()
   {  
      this.panel = this.getParent();
      this.appletToLoad="TestSimpleParticle";  
      Thread t=new Thread(this);
      t.start();
   }
   
   public void run()
   {
      try
      {
         Applet a=(Applet)(Class.forName(this.appletToLoad)).newInstance();
         panel.add(a);
         panel.remove(this);
         Dimension d=this.getSize();
         a.setSize(d.width,d.height);
         a.init();        
         a.start();

      }
      catch(ClassNotFoundException cnfe)
      {
         cnfe.printStackTrace();
         
      }
      catch(InstantiationException ie)
      {
         ie.printStackTrace();
         
      }
      catch(IllegalAccessException iae)
      {
         iae.printStackTrace();
         
      }        
   }

   public void paint(Graphics g)
   {
      this.update(g);
   }
   
   public void update(Graphics g)
   {
      g.drawString("Loading applet please wait", 50, 60 );
   }  
}


The above is a first try, I found another solution but it requiere a little serverside script, but this one allow archive tag use and progress monitoring and an immediate starting of a boot applet. not finished yet...

Offline DzzD
« Reply #41 - Posted 2007-12-07 23:46:01 »

JavaScript updated:

Better Jar and classe file cache, enable fast switch between applets once an applet have been loaded it can be started immediatly

http://demo.dzzd.net/JScripts/index2.htm

Offline Juriy

Junior Duke





« Reply #42 - Posted 2007-12-10 12:53:36 »

Got a problem with it in FireFox 2.0.0.11, WinXP, Java 1.6: gif is spinning forever, console is clear (all applets except first one). On IE everything is just fine.

http://voituk.kiev.ua - java tutorials, tips and tricks (Russian)
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #43 - Posted 2007-12-10 15:32:18 »

Hmmm I have same config, but FF will freeze for several seconds and not animate or max one tick before applet starts Huh. IE seems to be mostly OK, except for a hickup from a page reload. Didn't use to be there did it? For me, this last version was a small step back.  Undecided

Offline DzzD
« Reply #44 - Posted 2007-12-10 22:59:05 »

Quote
For me, this last version was a small step back.

yup i think so...

will try to improve it, I began to refound it from scratch


this page use another version:
http://demo.dzzd.net/EARTH/

let me know if you find problems on it

Offline DzzD
« Reply #45 - Posted 2007-12-13 13:43:46 »

new version, hope this one will works everywhere... seems that FF always hang few second, IE & Safari seems OK...

Waiting feedback from MAC & Linux users please.

demo using this loader:
http://demo.dzzd.net/EARTH/
http://demo.dzzd.net/JScripts/index2.htm
http://demo.dzzd.net/JScripts/

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  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
 
/**
       * 3DzzDAppletScript.js
       *
       * This source code is a part of 3DzzD Web 3D engine you may use it as long as you provide the orignal source author and website and this comment unmodified
       *
       * @author bruno augier
       * @email bruno.augier@dzzd.net
       * @website http://dzzd.net/
       * @version 1.00 2007/12/03
  */

 
  var jvmInited=false;
  var imageLoad=new Image();
  imageLoad.src="INIT.GIF";
  var preloadingJar = new Array();
 
  function loadApplet(targetAppletId,appletName,appletTag,width,height,preloadJarFiles)
  {
    if(document.getElementById(appletName))
      return;  
   
    var msg="Loading Applet "+ appletName;
    window.status=msg;
   var target=document.getElementById(targetAppletId);
   var html="";
    html+="<TABLE ID=\""+targetAppletId+"LOADER\" cellSpacing=0 cellPadding=0 WIDTH=\""+width+"\" HEIGHT=\""+height+"\" STYLE=\"border:0\" >";
    html+="<TR><TD vAlign=\"center\" align=\"middle\">";
   html+="<IMG ";
    html+=" ALT=\""+ msg + "\" ";
    html+=" SRC=\"INIT.GIF\" ";
    html+=" >";
    html+="</TD></TR></TABLE><DIV STYLE=\"visibility:hidden\" ID=\""+targetAppletId+"APPLET\"></DIV>";  
   target.innerHTML=html;
   var nbApplet=document.applets.length;
   
   if(preloadJarFiles!=null && preloadJarFiles.replace(" ","")!="")
   {
      preloadJars(preloadJarFiles);
      setTimeout("showAppletOnceStartedPreload(\""+targetAppletId+"\",\""+appletName+"\",\""+appletTag+"\",\""+width+"\",\""+height+"\",\""+preloadJarFiles+"\","+nbApplet+")",100);
   }
   else
   {
      setTimeout("showAppletOnceStarted(\""+targetAppletId+"\",\""+appletName+"\",\""+appletTag+"\",\""+width+"\",\""+height+"\","+nbApplet+")",100);
   }  
  }
 
  function showAppletOnceStartedPreload(targetAppletId,appletName,appletTag,width,height,preloadJarFiles,nbApplet)
  {
   if(!isJarsPreloaded(preloadJarFiles))
      setTimeout("showAppletOnceStartedPreload(\""+targetAppletId+"\",\""+appletName+"\",\""+appletTag+"\",\""+width+"\",\""+height+"\",\""+preloadJarFiles+"\","+nbApplet+")",1250);
   else
      setTimeout("showAppletOnceStarted(\""+targetAppletId+"\",\""+appletName+"\",\""+appletTag+"\",\""+width+"\",\""+height+"\","+nbApplet+")",250);
  }
 
  function showAppletOnceStarted(targetAppletId,appletName,appletTag,width,height,nbApplet)
  {
    var target=document.getElementById(targetAppletId+"APPLET");
   
   if(target.innerHTML.toUpperCase().indexOf("<APPLET ")==-1)
   {
      target.innerHTML+=appletTag;
      setTimeout("showAppletOnceStarted(\""+targetAppletId+"\",\""+appletName+"\",\""+appletTag+"\",\""+width+"\",\""+height+"\","+nbApplet+")",250);
      return;
   }
   
    if(jvmInited)
   {
      if(document.applets.length>nbApplet)
      {
          var applet=document.getElementById(appletName);
         if(applet!=null)
         {
            if(document.applets[appletName])
            {
               var msg="Applet loaded and started " + appletName;
               window.status=msg;
               setTimeout("showApplet(\""+targetAppletId+"\",\""+appletName+"\",\""+width+"\",\""+height+"\")",250);
               return;
            }  
         }
      }
   }
   setTimeout("showAppletOnceStarted(\""+targetAppletId+"\",\""+appletName+"\",\""+appletTag+"\",\""+width+"\",\""+height+"\","+nbApplet+")",250);
  }
 
  function showApplet(targetAppletId,appletName,width,height)
  {
   var applet=document.getElementById(appletName);
   var loader=document.getElementById(targetAppletId+"LOADER");
     loader.style.display="none";
   applet.width=width;
   applet.height=height;
   applet.style.width=width;
   applet.style.height=height;
   var target=document.getElementById(targetAppletId+"APPLET");
   target.style.visibility="visible";
  }
   
  function preloadJars(files)
  {
   var fileArray=files.replace(";",",").split(",");
   for(var c=0;c<fileArray.length;c++)
   {
    preloadJar(fileArray[c]);  
   }  
  }

 
  function isJarsPreloaded(files)
  {
   var fileArray=files.replace(";",",").split(",");
   for(var c=0;c<fileArray.length;c++)
   {
      if(!fileArray[c])
         return false;
   }
   return true;
  }

  function isJarPreloaded(name)
  {
   if(preloadingJar[name]==null)
      return false;
     
   return preloadingJar[name];  
  }
 
  function preloadJar(name)
  {
     
      if(preloadingJar[name])
      return;
       preloadingJar[name]=false;
       var f=window.frames[name];
       if(!f)
       {
            document.body.innerHTML+="<IFRAME NAME=\""+name+"\" WIDTH=0 HEIGHT=0 STYLE=\"border:0\"></IFRAME>";
            f=window.frames[name];
            f.document.open("text/html");
            var iframeHTML="";
            iframeHTML+="<HTML><BODY onload=\"parent.preloadingJar['"+name+"']=true;\" SCROLL=NO STYLE=\"margin:0\" >";
            iframeHTML+="<APPLET ARCHIVE=\""+name+"\" NAME=\""+name+"\" WIDTH=0 HEIGHT=0 ";
            iframeHTML+=" CODE = \"java.applet.Applet\" ";
            iframeHTML+="</APPLET>";
            iframeHTML+="</BODY></HTML>";
            f.document.write(iframeHTML);
            f.document.close();
       }
  }
  var initJVMCount=0;
  /**
       * Initialise Java JVM, this may hang few seconds
  */

  function loadJVM()
  {
       if(jvmInited)
       return;
       if(initJVMCount>15)
       {
            if(confirm("Java Plugin requiered, do you want to instal Java Plugin ?"))
            window.location.href="http://java.com/";
            jvmInited=true;
            return;
       }
       var f=window.frames["JVMLOADER"];
       if(!f)
       {
            document.body.innerHTML+="<IFRAME NAME=\"JVMLOADER\" WIDTH=0 HEIGHT=0 STYLE=\"border:0\"></IFRAME>";
            f=window.frames["JVMLOADER"];
            f.document.open("text/html");
            var iframeHTML="";
            iframeHTML+="<HTML><BODY SCROLL=NO STYLE=\"margin:0\" >";
            iframeHTML+="<APPLET WIDTH=0 HEIGHT=0 ";
            iframeHTML+=" CODE = \"java.applet.Applet\" ";
            iframeHTML+="</APPLET>";
            iframeHTML+="</BODY></HTML>";
            f.document.write(iframeHTML);
            f.document.close();
       }
       if(f.document.applets.length==0)
       {
            setTimeout("loadJVM()",2000);
            initJVMCount++;
            return;
       }
     
       // Workaround for Safari 3.0.4 embeded code crash windows XP with safari ?!
       if(navigator.userAgent.toUpperCase().indexOf("SAFARI")==-1)
       {
            try
            {
                 if(!f.document.applets[0].isActive())
                 {
                      setTimeout("loadJVM()",500);
                      initJVMCount++;
                      return;
                 }
            }
            catch(e)
            {
                 setTimeout("loadJVM()",500);
                 initJVMCount++;
                 return;
            }
       }
       jvmInited=true;
       f.document.open("text/html");
       var iframeHTML="";
       iframeHTML+="<HTML><BODY SCROLL=NO STYLE=\"margin:0\" >";
       iframeHTML+="</BODY></HTML>";
       f.document.write(iframeHTML);
       f.document.close();
  }

 

Offline brackeen

Junior Duke





« Reply #46 - Posted 2007-12-14 08:56:09 »

Hmm, I tried the Earth demo on FF/Mac.. after the loading gif it says "applet started" in the status bar but it doesn't just the applet - it's just black.

Worked ok in Safari.
Offline appel

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #47 - Posted 2007-12-14 15:17:46 »

Black background is faster  Grin

Nice work though, everyone, good discussion... I'm highly interested in this topic as we all are!

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline DzzD
« Reply #48 - Posted 2007-12-15 00:02:29 »

Once again another try with another JavaScript code, this loader make me become crazy.... browsers have so much differences... liveconnect dont works on some, javascript to java dont work on some other... is it easy to make s smooth loader for IE, this is not easy for other browser....

anyways feedback for this try are welcome:
http://demo.dzzd.net/PLANETARIUM/

Offline tom
« Reply #49 - Posted 2007-12-17 07:48:00 »

Wow, that really f***edup firefox good!

The paged hanged with the following output to the java console:

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  
Exception in thread "Thread-6" java.lang.NullPointerException
   at ZarchApplet.paint(Unknown Source)
   at ZarchApplet.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
com.zerog.ia.download.WebInstallerApplet[panel0,0,0,0x0,invalid,hidden,layout=java.awt.FlowLayout]
sun.plugin.AppletViewer[com.zerog.ia.download.WebInstallerApplet,0,0,525x85,invalid,layout=java.awt.BorderLayout]
sun.plugin.viewer.frame.WNetscapeEmbeddedFrame[frame0,0,0,525x85,invalid,layout=java.awt.BorderLayout,title=,resizable,normal]
initializing AppletResourceBundle strings for en
input stream is null
Platform :  windows
VM Vendor:  sun
VM Version: 1.6.0_02
IsSupportedVM:  true
-----------------------
Java Vendor:  Sun Microsystems Inc.
URL:  http://java.sun.com/
Java Version:  1.6.0_02
Java Class Version:  50.0
OS Name:  Windows XP
OS Architecture:  x86
OS Version:  5.1
---------------------------------
Timeout set to :30000
immediateInstall:  false
Trouble e-mail address:  yourEmailAddressHere
installerNameVM:
installerNameVM: Windows/VM/CollabTraining_Installer.exe
Reading applet parameters: Reading in data for platform #1; platform name = Windows
Reading applet parameters: Platform #2 not found.
Reading applet parameters: Platform #3 not found.
installerNameVM:
installerNameVM: Linux/VM/CollabTraining_Installer.bin
Reading applet parameters: Reading in data for platform #4; platform name = Linux
Reading applet parameters: Platform #5 not found.
Reading applet parameters: Platform #6 not found.
installerNameVM:
installerNameVM: null
installerNameVM: null
Reading applet parameters: Reading in data for platform #7; platform name = Mac OS X
Reading applet parameters: Platform #8 not found.
Reading applet parameters: Platform #9 not found.
Reading applet parameters: Platform #10 not found.
Reading applet parameters: Platform #11 not found.
Reading applet parameters: Platform #12 not found.
Reading applet parameters: Platform #13 not found.
Reading applet parameters: Platform #14 not found.
Reading applet parameters: Platform #15 not found.
Reading applet parameters: Platform #16 not found.
Reading applet parameters: Platform #17 not found.
Reading applet parameters: Platform #18 not found.
Reading applet parameters: Platform #19 not found.
Reading applet parameters: Platform #20 not found.
currentOS = Windows XP
runOnPlatformsContainingString = Win
curPlatformSubstring = Win
* Found: Running on platform: Windows

Does Installer with VM exist: true
Does Installer no VM exist:   false
Is this Platform Unix:        false

failed to resolve user.home, assuming unsigned and cannot execute
Is unable to execute files because of permissions
java.lang.NullPointerException
   at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
   at sun.applet.AppletPanel.runLoader(Unknown Source)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
java.lang.InterruptedException
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java:485)
   at sun.plugin.ClassLoaderInfo.lock(Unknown Source)
   at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
   at sun.applet.AppletPanel.runLoader(Unknown Source)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


I could no longer open the other tabs in FF. Menus and toolbar buttons seemed to be ok. But when I typed in the url textfield the text went backwards, from right to left. Closed FF and when I opened it again and got a message that FF was still running. Had to kill it from the taskmanager.

Firefox 2.0.0.11, Windows XP

Offline thijs

Junior Duke




Lava games rock!


« Reply #50 - Posted 2007-12-17 08:54:23 »

That console output seems to come from another applet. This applet probably halted /didnt close properly before starting ours (I had this occasionally myself. FF & applet exceptions dont really go along nicely, always need to kill it trhough the taskmanager)

Could you retry by going to the link directly?

<a href="http://www.dzzd.net">3DzzD!</a>
<a href="http://www.arcazoid.com">Arcazoid!</a>
Offline tom
« Reply #51 - Posted 2007-12-17 10:34:16 »

Tried it again and now it worked. Well, the loading hangs when trying to view a third planet.

Offline DzzD
« Reply #52 - Posted 2007-12-17 15:42:19 »

Quote
Tried it again and now it worked. Well, the loading hangs when trying to view a third planet.

yup, sry my fault, forgot to release applets ressources and threads on destroyed/stopped.... so heap is growing up...: implementing destroy method and releasing ressource and thread should fixe most of thoses bugs....

I apologize....


Quote
Exception in thread "Thread-6" java.lang.NullPointerException
   at ZarchApplet.paint(Unknown Source)
   at ZarchApplet.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
this mean that I am not alone to forget releasing thread  Smiley, I guess you played zarch before looking to this applet.

Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #53 - Posted 2007-12-17 18:14:17 »

this mean that I am not alone to forget releasing thread  Smiley, I guess you played zarch before looking to this applet.

Zarch is a 4K game thought.  It will not usually follow the rules.

Offline DzzD
« Reply #54 - Posted 2007-12-18 10:41:26 »

Zarch is a 4K game thought.  It will not usually follow the rules.

no prob, ofcourse, i know this is mormal/common issue in 4k games

Offline zammbi

JGO Coder


Medals: 4



« Reply #55 - Posted 2008-05-23 11:45:52 »

Just so you know I got this crash:
Quote
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
   at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
   at java.awt.image.BufferedImage.<init>(Unknown Source)
   at dzzd.k.<init>(Unknown Source)
   at dzzd.e.a(Unknown Source)
   at dzzd.e.setSize(Unknown Source)
   at dzzd.V.setSize(Unknown Source)
   at dzzd.DzzDApplet.a(Unknown Source)
   at dzzd.DzzDApplet.start(Unknown Source)
   at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Current project - Rename and Sort
Offline DzzD
« Reply #56 - Posted 2008-05-27 21:46:09 »

thanks I may review that later as I do not work anymore on this tools, too many things to do.... as everybody....

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.

Longarmx (35 views)
2014-10-17 03:59:02

Norakomi (26 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (52 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (76 views)
2014-10-11 22:30:10
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!