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 (535)
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  
  javaDeploy.js  (Read 1761 times)
0 Members and 1 Guest are viewing this topic.
Offline MonsterOfCookie

Junior Member


Medals: 2


Gar


« Posted 2011-02-23 16:34:31 »

Hey All,

Am new to this forum, recently discovered you guys after I was googling a problem - definitely a fantastic resource here.

I have given this forum a good search looking for peoples thoughts/views on the javaDeploy.js mechanism for embedding applets into a webpage. I followed Sun/Oracles procedure for using this method of deployment for my game and it threw up some interesting results. Namely that the applet tag generated by the javascript is infact incomplete, as in there is no closing tag - This then has a knock effect of people using a browser/OS combo of Safari/Mac OSX having the inability to start the applet. I was also interested to see that the javascript never generated an object tag despite W3C saying it is the preferred tag for applets and that applet is infact deprecated.

One thing I did glean from these forums is that alot of people still use the applet tag. So I was thinking, is this route generally preferred over the javascript? Why does no one (Including Oracle/Sun) use the object tag? I have also notice quite a few recommendations on parameters to pass into the applet, is there a definitive selection people now use as standard?

Would really like to hear some thoughts on this.

Cookie


Online CommanderKeith
« Reply #1 - Posted 2011-02-23 17:27:31 »

Good question. It's basically a mess. There's not just a variety of tags to use, you can also use a jnlp file to make an applet too. I don't think anyone uses that javascript deployment script. It was basically a complex way to detect if java exists and if it does, what version is available. Most of us just use the APPLET tag and hope that java is installed and if not then keep our fingers crossed that the user's browser tells them so, which most browsers do.

By the way I tried to figure out applets a little while ago and got very frustrated. Here's a thread which detailed my troubles and solution:

http://www.java-gaming.org/topics/applet-trouble-long-pause-due-to-download/23716/view.html

There's a wealth of expertise on Applet deployment here, especially kappa and the other LWJGL devs who figured out the excellent LWJGL applet launcher.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 744
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2011-02-23 21:26:26 »

To intercept whatever javaDeploy.js is doing, I use this code:

1  
2  
3  
4  
var intercepted = ''; var documentWriteFunc = document.write;
document.write = function(arg){intercepted += arg;}
deployJava.runApplet(appletAttributes, appletParameters, '1.6');
document.write = documentWriteFunc;

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline MonsterOfCookie

Junior Member


Medals: 2


Gar


« Reply #3 - Posted 2011-02-23 21:36:52 »

Thanks for the info peeps. It's a shame Sun/Oracle never nailed this...

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #4 - Posted 2011-02-23 22:14:15 »

One thing I did glean from these forums is that alot of people still use the applet tag. So I was thinking, is this route generally preferred over the javascript? Why does no one (Including Oracle/Sun) use the object tag? I have also notice quite a few recommendations on parameters to pass into the applet, is there a definitive selection people now use as standard?

In short, Sun/W3 depreciated the <applet> tag in favour of the <object> tag. Surprisingly IE implemented it but for whatever reason Mozilla implemented the <embed> tag instead. However both browsers still supported the <applet> tag for backward compatibility reasons. Thus till this day the <applet> tag is the simplest way to use applets as it just works on all the browsers even though it was depreciated by Sun/W3.

Using JavaScript has its advantages as you can detect the browser and use it to automatically pick the appropriate tag for the applet. Further it has the advantage of being able to detect java (in most cases) and point you to the java.com site if missing or if its out of date.

However since the JavaScript route adds a bit of complexity to deployment many avoid it.
Offline SimonH
« Reply #5 - Posted 2011-02-24 04:06:41 »

Using JavaScript can be very useful if you want to dynamically link html elements and applets, but unless you actually want to I'd use <applet>.

People make games and games make people
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.

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

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

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

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

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

Riven (28 views)
2014-07-23 20:56:16

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

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

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

MustardPeter (44 views)
2014-07-16 23:30:00
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!