On 11/27/2017 5:03 PM, Michael Hall wrote:
The application usually runs as an OS X application. So I don’t use
-jar. I do have a shell script launch for testing…

#!/bin/bash

APP_ROOT=HalfPipe7.app
JAVA=${APP_ROOT}/Contents/Java
export R_HOME=/Library/Frameworks/R.framework/Resources
java --patch-module java.transaction=${JAVA}/jta.jar -XX:+CITime -Xms32M
-Xmx256M -Xdock:name=HalfPipe
-Dcom.apple.mrj.application.apple.menu.about.name=HalfPipe
-Dapple.laf.useScreenMenuBar=true
-Djava.library.path=$APP_ROOT/Contents/MacOS -Djava.security.manager
-Djava.security.policy=$APP_ROOT/Contents/JavaApp/all.policy
-Dapp.lib=$APP_ROOT/Contents/JavaApp -Dconsole=pane -cp
.:..:hp_jshell.jar:${JAVA}/halfpipe.jar:${JAVA}/log4j-1.2.16.jar:${JAVA}/quartz-2.2.2.jar:${JAVA}/quartz-jobs-2.2.2.jar:${JAVA}/httpcore-4.1.jar:${JAVA}/httpclient-4.1.jar:${JAVA}/commons-logging-1.1.1.jar:${JAVA}/slf4j-api-1.7.7.jar:${JAVA}/slf4j-log4j12-1.7.7.jar:${JAVA}/antlr-2.7.7.jar:${JAVA}/AppleScriptEngine.jar:${JAVA}/Classes:${JAVA}/groovy-all-2.4.5.jar:${JAVA}/JRI.jar:${JAVA}/JRIEngine.jar:${JAVA}/JRS.jar:${JAVA}/REngine.jar:${JAVA}/RserveEngine.jar:${JAVA}/jta.jar:${JAVA}/macnio2.jar:${JAVA}/stringtemplate-3.2.1.jar:${JAVA}/weka.jar:${JAVA}/js.jar
us.hall.hp.common.LoaderLaunchStub

Note—patch-module at start if I am doing that correctly, gets…
WARNING: Unknown module: java.transaction specified to --patch-module

This is the installed jvm, not the embedded application one (I could
point it at that if useful), but it should have all modules included?

You said that you jlinked an image to include java.corba, which means the image will contain java.transaction as well. I don't know what the quartz scheduler that you mentioned is doing when you run it on your custom image, but evidently java.corba was being resolved at run time because it triggered resolution of java.transaction with its miniature javax.transaction package.

If you're running a classpath application on the JDK out of the box, then java.corba will not even be resolved, and nor will java.transaction. Hence the warning that patching it is fishy. You can use --add-modules java.transaction to force its resolution.

Please note that java.corba and java.transaction are both deprecated FOR REMOVAL. There will soon be a modular version of JTA which you can deploy on the upgrade module path rather than via patching. See the very end of http://openjdk.java.net/jeps/8189188.

Alex

Reply via email to