Java Web Start

User 9852713200

02-09-2008 15:07:25

Hi,





We're developing Java applications using Marvin. And we want to use Java Web Start. By looking through MarvinBeans/lib folder, we found out lots of jars. Is there any way for you to provide a SINGLE jar/zip file to make Java Web Start deployment easier?





Thanks!

ChemAxon 7c2d26e5cf

02-09-2008 17:05:10

We do not plan to merge jars into one jar.


Migrating jars into a single one is not recommended because the META info of jar files would be lost in this case. Marvin reads these meta data at runtime. Furthermore, we can not avoid to separate platform dependent resources into separate jars. (Some native files have got the same name on different platforms.)


Most of jars are required in all cases, some ones are platform dependent.


Please see the webstart examples in the examples/webstart subdirectory of the MarvinBeans package.


Theirs online version and its source are also available on the ChemAxon site:


http://www.chemaxon.com/marvin/examples/webstart/index.html


http://www.chemaxon.com/marvin/examples/webstart/msketch.jnlp.txt


http://www.chemaxon.com/marvin/examples/webstart/mview.jnlp.txt


In the JNLP sources, see the <resources> section where all required jars are enumerated.


These examples can help you to start deploy your own JWS example.


Are these examples useful for you?

User 9852713200

03-09-2008 14:41:45

Thanks for your information!





When looking at the JNLP file for instant JChem, I found the following section





<resources>


<j2se version="1.5+"/>


<jar href="JNLPInstaller.jar" main="true" download="eager"/>


</resources>





I believe MarvinBean has been used in instant JChem, but only one jar is specified in the JNLP file in this case. Can we use the same trick?





thanks again,

ChemAxon 7c2d26e5cf

03-09-2008 17:22:24

InstantJChem web start follows a totally different download mechanism than MarvinSketch/View web start.


MarvinSketch web start uses the same main class (chemaxon/marvin/Sketch) than the desktop Marvin application. (The situation is also similar in MarvinView.)


InstantJChem web start jar does not includes InstantJChem resources.


Actually, it is a small installer that downloads IJC resources and installs it in silent mode to the user's machine. On the IJC forum, Tim give more info about it.


IJC includes the Marvin Beans API. Marvin components are integrated into IJC.


If you prefer this way (that IJC uses), you have to write a simple Java application that download all Marvin jars from the given URL and launch the proper main class (chemaxon/marvin/Sketch or chemaxon/marvin/View). In this case, you can refer to this application in your jnlp example.


Actually the result is the same because somehow all resources for Marvin should be downloaded.