CellProfiler Startup error: could not find path to Java environment directory

Hello, I just tried to upgrade my CellProfiler installation to 4.0.

I get the error messages with “CellProfiler Startup error: could not find path to Java environment directory” (screenshot attached).

I’ve been through the instructions at https://github.com/CellProfiler/CellProfiler/wiki/Windows-Installation-Troubleshooting
but all looks fine, CP_JAVA_HOME environment variable exists and points to C:\Program Files (x86)\CellProfiler\java. System locale is English (UK).
Any help much appreciated.

Hi @huwnaylor,

That sounds very unusual, would you be able to send a screenshot of your environment variables?

Could you also confirm whether you’re running from source or a downloadable built version?
Thanks

1 Like

Hello everybody,
I have exactly the same problem like huwaylor. I have found the “solution”
have you test to start the cellprofiler on administrator mode …?

image

Best

Hi @DStirling, thankyou for your prompt response.

Here are my environment variables:

I can give an important update here: when I was getting the screenshot I noticed these are the environment variables for adm-huw, which is my admin account on the computer I’m using. We’re generally only allowed to use a separate account without admin rights for everyday usage, and the admin account is for installations only (local IT policy). I tried logging in as admin and running CellProfiler, and this worked fine.
[Just as I’m typing this I see @Erwan67 has beaten me to it! Thanks!]

I’m running from a downloadable version (downloaded from cellprofiler.org yesterday).

But the problem in administrator mode (I think I’m not sure …) it is necessary to put your data directly in the cell profiler folder. otherwise it does not see the * .tif files …

Ah I see, that would make sense. You might want to try setting these as system variables (the bottom section) rather than user variables then?

But the problem in administrator mode (I think I’m not sure …) it is necessary to put your data directly in the cell profiler folder. otherwise it does not see the * .tif files …

I’m not sure what you mean here, are you not able to drag files into the Images module?

1 Like

Thankyou @DStirling that seems to be the solution! CellProfiler now starts correctly

Another screenshot of what I did, in case this is useful to anyone else:

In the ‘System variables’ section (bottom panel) I clicked ‘New’ and created the variable CP_JAVA_HOME, with value ‘C:\Program Files (x86)\CellProfiler\java’, exactly as it is in the ‘User variables’ top panel. This has solved the issue for me so I’ve marked @DStirling 's post as the solution. Thanks.

1 Like