Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  
  OpenJDK, how To make an Applet run?  (Read 5945 times)
0 Members and 1 Guest are viewing this topic.
Offline Damocles
« Posted 2012-07-28 11:34:42 »

Hi. Does anyone have a clue why OpenJDK 6 / 7 (Ubuntu Linux here) cant open many Applets?
Is it the icedTea plugin not wanting to open applets?
Or do I have to sign an applet to run it or have to have a manifest included.

The classloader does not load my main class...

Small Example applet:
http://www.rtsmaker.com/bloomparticle.html

The standard Java from Oracle has no problems...

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  
thisismyusername@ubuntu:~$ firefox
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet.
   at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
   at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
   at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
Caused by: java.lang.ClassNotFoundException: BloomParticles
   at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1401)
   at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725)
   ... 2 more
Caused by:
java.lang.ClassNotFoundException: BloomParticles
   at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1401)
   at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725)
   at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
   at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
java.lang.NullPointerException
   at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154)
   at sun.applet.AppletPanel.run(AppletPanel.java:380)
   at java.lang.Thread.run(Thread.java:679)
java.lang.NullPointerException
   at sun.applet.AppletPanel.run(AppletPanel.java:430)
   at java.lang.Thread.run(Thread.java:679)



Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2012-07-29 07:04:18 »

Runs fine over here on Win7 + Chrome Cheesy

Offline Damocles
« Reply #2 - Posted 2012-07-29 10:55:40 »

I guess you have the normal Oracle Java installed?

My problem is to get it running a a standard boring Ubuntu installation, where only OpenJDK and IcedTea plugin are offered the the common user.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2012-07-29 11:24:36 »

Hi

JNLP protocol is not yet supported in Icedtea plugin for applets.

Runs fine over here on Win7 + Chrome Cheesy
This is off topic and a simple gratuitous provocation. OpenJDK, Icedtea and Icedtea-web (including NetX) are free open source softwares, everyone is invited to contribute.

I guess you have the normal Oracle Java installed?

My problem is to get it running a a standard boring Ubuntu installation, where only OpenJDK and IcedTea plugin are offered the the common user.
OpenJDK 1.7 is the reference implementation of Java 1.7, the term "normal" is very subjective. You could have contacted Icedtea developers to get an answer about your problem. I know someone under Lubuntu (Ubuntu with LXDE); if you really need some help, she can give a try to your applets but only if you avoid bashing and not constructive remarks about OpenJDK and Icedtea. Even NetX is not installed by default, I will report that soon.

Edit.: Rather use Java Web Start until it is fixed but your end users will have to install Icedtea-netx packages if they are not already installed by default.

Offline Damocles
« Reply #4 - Posted 2012-07-29 11:31:37 »

If you look at my example:

http://www.rtsmaker.com/bloomparticle.html
http://www.rtsmaker.com/bloomparticle.jar

The jar just consists of a single class file inside a jar. Nothing else in there. (no meta-inf directory, no signing information)
So I did not mix anything here.

For OpenJDK to run it, it MUST be signed?

Offline gouessej
« Reply #5 - Posted 2012-07-29 11:33:56 »

For OpenJDK to run it, it MUST be signed?
There is a regression in Icedtea-web 1.2 (fixed in Icedtea-web 1.3): all JARs must be signed or (exclusive) unsigned, you cannot mix unsigned JARs with signed JARs. However, I think your problem is caused by the lack of support for the JNLP protocol in applets.

Edit.: one of your other applets works here in the past (Mageia Linux 2, OpenJDK 1.6, Icedtea-web 1.2), this one just freezes.

Offline gouessej
« Reply #6 - Posted 2012-07-29 11:38:11 »

Griefer4k works  Cheesy

Offline gouessej
« Reply #7 - Posted 2012-07-29 11:39:39 »

I get this for the other:
[gouessej@localhost ~]$ appletviewer http://www.rtsmaker.com/bloomparticle.html
Charger : la classe W est introuvable.
java.lang.ClassNotFoundException: W
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:219)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:152)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:633)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:797)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:726)
        at sun.applet.AppletPanel.run(AppletPanel.java:379)
        at java.lang.Thread.run(Thread.java:722)

"la classe W est introuvable" means "the class W cannot be found".

I see BloomParticle.class in your JAR, not W.

Offline Damocles
« Reply #8 - Posted 2012-07-29 11:41:04 »

Right now Im running Mint with Oracle Java installed. I have to switch to the Ubuntu 12.04 installation to check.
But I remember none of the Java4K games to run in the default setup. (Which I presume to be on most casual Linux installations)

Offline Damocles
« Reply #9 - Posted 2012-07-29 11:42:40 »

Yes, like the stacktrace I posted above.
It can not find the class.

Oracle Java can however.
I had this same problem already way back in Ubuntu 10.04

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Damocles
« Reply #10 - Posted 2012-07-29 11:44:52 »

Ah, ok, Sorry, I will try it without the code="W"

Offline gouessej
« Reply #11 - Posted 2012-07-29 11:50:52 »

Ah, ok, Sorry, I will try it without the code="W"
Please fix that. Then I can test it and confirm it works under Mageia Linux 2 (and it should work under Ubuntu too).

Offline Damocles
« Reply #12 - Posted 2012-07-29 11:51:32 »

Changed the page, It should load in the appletviewer now.
I will see if it runs on the Ubuntu then

Offline Damocles
« Reply #13 - Posted 2012-07-29 11:58:43 »

No, same Problem in Ubuntu.
The appletviewer loads it, but the IcedTea Plugin still throws:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet.
   at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
   at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
   at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
Caused by: java.lang.ClassNotFoundException: BloomParticles
   at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1401)
   at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725)
   ... 2 more
Caused by:
java.lang.ClassNotFoundException: BloomParticles
   at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1401)
   at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725)
   at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
   at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
java.lang.NullPointerException
   at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154)
   at sun.applet.AppletPanel.run(AppletPanel.java:380)
   at java.lang.Thread.run(Thread.java:679)
java.lang.NullPointerException
   at sun.applet.AppletPanel.run(AppletPanel.java:430)
   at java.lang.Thread.run(Thread.java:679)

Offline gouessej
« Reply #14 - Posted 2012-07-29 11:59:37 »

Changed the page, It should load in the appletviewer now.
I will see if it runs on the Ubuntu then
I don't see your changes even by pressing CTRL+R. I have just downloaded your files (html & JAR), removed code="W" and launch the applet locally with the applet viewer. Now, I see pretty blue particles  Grin

Offline gouessej
« Reply #15 - Posted 2012-07-29 12:02:22 »

No, same Problem in Ubuntu.
I'm sorry but when I use wget to get your HTML file, "code="W"" is still here, that's the only problem.

Offline Damocles
« Reply #16 - Posted 2012-07-29 12:05:31 »

Ok, I must have submitted a wrong page  Roll Eyes,

Try http://rtsmaker.com/index.html

Griefer4k does load.
So good, I think I can find my error based on that.

Thanks

Offline gouessej
« Reply #17 - Posted 2012-07-29 12:19:34 »

This is still wrong as you write both "code="BloomParticles.class"" and "code="BloomParticles"". Please only use "code="BloomParticles.class"" and it will work.

Offline Damocles
« Reply #18 - Posted 2012-07-29 12:54:52 »

Ok, I think I had a pile of things done wrong  Roll Eyes

http://rtsmaker.com/bloomparticles2.html  works now

(I totally forgot to compile it for 1.6 .... and had this double code parameter)

Well, now Im happy with OpenJDK Again

Offline gouessej
« Reply #19 - Posted 2012-07-29 14:42:47 »

Ok, I think I had a pile of things done wrong  Roll Eyes

http://rtsmaker.com/bloomparticles2.html  works now

(I totally forgot to compile it for 1.6 .... and had this double code parameter)

Well, now Im happy with OpenJDK Again
It works here too but your problem has nothing to do with OpenJDK and Icedtea. Maybe they are a bit stricter.

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.

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

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

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

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

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

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

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

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

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

Riven (55 views)
2014-07-14 18:02:53
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!