Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion aicsimageio/readers/bioformats_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ class BioformatsReader(Reader):
requires the java executable to be available on the path, or via the JAVA_HOME
environment variable.

To install java with conda, run `conda install -c conda-forge openjdk`.
You may need to deactivate/reactivate your environment after installing. If you
are *still* getting a `JVMNotFoundException`, try setting JAVA_HOME as follows:

# mac and linux:
export JAVA_HOME=$CONDA_PREFIX

# windows:
set JAVA_HOME=%CONDA_PREFIX%\\Library

Parameters
----------
image : Path or str
Expand Down Expand Up @@ -253,7 +263,13 @@ def __init__(
raise type(e)(
str(e) + "\n\nBioformatsReader requires a java executable to be "
"available in your environment. If you are using conda, you can "
"install with `conda install -c conda-forge openjdk`. "
"install with `conda install -c conda-forge openjdk`.\n\n"
"Note: you may need to reactivate your conda environment after "
"installing opendjk. If you still have this error, try:\n\n"
"# mac and linux:\n"
"export JAVA_HOME=$CONDA_PREFIX\n\n"
"# windows:\n"
"set JAVA_HOME=%CONDA_PREFIX%\\Library"
)

self._path = str(path)
Expand Down