Problem
I'm trying to use pyimagej==0.4.0 (source). Per its README, I run the following code:
import imagej
ij = imagej.init()
And it returns the following error: No Java runtime present, requesting install.
I looked up this error in multiple articles:
Even though JRE 8 is installed on my MAC -" No Java Runtime present,requesting to install " gets displayed in terminal
https://apple.stackexchange.com/q/283858/327668
Both articles say I need the full JDK, not just the JRE. However, I think I have the full JDK.
Background
pyimagej==0.4.0
macOS Mojave v10.14.3
miniconda 4.6.14
Set up conda environment with:
conda create -n pyimagej pyimagej openjdk=8
conda activate pyimagej
Checking environment:
(pyimagej) ➜ fiji_test java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (Zulu 8.33.0.1-macosx) (build 1.8.0_192-b01)
OpenJDK 64-Bit Server VM (Zulu 8.33.0.1-macosx) (build 25.192-b01, mixed mode)
(pyimagej) ➜ fiji_test echo $JAVA_HOME
/usr/local/Caskroom/miniconda/base/envs/pyimagej
Can you please fill in what am I missing? Thank you in advance for any advice.
Well it turns out the problem was quite in the weeds.
It seems this problem was encountered by one of pyimagej's developers here: https://github.com/imagej/pyimagej/issues/10
The developer posed a short-term workaround of directly modifying the jdk's Info.plist.
The developer also opened a PR for a more long-term solution. Hopefully it gets closed, and then hopefully no one else will encounter this! :)
Related
Is anyone else having this issue when they run the module it complains about this in java 9 mac version?
Below is the issue!
Unrecognized option: -modulepath
Error: Could not create the Java Virtual Machine.
How to reproduce ?
I am doing this example. The last step is to run the module using below command. That's when i see the issue.
java -modulepath mods -m com.mycompany.helloworld/com.mycompany.helloworld.HelloWorld
Here is some background information.
. I started playing with java 9 (mac version).
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+138)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+138, mixed mode)
I can not even uninstall the java 9 properly. But, I will solve that later.
any help will be appreciated!
As Joop Eggen have said, there is an effort in the JDK to standardize the command-line options and use the GNU-style --starting-with-double-dash-and-dash-separated-long-options. So yes, --module-path is what you're looking for.
For the reference:
The module system options were renamed in build 132, issue: https://bugs.openjdk.java.net/browse/JDK-8136930
Code review thread with the options summary: http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-August/009025.html.
Here is the JEP that gives the guidelines for the newly added options and tools: http://openjdk.java.net/jeps/293
Windows show like this:
Thinking it might be OpenJDK's fault, I downloaded Java SE JDK and pointed the run script to it. This did not appear to help.
Not sure what information to provide, other than being on debian jessie, using awesomewm, and:
~$ java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-2)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
Leaving this up just in case someone stumbles on it. Apparently java, in many forms, has problems with a few wms. Awesomewm included. One needs to export a 'nonparenting' variable:
export _JAVA_AWT_WM_NONREPARENTING=1
Maybe someone will come along and offer a more fulfilling answer to this problem.
I have installed Oracle Java 7 in my /home directory by following steps given here (by just changing the path of installation). But still I cannot see the plugin listed in the chrome://plugins tab.
I also cannot see it running in JavaTester or here. I have tried enabling by following steps provided here but nothing works.
Some specifications:
Operating System: Ubuntu 14.04
output of java -version:
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Please comment if anything more is needed for resolving the problem
Just pull it from webupd8 servers. Follow the directions at the following link.
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
Also, this belongs on a different forum. This forum is for programming questions, installing a chrome plugin isn't really what we do. Next time post to the Ubuntu stack exchange located here.
I'm trying to build the new Java bindings of Open MPI (v.openmpi-1.9a1r29661) on Macbook Pro running Mavericks (OSX 10.9). I have the JDK 7 installed:
^_^:examples demirelo $ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
I configured the OMPI with that command:
./configure --enable-mpi-java --with-platform=optimized --with-jdk-dir=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home --prefix=/Users/demirelo/libs/openmpi
which is followed by the usual suspect:
make all install
When I tried to run the HelloWorld example, I received the following runtime error:
^_^:examples demirelo $ ../bin/mpijavac Hello.java
^_^:examples demirelo $ ../bin/mpirun -np 1 java Hello
JAVA BINDINGS FAILED TO LOAD REQUIRED LIBRARIES
-------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
Moreover, the ~/.bash_profile has the correct path to the /lib folder.
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/demirelo/libs/openmpi/lib/
It's quite mysterious which libraries failed. Previously, I was able to build slightly older version (openmpi-1.9a1r28578) on Lion and still use it on Mavericks. This time I needed a freshly compiled OMPI but didn't work out. I'm wondering if anyone else had the same issue with Mavericks and was able to fix it.
This appears to be a bug in Open MPI that is comprised of at least two issues:
OMPI is hard-coded to try to dlopen libmpi.so, which is the wrong name on OS X (it should be libmpi.dylib).
Even after I fix that, I'm running into another Java error that I need to run by the Java programmers.
Apparently, we haven't tested the OMPI Java bindings on OS X in a long time. :-(
Such is the life of running against the SVN trunk. Sorry!
i am using mac os x 10.8.2. i have installed java 1.7 and then take back since i can not send iphone applications via xcode. now java 1.6 is installed.
ysnky# ~$ java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
ysnky# ~$
but now i can not run eclipse. it does not open, it gives this alert and closed.
The JVM shared library "/System/Library/Frameworks/JavaVM.framework"
does not contain the JNI_CreateJavaVM symbol.
i am really confused and can not find a solution. i just want to run eclipse, that is all :(
thanks.
You can download and install from apple website.It works perfect for
me
http://support.apple.com/kb/DL1572?viewlocale=en_US
Update your Mac. Apple has provided new Java update which fixes this issue.
If you don't have the file /System/Library/Frameworks/JavaVM.framework/Versions/Current execute the following command
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/A Current
I was able to solve this by first removing any previously installed versions of the Oracle Java jdk. Instructions are here:
http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html#uninstall
Then installing Apple's official Java JDK. For some reason the Java download page on support.apple.com came back blank for me, but via Google's cached copy of the page, I found the direct link to download, which is what finally fixed this issue for me:
http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-001.dmg
You can download and install from apple website.It works perfect for me on mac 10.9.5
http://support.apple.com/kb/DL1572?viewlocale=en_US