[Biojava-dev] Putting JVM options in a Manifest file??

PATERSON Trevor trevor.paterson at roslin.ed.ac.uk
Thu Jan 6 17:03:03 UTC 2011


As far as I recall it is 'too late' to put command line arguments  within the JAR, 
as they don't get read from the manifest until AFTER invoking the JVM 
- this still applies if you are executing a Jar by clicking as jou are just invoking 'java -jar' under the hood

So you have to use a startup script or a jnlp file - or bundle it as an .exe application etc

a start up script is the easiest...

trevor


Trevor Paterson PhD
email trevor.paterson at roslin.ed.ac.uk

Bioinformatics 
The Roslin Institute
The Royal (Dick) School of Veterinary Studies
University of Edinburgh
Scotland EH25 9PS
phone +44 (0)131 5274197
http://bioinformatics.roslin.ed.ac.uk/

Please consider the environment before printing this e-mail

The University of Edinburgh is a charitable body, registered in Scotland with registration number SC005336
Disclaimer:This e-mail and any attachments are confidential and intended solely for the use of the recipient(s) to whom they are addressed. If you have received it in error, please destroy all copies and inform the sender. 



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-----Original Message-----
From: biojava-dev-bounces at lists.open-bio.org [mailto:biojava-dev-bounces at lists.open-bio.org] On Behalf Of Scooter Willis
Sent: 06 January 2011 16:48
To: Mark Schreiber
Cc: biojava-dev
Subject: Re: [Biojava-dev] Putting JVM options in a Manifest file??

Mark

I have also looked for ways to do the same thing for setting a larger heap space and couldn't find anything. I think Sun wants you to follow the jnlp/web start route. The other problem I ran into last year(filed a bug) is that if you don't have a GUI then javaws won't start. I was trying to run on a centos server instance on amazon ec2 and couldn't run via javaws because no graphics. I tried setting to headless and all the other old tricks but no luck. Not sure if that is still the case. 

Let me know if you figure something out. 

Scooter

On Jan 5, 2011, at 11:02 PM, Mark Schreiber wrote:

> Hi -
> 
> Does anyone know if it is possible to put a JVM option into the 
> Manifest of a Jar file?  Essentially, I want to hack the JAR file to 
> set the proxy but I don't want to have to recompile the Main class. I 
> also don't want to create various .bat .sh files for different operating systems.
> 
> I'm trying to replicate this behaivour (but without doing it from 
> command
> line) for a self executing JAR ...
> 
> 
> java -Djava.net.useSystemProxies=true -jar someJar.jar
> 
> ie I want someJar.jar to find and use the configured system proxy 
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev


_______________________________________________
biojava-dev mailing list
biojava-dev at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-dev




More information about the biojava-dev mailing list