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

Mark Fortner phidias51 at gmail.com
Fri Jan 7 04:19:06 UTC 2011


There's an example here:
http://download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/downloadservletguide.html#examples

If you use ant there's a task that will create the JNLP for it.
http://ovanttasks.sourceforge.net/rat/chapter-N104F5.html

If you use NetBeans you can export your project as a JNLP file. I haven't
seen a way to do this with Eclipse yet.

Cheers,

Mark

card.ly: <http://card.ly/phidias51>


On Thu, Jan 6, 2011 at 7:34 PM, Mark Schreiber <markjschreiber at gmail.com>wrote:

> Interesting point.  I've always thought of JNLP as a way to distribute and
> start software from a server but I guess there's no reason why you can't use
> it as a platform independent startup script for launching from a local file
> system.
>
> Don't suppose you have an example?
>
>
> On Fri, Jan 7, 2011 at 11:31 AM, Mark Fortner <phidias51 at gmail.com> wrote:
>
>> Sorry, I hit "Reply" instead of "Reply All".  For the rest of you on the
>> list, here's my response.
>>
>>
>> You could try using a JNLP file to launch your application.  You can stick
>> it in the same directory as your jar file.  The user would double click to
>> launch it.  You can specify startup parameters in the JNLP file as well.
>>
>> The other thing you could do is use jrunscript (a javascript engine that
>> runs in the jvm and ships with java).  Your script would then set the
>> parameter before invoking the main class found in your jar.
>>
>> Hope this helps.
>>
>> Cheers,
>>
>> Mark
>>
>>
>> On Wed, Jan 5, 2011 at 8:02 PM, Mark Schreiber <markjschreiber at gmail.com>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
>>>
>>
>>
>



More information about the biojava-dev mailing list