participate


Java Web Start & JNLP - java -jar runs the application but not Java Web Start
<<   Back to Forum  |   Give us Feedback
This topic has 20 replies on 2 pages.    « Previous | 1 | 2 |
abdulqadir
Posts:4
Registered: 8/17/00
Re: java -jar runs the application but not Java Web Start   
Dec 10, 2003 11:15 AM (reply 15 of 20)  (In reply to #14 )

 
Any body found the solution yet ? Please let all of us know.
 
yiannisp
Posts:10
Registered: 7/30/98
Re: java -jar runs the application but not Java Web Start   
Dec 14, 2003 2:06 PM (reply 16 of 20)  (In reply to #15 )

 
Hi,

I just received an email from Sun asking me to try out J2SE 1.4.2_03, but the problem is still there. I've sent the new stacktrace back to them.
 
yiannisp
Posts:10
Registered: 7/30/98
Re: java -jar runs the application but not Java Web Start   
Dec 16, 2003 1:39 PM (reply 17 of 20)  (In reply to #16 )

 
The problem is now listed as as bug #4968627. You can see the progress/vote for it at:
http://developer.java.sun.com/developer/bugParade/bugs/4968627.html
 
walthier
Posts:1
Registered: 4/15/04
Re: java -jar runs the application but not Java Web Start   
Jul 1, 2004 2:28 AM (reply 18 of 20)  (In reply to #17 )

 
Grait! It's closed now, without solution!

I still have the problem. Shouldn't I use closures (final local variables from dinamic inner class)?
Any real workaround?
 
dietz333
Posts:1,173
Registered: 22/09/03
Re: java -jar runs the application but not Java Web Start   
Jul 9, 2004 8:47 AM (reply 19 of 20)  (In reply to #18 )

 
looks from this bug report that they couldn't find a reproducable testcase.
Can anyone submit a testcase that sun can reproduce this problem on ?

/Dietz
 
happyaq
Posts:2
Registered: 4/15/03
Re: java -jar runs the application but not Java Web Start   
Sep 14, 2004 12:10 PM (reply 20 of 20)  (In reply to #19 )

 
Hi
I met a similar problem before. The java web start failed to load anonymous inner classes from a jar file for an applet.
After several tests, finally, I solved this problem.
What I did was:
put all the class names in an array of strings and load these classes to JVM by a class loader. remember, the outer class should be loaded before its anonymous inner classes are loaded.

For example:

public class LongTask
{
private int lengthOfTask;
private int current = 0;
private String statMessage;

public static final String[] CLASSLIST =
{
"Logon",
"Logon$1",
"Logon$2",
"Logon$3",
"Logon$4",
"Logon$5"
};


LongTask()
{
lengthOfTask = CLASSLIST.length;

}

void go()
{
current = 0;
final SwingWorker worker = new SwingWorker()
{
public Object construct()
{
return new ActualTask();
}
};
worker.start();
}

/-------------------------------------------------------------
Called from ProgressBarDemo to find out how much work needs
to be done.
-------------------------------------------------------------
/
int getLengthOfTask()
{
return lengthOfTask;
}

/----------------------------------------------------------------
Called from ProgressBarDemo to find out how much has been done.
----------------------------------------------------------------/
int getCurrent()
{
return current;
}

void stop()
{
current = lengthOfTask;
}

/
------------------------------------------------------------------
Called from ProgressBarDemo to find out if the task has completed.
------------------------------------------------------------------
/
boolean done()
{

if (current >= lengthOfTask)
return true;
else
return false;
}

/-----------------------------------------------------------------
The actual long running task. This runs in a SwingWorker thread.
-----------------------------------------------------------------*/
class ActualTask
{
ActualTask ()
{
Class tempClass = null;
ClassLoader myLoader = Thread.currentThread().getContextClassLoader();
while (current < lengthOfTask)
{
try
{
tempClass = myLoader.loadClass(CLASSLIST[current]);
synchronized(this)
{
current ; //make some progress;
statMessage = "Completed " current
" out of " lengthOfTask ".";
}

}
catch (InterruptedException ie) {}
}
}
}
}
 
This topic has 20 replies on 2 pages.    « Previous | 1 | 2 |
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 28
  • Guests : 133

About Sun forums
  • Oracle Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Oracle Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums