Re: Java Web Start
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 20 Dec 2009 13:40:27 -0800
On Sun, 20 Dec 2009 01:55:43 -0800 (PST), The87Boy
<the87boy@xxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :
I made a program, which uses javax.swing (JFrame, JPanel and so on),
but when I try to execute the application using the launch.html,
Netbeans created I just can't see it
In the task manager (in Windows Vista) it shows, that javaw.exe is
starting each time
You can see the application at http://lsmc.dk/test/launch.html
What have I done wrong?
If necessary I could also upload the source code
When I ran it, it loaded and died with the following dump.
Exception in thread "AWT-EventQueue-0"
java.lang.ExceptionInInitializerError
at Gui.Login.<init>(Login.java:28)
at Gui.Login$4.run(Login.java:183)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied
<><><><><><><><><><>
(java.util.PropertyPermission user.dir read)
at java.security.AccessControlContext.checkPermission(Unknown
Source)
at java.security.AccessController.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown
Source)
at java.lang.System.getProperty(Unknown Source)
at DBLayer.DBConnection.<init>(DBConnection.java:38)
at DBLayer.Player.DBPlayer.<init>(DBPlayer.java:33)
at CtrLayer.CtrLogin.<init>(CtrLogin.java:47)
at CtrLayer.CtrLogin.<clinit>(CtrLogin.java:33)
... 10 more
Did your remember to sign your jar? See
http://mindprod.com/jgloss/javawebstart.html
Your JNLP file looks like this:
<jnlp spec="1.0+" codebase="http://lsmc.dk/test/"
href="http://lsmc.dk/test/launch.jnlp">
<information>
<title>Rollespil</title>
<vendor>Gruppe 6</vendor>
<homepage href="null"/>
<description>Management for roleplaying</description>
<description kind="short">Rollespil</description>
</information>
<update check="timeout" policy="always"/>
<resources>
<java java-vm-args="-Djava.security.policy=applet.policy"
version="1.6+"/>
<jar href="http://lsmc.dk/test/Rollespil.jar" download="eager"
main="true"/>
<jar href="http://lsmc.dk/test/lib/swing-layout-1.0.4.jar"
download="eager" main="false"/>
<jar href="http://lsmc.dk/test/lib/AbsoluteLayout.jar"
download="eager" main="false"/>
</resources>
<application-desc main-class="Gui.Login"/>
</jnlp>
There is no applet.policy file on my machine. Normally package names
are all lower case.
You might want to add lines to your JNLP file something like this:
<homepage href="webstart/replicator.html" />
<icon href="replicator.icon64.png" width="64" height="64"
kind="default" />
<icon href="replicator.splash.png" width="128" height="128"
kind="splash" />
<!-- create desktop shortcut to run the Replicator -->
<shortcut online="true">
<desktop />
<menu submenu="The Replicator" />
</shortcut>
<resources>
<!-- requires 1.6 -->
<!-- Sun JVM -->
<java version="1.6.0_17"
href="http://java.sun.com/products/autodl/j2se" java-vm-args="-ea"
initial-heap-size="128m" max-heap-size="512m" />
<java version="1.6+"
href="http://java.sun.com/products/autodl/j2se" java-vm-args="-ea"
initial-heap-size="128m" max-heap-size="512m" />
<!-- any vendor -->
<java version="1.6+" java-vm-args="-ea" initial-heap-size="128m"
max-heap-size="512m" />
<!-- set -D system properties -->
<property name="VIA" value="website" />
--
Roedy Green Canadian Mind Products
http://mindprod.com
The future has already happened, it just isn?t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 61)
.
- Follow-Ups:
- Re: Java Web Start
- From: The87Boy
- Re: Java Web Start
- References:
- Java Web Start
- From: The87Boy
- Java Web Start
- Prev by Date: Re: Java Web Start
- Next by Date: Global Warming and what you can do to against it
- Previous by thread: Re: Java Web Start
- Next by thread: Re: Java Web Start
- Index(es):
Relevant Pages
|