How to access data in Instant JChem using URLs
This document describes how to access data in IJC using a URL. This lets you do things like:
- Send an email containing an IJC URL so that when user clicks on the link IJC opens and displays the appropriate data.
- Provide links in web pages that open IJC and take you to a particular set of data.
IJC URLs operate on two different levels:
- They can refer to data in a shared project using information in any of the databases that are defined in this shared project. In this mode a URL can be generated by one person and used by a different person in their own copy of IJC. To use this mechanism a shared project must be set up.
- The information in a shared project can be referred to using a HTTP based URL. In this mode a Java Web Start installation of IJC can be referred to so that clicking on the link for the URL (e.g. in an email or web page) loads IJC, opens the shared project and then opens the data that is specified. To use this mechanism the administrator needs to install the IJC UrlWepApp application to your web server as well as the shared projects. For examples of this in action see the demo page.
What you need
IJC URLs are used with shared projects. Only by using a shared project is it possible for a URL to refer to the same thing in different running copies of IJC. To deploy a shared project you need a standard HTTP server.
You must have an IJC enterprise license to deploy shared projects and use IJC URLs.
To deploy the web application that provides the HTTP URLs (mechanism 2 above) you must have a web server that supports Servlets (e.g. Tomcat or most other J2EE servers). You must also deploy the Java Web Start version of IJC to your server.
Steps
The exact steps you need to follow depends on which mechanism you are using. See above for details.
1. Prepare the shared project files
Create the .ijp and .zip files that are needed for shared project configurations. See here for details of these files. Do not deploy these files yet.
2. Deploy the UrlWebApp application to your server
The UrlWebApp application is contained in the file UrlWebApp.war that can be downloaded from here: UrlWebApp.war.
Recommended: If you have a servlet container that supports Servlet 2.4/JSP 2.0 or later, such as Glassfish, Tomcat 5, JBoss, Jetty 6, etc., then you can deploy URLWebApp.war as you would any WAR file. e.g. to install on Tomcat, simply copy UrlWebApp.war to $TOMCAT_HOME/webapps, then access http://yourhost.com:8080/URLWebApp/.
Alternative: If you do not have a servlet container such as Tomcat you can alternatively run the server application directly from the command line:
java -jar UrlWebApp.war
This starts a web server contained within the UrlWebApp.war file. More details and possible command line arguments can be found here.
Once deployed connect to the server with a web browser using a URL like this:
http://yourhost.com:8080/UrlWebApp/
from the server machine.
Follow the instructions on that page, repeated here for simplicity:
- Download
jws-url.zipfrom here. This file also contains the InstantJChem Java Web Start distribution. - Unzip the downloaded file to the folder:
${HOME}/.instantjchem/jnlpwebApp
The folder (${HOME}/.instantjchem/jnlpwebApp) can be configured using the ijc.data.dir property in this WebApplication's WEB-INF/web.xml file (this means you need to unzip the UrlWebApp.war file, edit the web.xml file, and then re-zip the files to recreate the UrlWebApp.war file). - Copy the ChemAxon license file to:
${HOME}/.instantjchem/jnlpwebApp/data/license.cxl - If you forward all http request from other webserver (e.g. Apache,
IIS, Lighttpd) to java webserver with the deployed
UrlWebApp.warthen you need to update the locations of the web pages from the other web server in the file
${HOME}/.instantjchem/jnlpwebApp/extra.properties
For example the location of the IJC URL demo web application on Chemaxon web site is http://www.chemaxon.com/urldemo/, so the content ofextra.propertiesfile is
base.url=http://www.chemaxon.com/urldemo/
If everything is configured correctly InstantJChem will be started and the demo project opened
after going to the URL http://yourhost.com:8080/UrlWebApp/demo.jnlp?startJnlp in
your web browser. You can now deploy your own shared project prepared in the section 1.
A prepared shared project (e.g. prj.ijp and prj.zip ) should be copied to
${HOME}/.instantjchem/jnlpwebApp/data/.
The project prj.ijp is opened in InstantJChem after typing
http://yourhost.com:8080/UrlWebApp/prj.jnlp?startJnlp
to web browser.
You can also open the project in InstantJChem by File->Open Shared Project
action from main menu. The demo project can be removed by deleting
demo.ijp and demo.zip files from folder with projects.
Structure of folder with configurations data (${HOME}/.instantjchem/jnlpwebApp):
-
data/- folder with deployed shared projects,license.cxland html pages. You can change the default index page of the UrlWebApp application by changing theindex.htmlfile. -
jws/- folder with InstantJChem JWS distribution. You can modify startup options of InstantJChem inmaster.jnlpfile. Available parameters are listed here. -
extra.propertiesallows to specify base url of web application. It has been described in previous instructions.
3. Generate IJC URLs.
Once installed IJC URLs can be used. Create these using the 'Generate URL' function within IJC. See the user documentation for more details.
How to update already installed distribution
- Download
jws-url.zipfrom here. This file also contains the InstantJChem Java Web Start distribution. - Unzip the downloaded file to the temporary folder.
- Customize
jws/info.propertiesconfiguration file. If you want to deploy installation folder and user dir of InstantJChem to the same folder on client like in previous Java Web Start distribution you can replace__ijc_versionproperty with the existing in${HOME}/.instantjchem/jnlpwebApp/jwsfile. You can also uncomment line#obsolete_versions=5.4,5.5
and specify that previously installed InstantJChem JWS versions will be deleted on client machines. - Copy
info.properties instantjchem.zip JNLPInstaller.jar
files fromjwsfolder to:
${HOME}/.instantjchem/jnlpwebApp/jwsfolder. If you want to use the same installation folder and user dir of
How to use centralized InstantJChem installation
In case you don't want to download InstantJchem installation by all users you can use centralized InstantJChem installation (e.g. deployed to network drive). The folder with ijc installation can be specified in info.properties by propertyexisting_install_dir. If the folder is not found on client machine
InstantJchem will be downloaded.
It's possible to use platform dependent path for InstantJchem installation by using these three properties:
- existing_install_dir.linux
- existing_install_dir.windows
- existing_install_dir.macos
Problems?
If you find problems or have any questions then please report them to the
IJC forum.
Do you have a question? Would you like to learn more? Please browse among the related topics on our support forum or search the website. If you want to suggest modifications or improvements to our documentation email our support directly!


