Page 1 of 1

building insight

PostPosted: Fri Dec 11, 2015 11:57 am
by axkibe
Hi, I got two question to build insight.
Code: Select all
./build.py && ./build.py release-clients

Seems to work fine,

However the resulting jar files seems to have some issue:

Code: Select all
dist$ pwd
/home/axel/om/openmicroscopy-axel/components/insight/OUT/dist
dist$ java -Xms256000000 -Xmx1024000000 -jar omero.insight.jar

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "Initializer"
dist$


I also tried to only build insight following this guide:

http://www.openmicroscopy.org/site/supp ... uting.html

Code: Select all
/home/axel/om/openmicroscopy-axel/components/insight/build
build$ java build
Error: Could not find or load main class build


Which is as far I understood "java" command is no wonder, shouldn't this be "ant" or something?

Re: building insight

PostPosted: Tue Dec 15, 2015 11:49 am
by Dominik
Hi,

thanks for pointing this out.
Code: Select all
java build
won't work any more, we have to update the documentation with respect to this. Yes, the recommended way is to use the Python script on the top level directory.

Launching the Insight jar from the command line is a bit tricky. You need to pass on the classpath, the relative path to the config (container.xml) and the path to the application directory.
In your case this should work (assuming you are in the OUT/dist directory:
Code: Select all
java -cp "*:../app/libs/*" org.openmicroscopy.shoola.Main container.xml /home/axel/om/openmicroscopy-axel/components/insight/OUT/app


Regards,
Dominik

Re: building insight

PostPosted: Wed Dec 16, 2015 12:52 pm
by axkibe
I don't know what your testing workflow is, after executing the python scripts once to build all dependencies I ended up running

in "components/insight/build/": "ant compile"
and in: "components/insight/OUT/app/compiled"
"cp -r ../config ." (only needed once)
"java -classpath .:../libs/\* -Xms256000000 -Xmx1024000000 org.openmicroscopy.shoola.Main"

Re: building insight

PostPosted: Thu Dec 17, 2015 10:37 am
by Dominik
I think the easiest way for building insight is running the top-level python script pointing it to the insight build.xml:
Code: Select all
./build.py -f components/insight/build.xml

Launching insight from the command line then depends from which directory you're launching it, so that it can find the config files, either copying them or setting the 'app' directory via command line argument, should work both, whatever you prefer.

By the way, with the upcoming 5.2.1 release (should be just a couple of hours now) we're also going to update/fix the "Contributing to OMERO.insight" page you were referring to.

Regards,
Dominik