Bug 1884184

Summary: Error: Could not create the Java Virtual Machine
Product: [Fedora] Fedora Reporter: jari.kosonen4
Component: imagejAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 33CC: bloch, neuro-sig, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: imagej-1.50-13.h.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-23 22:05:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jari.kosonen4 2020-10-01 09:48:49 UTC
Description of problem:
[jari@ENVY-17 project]$ imagej
ImageJ can not start because of some problem/error:
Unrecognized option: -d64
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

[jari@ENVY-17 project]$ imagej -version
LD_LIBRARY_PATH=/usr/share/java/lib/Linux_x86_64
locklist: 
 01-jari-jari-PC-_0 02-jari-jari-PC-_0 03-jari-jari-PC-_0
creating lock 04-jari-ENVY-17-:0 ... done
Socket lock: 04-jari-ENVY-17-:0

/usr/lib/jvm/java-11-openjdk-11.0.9.6-0.0.ea.fc33.x86_64/bin/java -d64 -mx768m -cp /usr/share/java/imagej.jar::/usr/share/java/imagej.jar ij.ImageJ -ijpath /home/jari/.imagej -port4 -eval 'rsion'
Unrecognized option: -d64
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Version-Release number of selected component (if applicable):


How reproducible:
start imagej on command line

Steps to Reproduce:
1. imagej
2.
3.

Actual results:
crashing.

Expected results:
no crash

Additional info:

Comment 1 Ankur Sinha (FranciscoD) 2020-10-01 10:24:29 UTC
Thanks for your bug report. 

I can't find any documentation on this yet, but perhaps java 11 no longer supports the `-d` option that is used to tell the vm that we're on a 32/64 bit machine. I'll dig in a bit more, but for a temporary workaround until I can push a fix, you can edit `/usr/bin/imagej` and remove the `java_arch` bit from lines 474 and 478. So, the ending of the script should look like this:

if (( $verbosity > 0 )) ; then
    echo ${JAVA_HOME}/bin/java -mx${mem}m ${modules} ij.ImageJ -ijpath ${ij_user_path} -port${count} ${images} ${macrocmd} ${macroargs}
fi

cd "$dir"
eval "${JAVA_HOME}/bin/java -mx${mem}m ${modules} ij.ImageJ  -ijpath ${ij_user_path} -port${count} ${images} ${macrocmd} ${macroargs} "
exit 0


That makes imagej work fine from the looks of it.

Comment 2 Fedora Update System 2020-10-06 21:00:20 UTC
FEDORA-2020-cf961bb49a has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-cf961bb49a

Comment 3 Fedora Update System 2020-10-07 14:30:23 UTC
FEDORA-2020-cf961bb49a has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-cf961bb49a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-cf961bb49a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2020-10-23 22:05:33 UTC
FEDORA-2020-cf961bb49a has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.