Weasis Portable - Windows 8 - Embedding JRE - x64 compatibility

2,448 views
Skip to first unread message

andrea...@atsmed.it

unread,
Jan 8, 2013, 10:43:22 AM1/8/13
to dcm...@googlegroups.com
I found an incompatibilty of Weasis-Portable 1.2.3 with Windows 8 due to jai-lib not compatibles.
You have 2 way to solve this issue: start weasis with compatibity mode enabled (Windows 7 is enough) or you can add this to ini file

-Dos.name="Windows 7"

I have also created a custom version of executable that can use a bundled JRE.
You can simply add the folder called jre7 in the same path of .exe and, if correct version of java is not present in the system, it starts the bundled jre.
To create it i have used a custom version of launch4j. In the original version launch4j use the bundled JRE also if is present in the system. It's a good solution if you start the viewer from an HDD, but became really slow if it's started from Optical Media; then, for our purpose, is better to try to start the installed JRE and if is not present or is not compatible start the bundled one.
Due to incompatibility of ImageIO library and x64 RunTime i also skipped the check of availabilty of 64 bit RunTime.

You can find the modified executable and ini file attached to this post.
weasis-win32.zip

nicolas...@gmail.com

unread,
Jan 8, 2013, 2:20:36 PM1/8/13
to dcm...@googlegroups.com
What kind of errors did you get on Windows 8?

In the current development version (https://github.com/nroduit/Weasis/ master or 1.2.x branch), I've changed the maven launch4j  builder (https://github.com/vorburger/launch4j-maven-plugin) that fixes some minor issues (like single instance executable).

I would be interested by the modifications you made to apply a patch to the project mentioned above. The best behavior for Weasis would be to prefer the JRE 32-bit (there is also patch available at http://sourceforge.net/projects/launch4j/forums/forum/332684/topic/3673020). It would be also interesting to embedded  a Windows JRE 32-bit for DICOM CDs and use it only if the minimal JRE required is not available on the system (because it is a bit slow to load the JRE from CD).

Bradley Ross

unread,
Jan 8, 2013, 6:53:39 PM1/8/13
to dcm...@googlegroups.com
If the problem is incompatibility it may be because Windows 8 is using Java 7.  There are some incompatibilities with the Java 7 JRE due to some deprecated classes being removed.  Can you see which java you are using and see if it will work with Java 6.  Try java -version to see which version is in use.

andrea...@atsmed.it

unread,
Jan 9, 2013, 3:37:38 AM1/9/13
to dcm...@googlegroups.com
No the problem is not Java, the problem are jai-lib. Below the error:

org.osgi.framework.BundleException: Unresolved constraint in bundle jai-lib-windows-x86 [2]: No matching native libraries found.
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
    at java.lang.Thread.run(Unknown Source)

And the problem is present in java 6 and 7.

andrea...@atsmed.it

unread,
Jan 9, 2013, 4:04:11 AM1/9/13
to dcm...@googlegroups.com
You can try to change the original head library with that i have modified and recompiled.
This is a custom version of launch4j 3.0.2.
I would like to add this option to gui interface and .xml configuration file of Launch4j but i don't yet understand how to do that.
head.zip

nicolas...@gmail.com

unread,
Jan 9, 2013, 9:46:43 AM1/9/13
to dcm...@googlegroups.com
Thanks, I will try to incorporate theses features in a fork of https://github.com/vorburger/launch4j-maven-plugin (for the Maven build, not in the GUI of launch4j). This will allow to build Weasis in the current way.


> BundleException: Unresolved constraint in bundle jai-lib-windows-x86 [2]: No matching native libraries found.
It is a normal result if you run Weasis with a 64-bit JRE and you try to view  a specific TSUID (like JPEG Losseless), see http://www.dcm4che.org/confluence/display/WEA/Dicom+Conformance.

FYI: I'm working to provide for all the systems native decoders (JPEG-LS and other missing JPEG syntaxes).

andrea...@atsmed.it

unread,
Jan 9, 2013, 11:23:34 AM1/9/13
to dcm...@googlegroups.com
In Windows 8 you have the error "Unresolved constraint in bundle jai-lib-windows-x86 [2]: No matching native libraries found." also with x86 JRE.

nicolas...@gmail.com

unread,
Jan 9, 2013, 4:31:18 PM1/9/13
to dcm...@googlegroups.com
This issue is related to the Apache framework. I open an issue and suggest a patch at https://issues.apache.org/jira/browse/FELIX-3844
It should be fixed in next release.

nicolas...@gmail.com

unread,
Jan 26, 2013, 10:51:08 AM1/26/13
to dcm...@googlegroups.com
In the new release 1.2.4, all the issues has been fixed. I applied a patch to the Felix framework that will let Weasis run native libraries on Windows 8 (or following Windows systems).

The windows executable prefers now running the 32-bit Java Runtime when 32 and 64-bit runtime are installed. And it is also possible to embed a runtime for DICOM CDs, see the end of this page.

I forked the launch4j maven-plugin mentioned above. That's mean all these functionalities will be available when you build Weasis from sources (generate the Windows executable).
Reply all
Reply to author
Forward
0 new messages