From: Roedy Green on
On Wed, 24 Feb 2010 21:57:12 +1100, "Qu0ll" <Qu0llSixFour(a)gmail.com>
wrote, quoted or indirectly quoted someone who said :

>> Try using The Replicator at
>> http://mindprod.com/webstart/replicator.html
>>
>> I have not had any complaints from Linux users.
>
>This is not an applet (something that runs inside the browser).

the Replicator is Java Web Start, not an Applet.

You normally launch it with a browser, though you can launch it with
javaws.exe
--
Roedy Green Canadian Mind Products
http://mindprod.com

The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.
~ Douglas Adams (born: 1952-03-11 died: 2001-05-11 at age: 49)
From: Lew on
Roedy Green wrote:
> On Wed, 24 Feb 2010 18:14:28 +1100, "Qu0ll" <Qu0llSixFour(a)gmail.com>
> wrote, quoted or indirectly quoted someone who said :
>
>> So, does launching an applet (yes, applet) using JNLP work at all on Linux?
>> In all cases I am using Java 6 Update 18.
>
> If you are running 64 bit Linux, you will need to install both 32- bit
> and 64-bit Java. JNLP uses 32-bit, to match the power of the browser.

Umm, I'm running 64-bit Java 6u18, Ubuntu and browsers, and Java Web Start
works just fine for applications. Applets also work fine. I haven't tried
applets launched via JNLP.

--
Lew
From: Qu0ll on
"Qu0ll" <Qu0llSixFour(a)gmail.com> wrote in message
news:7tOdnalh3INETBnWnZ2dnUVZ_hednZ2d(a)westnet.com.au...
> My applet is launched using a JNLP file (by specifying the jnlp_href
> parameter in deployJava.js) and this is working very nicely on most
> browsers on Windows but when I tried it on Linux (Ubuntu 9.10 and Firefox
> 3.5.7) it doesn't launch with the error being that it was unable to find
> the applet class (ClassNotFoundException).
>
> So, does launching an applet (yes, applet) using JNLP work at all on
> Linux? In all cases I am using Java 6 Update 18.
>
> There is absolutely no point in us continuing development of this applet
> if we are unable to launch it via JNLP on all platforms so the answer to
> this question is critical.

OK, I have stripped out all the IP-sensitive material and produced a very
simple example for others to test.

First, the applet itself:

package test;

import java.applet.Applet;

public class MyApplet extends Applet {

public void init() {
System.out.println("It works!");
}
}

Next, the JNLP (in a file named "applet.jnlp"):

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" codebase="." href="applet.jnlp">
<information>
<title>Test</title>
<vendor>Qu0ll</vendor>
</information>
<resources>
<java version="1.6+" href="http://java.sun.com/products/autodl/j2se"
max-heap-size="512m"/>
<jar href="applet.jar" main="true" download="eager"/>
<property name="jnlp.packEnabled" value="true"/>
</resources>
<applet-desc name="Test" main-class="test.MyApplet" width="640"
height="480"/>
</jnlp>

And finally the HTML (index.html):

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test Applet</title>
</head>
<body>
<script src="http://java.com/js/deployJava.js"></script>
<script>
var attributes = { code:'test.MyApplet'} ;
var parameters = {jnlp_href: 'applet.jnlp',
java_arguments:'-Xmx512m -Djnlp.packEnabled=true'} ;
deployJava.runApplet(attributes, parameters, '1.6');
</script>
</body>
</html>

Simply build the applet and place it in a jar named "applet.jar", put all 3
files (JAR, JNLP, HTML) in the same directory and open the index.html. It
should output "It works!" in the Java console and does so on Windows with
most browsers but I cannot get it to work on Linux.

Please let me know of your results. Hopefully someone can see why it is not
working on Linux.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour(a)gmail.com
[Replace the "SixFour" with numbers to email me]

From: John B. Matthews on
In article <UP2dnetahbwelBvWnZ2dnUVZ_t-dnZ2d(a)westnet.com.au>,
"Qu0ll" <Qu0llSixFour(a)gmail.com> wrote:

> Please let me know of your results. Hopefully someone can see why it is not
> working on Linux.

See also: <http://java.com/js/deployJava.txt>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
From: Roedy Green on
On Thu, 25 Feb 2010 16:24:06 +1100, "Qu0ll" <Qu0llSixFour(a)gmail.com>
wrote, quoted or indirectly quoted someone who said :

><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
><html>
> <head>
> <title>Test Applet</title>
> </head>
> <body>
> <script src="http://java.com/js/deployJava.js"></script>
> <script>
> var attributes = { code:'test.MyApplet'} ;
> var parameters = {jnlp_href: 'applet.jnlp',
>java_arguments:'-Xmx512m -Djnlp.packEnabled=true'} ;
> deployJava.runApplet(attributes, parameters, '1.6');
> </script>
> </body>
></html>
if the Javascript stuff is not working (which in my experience
happens about 20% of the time), bypass it with
<a href="applet.jnlp">Launch</a>

The other thing a bit suspicious is using . as your codebase. That is
a new feature.

You might be muddling plain Applets with JWS apps in your Javascript.
I avoid JavaScript wherever possible, so I don't know for sure.


Try being fully explicit like this:

<jnlp spec="1.5+" codebase="http://www.mindprod.com/webstart"
href="setclock.jnlp" version="8.3">





--
Roedy Green Canadian Mind Products
http://mindprod.com

The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.
~ Douglas Adams (born: 1952-03-11 died: 2001-05-11 at age: 49)
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: Testing Java
Next: Java crash