Inside the domain.sh file that comes with WildFly Final 8.0.0 we can see the line in which java is actually being called:
eval \"$JAVA\" -D\"[Process Controller]\" $PROCESS_CONTROLLER_JAVA_OPTS \
\"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/process-controller.log\" \
\"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \
-jar \"$JBOSS_HOME/jboss-modules.jar\" \
-mp \"${JBOSS_MODULEPATH}\" \
org.jboss.as.process-controller \
-jboss-home \"$JBOSS_HOME\" \
-jvm \"$JAVA_FROM_JVM\" \
-mp \"${JBOSS_MODULEPATH}\" \
-- \
\"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/host-controller.log\" \
\"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \
$HOST_CONTROLLER_JAVA_OPTS \
-- \
-default-jvm \"$JAVA_FROM_JVM\" \
'"$#"' "&"
I understand most of the commands, but I have not being able to find what does the double dashes do "--" in a java argument context. How are the arguments between the two sets of double dashes interpreted by the jvm?
Double dash is used to signify end of the command options.
If you replace 'eval' on 'echo' you will see doubled OPTS like '-server -Xms64m -Xmx512m'
This means first settings are for Process Controller after -- you have settings for Host Controller
Related
I've already built and created the libraries I needed for my project for Windows [.dll] and Mac OS X (Arm based) [.dylib]. The fact is that, given the processor difference, I don't know If I can make the *.so libraries ( at least I think that the extension of the libraries , from what I've found after searching A LOT ).
If someone knows and says otherwise, I'll take as given that it's not possible to do it.
The method I've used is the one via cmake.
Example :
cmake -DCMAKE_SYSTEM_PROCESSOR=arm64 \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DWITH_OPENJPEG=OFF \
-DWITH_IPP=OFF \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr/local/opencv \
-D JAVA_INCLUDE_PATH=$JAVA_HOME/include \
-D JAVA_AWT_LIBRARY=$JAVA_HOME/jre/lib/amd64/libawt.so \
-D JAVA_JVM_LIBRARY=$JAVA_HOME/jre/lib/arm/server/libjvm.so \
-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.5.5/modules \
-D WITH_FFMPEG=OFF \
-D WITH_OPENCL=OFF \
-D BUILD_opencv_java=ON \
-D OPENCV_ENABLE_NONFREE=ON \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=OFF \
-D BUILD_ZLIB=OFF \
-D BUILD_EXAMPLES=ON ../opencv-4.5.5
I know the question is almost stupid, but I'll still want to be sure. Thank you guys <3
I'm quite new to devops world, and I'm currently learning it. I'm trying to start a docker-compose file with kafka and specific app that interacts with it, following one of the tutorials. It requires to start the java jar with the following parameters:
java -Dcom.sun.management.jmxremote.port=5555 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-jar build/libs/kafka-streams-scaling-all.jar
The question is - how do I run multiline command with options? I've tried it this way:
autoscaling:
exec:
command:
- java
- |
-Dcom.sun.management.jmxremote.port=5555 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-jar build/libs/kafka-streams-scaling-all.jar
But it returns in "./docker-compose.yml", line 75, column 9 could not find expected ':' in "./docker-compose.yml", line 76, column 9
and some of the answers on the internet suggest to use > sign:
autoscaling:
exec:
command: >
java -Dcom.sun.management.jmxremote.port=5555 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-jar build/libs/kafka-streams-scaling-all.jar
But docker doesn't seem to understand the "-" part of the command expected <block end>, but found '-' in "./docker-compose.yml", line 74, column 7
What is the best way to approach the running the java jars with options in docker-compose files?
Wrong indentation
<service_name>:
command: |
java \
-Dcom.sun.management.jmxremote.port=5555 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-jar build/libs/kafka-streams-scaling-all.jar
When I run
javapackager \
-deploy \
-Bruntime="/Users/david/Library/Java/JavaVirtualMachines/openjdk-15.0.2/Contents/Home" \
-native image \
-name "Sermon Viewer" \
-title "Sermon Viewer" \
-srcdir . \
-outdir . \
-srcfiles SermonViewer.jar \
-appclass Main \
-outfile SermonViewer \
-nosign \
-v
It returns
com.oracle.tools.packager.ConfigException:
Cannot determine which JRE/JDK exists in the specified runtime directory.
I can compile just fine from with Intellij and the directory does exist.
I've also tried:
export JAVA_HOME=`/usr/libexec/java_home`
and removed -Bruntime but same error.
I have a gzipped file that is too large to unzip and save. I'm looking to use zcat to unzip it and feed it into a java program that takes in multiple inputs. This program has the format:
java -jar GenomeAnalysisTK.jar \
-T FastaAlternateReferenceMaker \
-R refgen.fa \
-o output.fasta \
-V data.vcf
Where after -V is supposed to be the input from the gzipped file. I've tried something like:
zcat data.vcf.gz | java -jar GenomeAnalysisTK.jar \
-T FastaAlternateReferenceMaker \
-R refgen.fa \
-o output.fasta \
-V
But this does not work. How can I solve this issue?
I started tomcat through jsvc as daemon. But after jsvc started, I see double jsvc process.
Process had started by daemon.sh with option start:
start )
"$JSVC" $JSVC_OPTS \
-java-home "$JAVA_HOME" \
-java-home /usr/lib/jvm/jre1.7.0_11 \
-user $TOMCAT_USER \
-pidfile "$CATALINA_PID" \
-wait 10 \
-outfile "$CATALINA_OUT" \
-errfile "&1" \
-classpath "$CLASSPATH" \
"$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMP" \
$CATALINA_MAIN
exit $?
Assuming your question is: Why do I get two processes? This could be because jsvc starts a main daemon process and a child process for the actual work.