How to run applet in -server mode?

S

Sanny

Java apps can be run in -server mode by sending -server parameter.

Is there any way to send -server mode for applet to increase its
speed?

I want that JVM speed up my applet even if the download and startup
time is high.

Incase this is not supported by JVM I would like the user to upgrade
their JVM to the one that supports -server mode.

Bye
Sanny

Find Java Projects: http://Projects.GetClub.com
 
J

John B. Matthews

Sanny said:
Java apps can be run in -server mode by sending -server parameter. Is
there any way to send -server mode for applet to increase its speed?

What if the machine running the browser hosting your applet isn't a
server?
I want that JVM speed up my applet even if the download and startup
time is high.

Won't users object?
Incase this is not supported by JVM I would like the user to upgrade
their JVM to the one that supports -server mode.

Why not distribute an application via Java Web Start?

http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp
 
S

Sanny

What if the machine running the browser hosting your applet isn't a
server?

I will ask the user to download the latest JVM that supports -server
mode. But you didn't answer my question how to use server mode for
Applets.

Won't users object?

The user will be shown options and if he wants faster applet he will
download the JVM for faster processing using -server mode.

Why not distribute an application via Java Web Start?

Web Start can not be made. Will it support AppletContext ? As my
applet uses browser context for streaming data.

Bye
Sanny

Find Java Projects: http://Projects.GetClub.com
 
T

Thomas Schodt

Sanny said:
I will ask the user to download the latest JVM that supports -server
mode. But you didn't answer my question how to use server mode for
Applets.

To get a JRE to support -server mode the user will need to
download and install the JDK that matches his JRE and
copy the jre\bin\server\jvm.dll or everything under jre\bin
to the JRE.

The alternative would be for the user to mung the registry
to get the relevant entry to point to the jre in the JDK.

Once the user has a JRE that supports -server mode
where the browser expects to find the JRE
the user can use the Java Control Panel to specify "-server"
as an applet runtime parameter.

You risk antagonising your users by expecting them
to go through all that hassle just for your applet.
 
L

Lew

Thomas said:
To get a JRE to support -server mode the user will need to
download and install the JDK that matches his JRE and
copy the jre\bin\server\jvm.dll or everything under jre\bin
to the JRE.

Obviously that advice only applies to Windows - there is only one executable
on, say, Linux.
The alternative would be for the user to mung the registry
to get the relevant entry to point to the jre in the JDK.

Once the user has a JRE that supports -server mode
where the browser expects to find the JRE
the user can use the Java Control Panel to specify "-server"
as an applet runtime parameter.

You risk antagonising your users by expecting them
to go through all that hassle just for your applet.

The "-server" option to the JVM enables certain optimizations, the kind that
show up after a program has run for quite a while. It is counter to the
purpose of applets to have long-running applets. For long-running programs,
Java Web Start is really the better choice.

Because applets generally do not run for a long time, the optimizations of the
"-server" option are likely not to be realized. There are optimizations in
the "-client" mode, too, just less aggressive ones that can be applied sooner
in the execution lifetime. I wouldn't expect the "-server" mode to make a
noticeable difference to applet performance in most cases.

Of course, I could be completely wrong. The dictum for performance
optimization is measure first, tweak performance second, then measure the
difference, because /a priori/ optimization guesses are almost always wrong.
I presume that the OP is getting the information needed in order to perform
such measurement prior to releasing the option in the wild.
 
J

Jerry Gerrone

Obviously that advice only applies to Windows - there is only one executable
on, say, Linux.

And why is that? I think that has still not adequately been explained,
and it effectively denies nontechnical Windows users of desktop Java
software some of the better optimizations, even those with the
(increasingly common) hardware to support them.

Desktop Java software isn't especially rare, either. In just the
popular file-sharing category we have Limewire, Frostwire, and
Azureus, and probably others. And sometimes these are CPU bound
(hashing added/moved files, particularly).
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top