Skip to main content
gamedev.net
🔒 Locked

[java] Server VM in Manifest?

Started by biovenger Jun 1, 2004 at 2:08 AM 9 replies 1.7k views
Original Post
biovenger
biovenger
Hey, I always package my applications in jar files, having the Main-Class attribute allow for double-click execution. However, I wish to start my application with the server VM... Now this is a tiny problem. It can of course be fixed with a simple batch file on windows, but then I''d have to do the same thing for every other platform I want the game to be playable on. So I was wondering if there was any way to make the manifest know it should run the Server VM when doubleclicked?
-----------------------------Final Frontier Trader
etothex
etothex
I''m not sure, but a quick google doesn''t bring up anything. Either way though, I wouldn''t worry about it. Just make startup scripts for the top 2-3 platforms you think your game is going to be distributed on that have the -server tag. Most other platforms, the user might run from the command line anyway, so you put something in the README suggesting it.

In fact, people will probably appreciate the choice. Even though the server VM can run code closer to the performance of c++, it takes longer(ages on some systems) to start and it has an annoying tendency to take more ram than the client.
biovenger
biovenger
True, well I was anyway planning on packing a batch file for running the code in client instead. So I guess I could make 2 shellscripts for the 3 most common platforms (server/client scripts that is) and then allow the others to choose by themselves from the commandline.

I guess if you have a platform that isn''t Linux or Windows, you might anyway be an "advanced" user and be very familiar with the prompt.
-----------------------------Final Frontier Trader
princec
princec
It''s freely redistributable in place of the client VM. I believe there was some talk of the new Webstart having an option to use the server VM. In general though I advise that you don''t use the server VM for clientside applications as the warmup time is so severe that it makes your games look totally shit and unprofessional for the first minute or two - generally a crucial time for making that first impression.

Cas
NuffSaid
NuffSaid
You could have a look at JSmooth. It creates an exe wrapper for your jar file, and I think you can pass commandline arguments to your program so you can pass the -server flag.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
biovenger
biovenger
Problem is that it makes a windows executable... meaning no portability...
-----------------------------Final Frontier Trader
princec
princec
Not that it matters in the case of the server VM because
a) Linux users are ... well, Linux users, and you''re only doing it for kudos on Linux, right?
b) MacOS doesn''t actually have a server VM
c) Nobody plays games on anything else

Cas
capn_midnight
capn_midnight
so, how does one get a hold of the server VM for windows? I don't recall seeing any notification about it after downloading the sdk.

edit: scratch my last question
I just installed sdk1.4.2 and there is the bin directory, which has the compiler and everything, include a copy of the VM, and then there is the jre directory, which also has a copy of the vm, and directories labeld client and server, both with a jvm.dll file and an Xusage.txt file. Now, I don't recall, but I don't think 1.5.0 has this (maybe for the beta they decided to leave it out for the time being).

This brings up a question, why the two copies of the vm in the bin directory in the <sdk>/bin; directory and the <sdk>/jre/bin directory?



capn_midnight | Captain Midnight | deviantArt
ACM | SIGGRAPH | Generation5

[edited by - capn_midnight on June 3, 2004 4:08:09 PM]
Matei
Matei
The SDK comes with the server VM, but the regular JRE that people download from www.java.com doesn''t, because it''s supposed to be as small as possible. However, I think you should be allowed under the license to redistribute the server VM separately, to people who wish to use it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.