J2EE

A

Arne Vajhøj

OK, let me restate one of the options: If I decide that any lucky(?)
users will need a copy of my app on their PC if they want to use it, is
there an easier way for them to get it there than to follow instructions
that say (1) install the JRE, (2) unzip this archive onto your machine
(3) set up a launcher with the command line "java blah blah blah"? I
thought, from what Roedy said in the past that JWS might do that job but,
from what you say, it seems this may not be the case.

Java Web Start does exactly that. And I will strongly recommend
using that.

But I thought we were talking about web services.

Arne
 
A

Arne Vajhøj

My bad. I thought Java Web Start was part of web services.

I have never heard JWS considered a web service. It is more traditional
download than API call.

Arne
 
R

Richard Maher

I have never heard JWS considered a web service. It is more traditional
download than API call.

Why isn't this information <param name="java_version" value="1.7*">
enough to trigger an auto download of a compatible JRE if one does not
exists? Rather than being completely ignored :-(

(Yes, I know you were talking desktop APP but use myFile.config
<dickyXMLtag version>1.7*</xml> as an analogy if you like. Or
this.version.assert((1.7*") or "something")

I'm just so frustrated by all the cargo-cult programming these days and
in particular 10 tonnes of unfit for purpose crap like JWS)

Cheers Richard Maher
 
A

Arne Vajhøj

Why isn't this information <param name="java_version" value="1.7*">
enough to trigger an auto download of a compatible JRE if one does not
exists? Rather than being completely ignored :-(

I am not very good at JWS.

But based on the very little I have been using it then I would
expect the .jnlp file to contain:

<java version="1.7+" href="http://java.sun.com/products/autodl/j2se" />

Arne
 
M

markspace

But based on the very little I have been using it then I would
expect the .jnlp file to contain:

<java version="1.7+" href="http://java.sun.com/products/autodl/j2se" />


Yes, I was going to say the same thing: Richard might find it helpful
to read the manual and use the correct syntax. One web search turned up
this exact thing for me, in the Java tutorials on the Oracle website, no
less.
 
R

Richard Maher

Yes, I was going to say the same thing: Richard might find it helpful
to read the manual and use the correct syntax. One web search turned up
this exact thing for me, in the Java tutorials on the Oracle website, no
less.

Richard was/is talking Applets as usual and am quite happy to be told
that the syntax for the PARAM tag OBJECT tag combo is not what I've
quoted. Tried both + and * and just plain old 1.7 after deleting it and
only installing 1.6.

Still nothing without the WebStart crap :-(
 
M

markspace

Richard was/is talking Applets as usual and am quite happy to be told
that the syntax for the PARAM tag OBJECT tag combo is not what I've
quoted.


Fair enough, I didn't realize. What version of HTML? 5? 4.01? It might
make a difference.
 
R

Richard Maher

Fair enough, I didn't realize. What version of HTML? 5? 4.01? It might
make a difference.
I just say !DOCTYPE HTML these days. Is there a DTD designator I should
be using?

I'd really just settle for "The version of Java you require has not been
installed. You have to do it manually because those at JNLP hate you and
want to justify their existence and budget".

The lovely success/failure status routines we got in Java 7 would be a
nice place to stick an error report. (At least for very recent and
future version checks :)

I also thought FireFox (and other browsers?) only had one plugin now for
Java (launch and JRE)?

HOLD THE PHONE!!!

This from: -
https://addons.mozilla.org/en-US/firefox/blocked/p428

Java Deployment Toolkit (click-to-play) has been blocked for your
protection.

Why was it blocked?
The Java Deployment Toolkit plugin is known to be insecure and is
unnecessary in most cases. Users should keep it disabled unless strictly
necessary.
Who is affected?
All Firefox users who have this plugin installed.
What does this mean?

The problematic add-on or plugin will be automatically disabled and
no longer usable.
When Mozilla becomes aware of add-ons, plugins, or other
third-party software that seriously compromises Firefox security,
stability, or performance and meets certain criteria, the software may
be blocked from general use. For more information, please read this
support article.

Blocked on July 18, 2013. View block request.


The Numpties in JNLP and Applets are an industry-wide joke and too
embarrassing for someone with Larry's ego past successes and erstwhile
commitment to quality :-(

When is someone going to peel back the scab on this festering sore of
Applets and (Oh Oracle defines "RIA" aren't we clever) start sacking people?

That's put me off my corn-flakes :-(
 
M

markspace

I just say !DOCTYPE HTML these days. Is there a DTD designator I should
be using?


Doctype and everything else you posted is irrelevant to your problem. I
just checked: the <applet> tag is deprecated in HTML 4.01 but was
removed entirely in HTML 5. So it definitely matters.

You're not really trying, are you?

Are you sure you're not Twisted or Mentifix posting under a different
name? Because whatever frequency you're vibrating at doesn't involve
any software engineering, and doesn't have anything to do with Java or
applet deployment. If you're not (purposefully) trolling us, you might
want to slow down, take some time off, consult with some colleagues in
person, etc. to see if you can actually work out what's really bugging
you. It's not something we can solve here.
 
R

Richard Maher

Doctype and everything else you posted is irrelevant to your problem.

So what exactly *is* "relevant" here in your opinion ****-knuckle? Your
resume? What ensemble you've chosen today? Mirror mirror on the wall?
I
just checked: the <applet> tag is deprecated in HTML 4.01 but was
removed entirely in HTML 5. So it definitely matters.

Did anyone apart from your ignorant, incompetent arse mention the APPLET
tag here?

Do you not see the quoted "PARAM tag OBJECT tag combo" reference above???

For full details of what I *AM* doing see below for those who care about
facts. Needless to say the OBJECT/PARAM tags are, and continue to be
fully supported in htmlN and "markspace" continues to be the incompetent
twat that would shame a more talented troll into suicide. No wonder you
don't use your real name you walking fucking personality disorder.

Anyone else seen Oracle Java documentation along the lines of: -
http://download.java.net/jdk8/docs/technotes/guides/jweb/applet/applet_deployment.html
You're not really trying, are you?

Trying to get away from your unwanted and unwarranted advances? Yes!

It's not that I'm not a little flattered but I'm a confirmed
heterosexual and happily married so I have to decline your advances, at
least at this stage. (1)
Are you sure you're not Twisted or Mentifix posting under a different
name? Because whatever frequency you're vibrating at doesn't involve
any software engineering, and doesn't have anything to do with Java or
applet deployment. If you're not (purposefully) trolling us, you might
want to slow down, take some time off, consult with some colleagues in
person, etc. to see if you can actually work out what's really bugging
you. It's not something we can solve here.

I tell you what, why don't you Lew, Eric, and Thomas from c.l.js (and
your ilk) download a copy of GrindR (or TrollR) for your smart phones?
Then you can hook-up in a public-convenience somewhere and an wax anal
about your new script that trawls Usenet for spelling errors that you
can spend the next 8hrs correcting? "Oooh Thomas, you haven't said
anything on-topic for weeks!". "I know markspace, but your ability to
place you head up your arse at the slightest challenge inspires me! You
da Man! Shute 3 is free Bitch?".

***JUST LEAVE NORMAL PEOPLE ALONE!***

As someone who can't afford official support, I tolerate the torrent of
inane drivel that pours out of Usenet from the orifices of toss-pots
like you. It's worthwhile 'cos sometimes competent people like Arne,
Quoll, and Patricia find the time and sympathy to help me out. And for
that I'm very, very grateful!

But **** with me again and I'll go feral and track you down you prick. I
just don't have the time for it! Therefore I undertake to never respond
to any of your posts. Please pay me the same courtacy.

Regards Richard Maher

PS. The KIWIs just kicked your arse Larry you fucking loser! Loot at
Balmer at Microsoft and do the right thing. Let Java live and escape
your ego and the incompetence of those you employ to stroke!

PPS. Maybe markspace should create a new App called ReflectR? Wherever
you are in the world, it will always tell you where you are and if
you're up for it, (And not a single other soul on the radar!" Just
imagine the narcissistic frenzy that can take place after you've re-read
your posts here 10 times?

Real World: -

These Mosilla people really, really, rock and kick arse! Just look at
Larry's pox of JNLP and APEX and see what they're doing with App
Launching - Breathtaking!

(Maybe Ellison should hook-up with Balmer and talk about the old days?)

Tier3Client.js: -

**
* Copyright (c) Richard Maher. All rights reserved.
*
* Tier3Client class bridges JavaScript and Applet
* functionality.
*/

function Tier3Client(application,
codeBase,
port,
maxBuf,
successHndlr,
failureHndlr,
hostCharSet,
sslReqd,
handshake,
classpath,
idleTimeout,
tabMailboxSize,
verbosity)
{
if (arguments.length < 6) {
throw new Error("Insufficient arguments for Tier3Client");
}

if (typeof successHndlr != "function" || typeof failureHndlr !=
"function") {
throw new Error("The success/failure handler parameters must be
functions");
}

if (!navigator.javaEnabled()) {
alert("You must enable Java Applets in your browser\n" +
"before you can successfully access this page");
throw new Error("Java Applets are not enabled for browser");
}

var archiveName = "tier3Client.jar,";
var className = "tier3Client.Tier3Application.class";

this.application = application;
this.codeBase = codeBase;
this.port = port;
this.maxBuf = maxBuf;
this.successHndlr = successHndlr;
this.failureHndlr = failureHndlr;

this.hostCharSet = (hostCharSet == undefined || hostCharSet
== null) ? "ISO-8859-1" : hostCharSet;
this.sslReqd = (sslReqd == undefined || sslReqd
== null) ? "N" : sslReqd;
this.handshake = (handshake == undefined || handshake
== null) ? "Tier3Logon" : handshake;
this.classpath = (classpath == undefined || classpath
== null) ? "tier3Logon.jar" : classpath;
this.idleTimeout = (idleTimeout == undefined || idleTimeout
== null) ? 0 : idleTimeout;
this.tabMailboxSize = (tabMailboxSize == undefined ||
tabMailboxSize == null) ? 100 : tabMailboxSize;
this.verbosity = (verbosity == undefined || verbosity
== null) ? Tier3Client.WARNING : verbosity;

archiveName += classpath;

var appletId = "Tier3__" + this.application + "_Applet";

var idTaken;
try {
idTaken = document.getElementById(appletId);
}
catch (err) {};

if (idTaken != null) {
throw new Error("Tier3 Client already registered for " +
this.application);
return;
}

var appletParams = [{"name":"archive",
"value":archiveName },
{"name":"codebase", "value":codeBase
},
{"name":"code", "value":className
},
{"name":"java_version", "value":"1.7*"
},
{"name":"mayscript", "value":"true"
},
{"name":"scriptable", "value":"true"
},
{"name":"codebase_lookup", "value":"false"
},
{"name":"java_status_events","value":"true"
},
{"name":"permissions", "value":"sandbox"
},
{"name":"cache_option", "value":"no"
},
{"name":"APPLICATION",
"value":application },
{"name":"PORT", "value":port
},
{"name":"MAXBUF", "value":maxBuf
},
{"name":"HOSTCHARSET",
"value":this.hostCharSet },
{"name":"SSLREQD",
"value":this.sslReqd },
{"name":"HANDSHAKE",
"value":this.handshake },
{"name":"IDLETIMEOUT",
"value":this.idleTimeout },
{"name":"TABMAILBOXSIZE",
"value":this.tabMailboxSize},
{"name":"VERBOSITY",
"value":this.verbosity }];
var startParam = 0;

var objectTag = "<object ";

if (/Internet Explorer/.test(navigator.appName)) {
objectTag +=
'classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ';
} else {
objectTag +=
'type="application/x-java-applet" ' +
'archive="' + codeBase + archiveName + '" ';
startParam = 1;
}

objectTag += ' width= "0" height= "0" id="' + appletId + '">';

for (i=startParam; i<appletParams.length; i++){
objectTag += '<param name ="' + appletParams.name + '" ' +
'value ="' + appletParams.value + '">';
}

objectTag += "</object>";

var appletDiv = document.createElement("div");
document.body.appendChild(appletDiv);

try {
appletDiv.innerHTML = objectTag;
this.chan = document.getElementById(appletId);
}
catch(err) {
this.chan = null;
appletDiv.parentNode.removeChild(appletDiv);
throw new Error("Tier3 unable to load applet for " +
this.application + ": -\n" +
(err.description||err.message));
};
if (this.chan == null) {
throw new Error("Tier3 was unable to initialize the applet for
" + this.application);
}

(function(chan) {

var POLLINTERVAL = 250,
MAXPOLLCNT = 80,
retryCnt = 0,
dejaVu = false;
chan = chan;

var appletLoad = function(){
if (window.console) console.log("in onLoad status is " +
chan.status );
if (dejaVu) return;

dejaVu = true;

try {
if (!chan.isAuthorized()) {
throw new Error("Tier3 User Authentication
unsuccessful");
}
}
catch(err) {
if (window.console) console.log("Tier3 unable to load
applet: " + (err.description||err.message));
chan.setAttribute("id",null);
chan.parentNode.removeChild(chan);
chan = null;
failureHndlr.call(null, application, "Tier3 unable to
load applet for " + application + ": -\n" +

(err.description||err.message));
}
if (chan) {
successHndlr.call(null, application);
}
}

var appletError = function(){
if (window.console) console.log("in onError ");
}

var waitForAppletDOM = function() {
var appletStatus = ((chan.status||undefined) == undefined)
? 0 : chan.status;
if (window.console) console.log("in waitForAppletDOM type
of status is " + typeof appletStatus);
switch (Number(appletStatus)) {
case 1:
chan.onLoad = appletLoad;
chan.onError = appletError;
if (window.console) console.log("case 1");
case 0:
if (window.console) console.log("case 0");
if (++retryCnt > MAXPOLLCNT) {
throw new Error("Exceeded maximum retries for
Applet DOM");
}
setTimeout(waitForAppletDOM,POLLINTERVAL);
break;
case 2:
if (window.console) console.log("case 2");
appletLoad();
break;
case 3:
if (window.console) console.log("case 3");
failureHndlr.call(null, application, "Error
activating Applet");
break;
default:
failureHndlr.call(null, application, "Invalid
Applet status");
}
return;
}

waitForAppletDOM();

})(this.chan);

Tier3Client.applications[this.application] = this;
return this;
}

Tier3Client.FACPREFIX = "T3$";
Tier3Client.MAJVERS = 1;
Tier3Client.MINVERS = 0;
Tier3Client.DEBUG = 0;
Tier3Client.INFO = 1;
Tier3Client.WARNING = 2;
Tier3Client.ERROR = 3;
Tier3Client.FATAL = 4;

Tier3Client.errorPage = "Tier3Error.html";
Tier3Client.logoffPage = "Tier3Logoff.html";

Tier3Client.prototype = {

send:
function(msgBody, callback, async)
{
if (arguments.length < 2) {
throw new Error("Insufficient arguments for
send(msgBody, callback)");
}

if (typeof callback != "function") {
throw new Error("The 'callback' parameter must be a
function");
}

var noWait = true;
if (arguments.length > 2) {
if (typeof async != "boolean") {
throw new Error("The 'async' parameter must be a
boolean");
}
noWait = async;
}

var chan = this.chan;
var callbackArgs = new Array();
var responseCnt = 0;
var i = 0;

var msgCandidate =
{
msgSlotId : -1,
msgSeqNum : -1,
chan : chan,
callback : callback,
callbackArgs : callbackArgs,

dispatcher :
function(responseMsg,
msgSlotId,
msgSeqNum)
{
this.responseCnt++;
this.msgSlotId = msgSlotId;
this.msgSeqNum = msgSeqNum;
callbackArgs[0] = responseMsg;

try {
return callback.apply(this, callbackArgs);
}
catch (err) {
var errMsg = "Error calling callback
routine: -\n";
for (var prop in err) {
errMsg += " Property: " + prop + " Value:
" + err[prop] + "\n";
}
errMsg += " toString() = " + err.toString()
+ "\n";
errMsg += " msgSlotId = " + msgSlotId + "
msgSeqNum = " + msgSeqNum + "\n";
errMsg += " responseMsg = " + responseMsg;

chan.appendConsoleMsg("Client: " + errMsg);
throw new Error(errMsg);
}
},

getMsgSeqNum :
function() {
return this.msgSeqNum;
},

getResponseCnt:
function() {
return this.responseCnt;
}

};

for (i=3; i<arguments.length; i++) {
callbackArgs[i - 2] = arguments;
}

return chan.send(msgCandidate, msgBody, noWait);
},

appendConsoleMsg:
function(msg)
{
this.chan.appendConsoleMsg(msg);
}
};

Tier3Client.applications = {};
 
A

Arne Vajhøj

Richard was/is talking Applets as usual and am quite happy to be told
that the syntax for the PARAM tag OBJECT tag combo is not what I've
quoted. Tried both + and * and just plain old 1.7 after deleting it and
only installing 1.6.

You mean in an applet tag??

Nested param elements inside an applet or object tag are passed to
Java - the browser do not do anything with it.

So that construct will enable your applet to get the required Java
version - it will not do anything by itself.

Completely different from JNLP java element that gets processed
by Java before it calls the applet and has version check and update
capability.

I think you should look into JWS and JNLP.

Arne
 
A

Arne Vajhøj

Doctype and everything else you posted is irrelevant to your problem. I
just checked: the <applet> tag is deprecated in HTML 4.01 but was
removed entirely in HTML 5. So it definitely matters.

You're not really trying, are you?

He is somewhat trying but his opinion on how Java should work and
how SUN/Oracle decided that Java will actually work occasionally
differs.
Are you sure you're not Twisted or Mentifix posting under a different
name?

He is not.

He has been around for more than a decade.
Because whatever frequency you're vibrating at doesn't involve
any software engineering, and doesn't have anything to do with Java or
applet deployment. If you're not (purposefully) trolling us, you might
want to slow down, take some time off, consult with some colleagues in
person, etc. to see if you can actually work out what's really bugging
you. It's not something we can solve here.

I believe it would help if he switched from traditional applet tag
to applet via JWS and JNLP.

That is on topic here.

Arne
 
J

John B. Matthews

Arne Vajhøj said:
You mean in an applet tag??

Nested param elements inside an applet or object tag are passed to
Java - the browser do not do anything with it.

So that construct will enable your applet to get the required Java
version - it will not do anything by itself.

Completely different from JNLP java element that gets processed by
Java before it calls the applet and has version check and update
capability.

I think you should look into JWS and JNLP.

For reference, here's a toy Applet/Application that can be accessed in
any of several ways: JWS Application, JWS Applet, applet tag or JAR.

<https://sites.google.com/site/drjohnbmatthews/subway>
 
R

Richard Maher

You mean in an applet tag??

No, no, no Arne! I meant what I said: -
http://www.w3schools.com/tags/tag_object.asp
Nested param elements inside an applet or object tag are passed to
Java - the browser do not do anything with it.

But the Plug-In does! Take the following list that I dynamically inject
into the DOM at run-time: -

var appletParams = [{"name":"archive",
"value":archiveName },
{"name":"codebase", "value":codeBase
},
{"name":"code", "value":className
},
{"name":"java_version", "value":"1.7*"
},
{"name":"mayscript", "value":"true"
},
{"name":"scriptable", "value":"true"
},
{"name":"codebase_lookup", "value":"false"
},
{"name":"java_status_events","value":"true"
},
{"name":"permissions", "value":"sandbox"
},
{"name":"cache_option", "value":"no"
},
{"name":"APPLICATION",
"value":application },
{"name":"PORT", "value":port
},
{"name":"MAXBUF", "value":maxBuf
},
{"name":"HOSTCHARSET",
"value":this.hostCharSet },
{"name":"SSLREQD",
"value":this.sslReqd },
{"name":"HANDSHAKE",
"value":this.handshake },
{"name":"IDLETIMEOUT",
"value":this.idleTimeout },
{"name":"TABMAILBOXSIZE",
"value":this.tabMailboxSize},
{"name":"VERBOSITY",
"value":this.verbosity }];


I think you'll find, and take the time to acknowledge, that only those
in UPPERCASE are of no interest to the JPI?
So that construct will enable your applet to get the required Java
version - it will not do anything by itself.

Please PLEASE spend the time to read the ORACLE nee SUN documentation at: -
http://www.oracle.com/technetwork/java/javase/index-141751.html#MECHANISMS

It has been my experience (although Oracle seems to require an OTN
account to download older JREs these days, so I can’t re-confirm) that: -

1) If you have Java 6 and 7 on a system and I select 1.6 with my OBJECT
tag then I will get a Java 6 JVM
2) If I have only Java 6 on my system and I request, nay mandate, Java 7
then the Plug-in says “What’s the big deal? Java’s Java! Just take 6 and
see how you get onâ€.

No errors; no nothing :-(

Even though the above link clearly states that an auto-download of the
desired Java version can be triggered by the use of the “java_versionâ€
PARAM, I’m happy that it doesn’t and just fails but I insist it not fail
silently. Is this really too much to ask from a vendor?

Oracle are still publishing misleading Tag bullshit like this: -
http://docs.oracle.com/javase/6/docs/technotes/guides/plugin/developer_guide/using_tags.html
Completely different from JNLP java element that gets processed
by Java before it calls the applet and has version check and update
capability.

JNLP relies on the complete crap of strategies that I've paraphrased
from http://ORACLE/LarryTheLoungeLizard/DeployShit.js as seen below.

A simple question: - "Why can't Java provide the advertised
functionality since 'The New Java Plug-In' circa 6.10?" And if it can't
why can't you stop failing silently you incompetent twats?
I think you should look into JWS and JNLP.

I think you should read more out of your comfort zone. For example: -
https://addons.mozilla.org/en-US/firefox/blocked/p428

50 shades of Larry's ego :-(

Cheers Richard Maher
PS. (Why the **** do I have to do this?) As gleaned from the warped mind
of someone Larry chooses to employ: -

<!DOCTYPE HTML>
<html>
<head>


<script type="text/javascript">

function isJavaInstalled(version)
{
var compare;

if (Object.prototype.toString.call(version) == '[object Array]') {
var versionList = version;
compare = function(a,b) {
return a == b;
}
} else {
var versionList = [version];
compare = function(a,b) {
return a >= b; // Bad luck for IE. Use [7,8,9]?
}
}

if (window.ActiveXObject) {
for (var i=0; i<versionList.length; i++) {
try {
var fred = new ActiveXObject('JavaWebStart.isInstalled.1.' +
versionList + '.0.0');
return true;
} catch (err) {}
}
}

if (navigator.mimeTypes) { // Opera Mime Types don't de-install
for (var i=0; i<versionList.length; i++) {
for (var j = 0; j<navigator.mimeTypes.length; j++) {
if
(navigator.mimeTypes[j].type.indexOf('/x-java-applet;jpi-version') != -1) {
var dotArray = navigator.mimeTypes[j].type.split('.');
try {
if (dotArray.length > 1 &&
compare(parseInt(dotArray[1].match("[1-9]*")), versionList)) {
return true;
}
} catch (err) {}
}
}
}
}

return false;

}

function load() {
alert(isJavaInstalled([5,6]));
}

</script>
</head>

<body id="torso" onload="load()"
onunload="(function(){console.log('In unload')})();">


stuff

</body>
</html>
 
A

Arved Sandstrom

Thanks for posting that link. It looks as if it will be really useful for
me in the near future.

Same here. I do all of that stuff quite rarely, so I'm not ever really
conversant with it. But sometimes I have no choice, so a resource like
this is great.

AHS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top