Error with CellProfiler 2.1 on Windows 10


Hi there!

Recently I’ve been trying to install CellProfiler on my computer. I can install it, but when I run it, there’s an error saying “Failed to create Java VM” and after some lines says:

RuntimeError: Failed to start Java VM
Load ilastik Core
stopping worker thread 0
stopping worker thread 1
stopping worker thread 2
stopping worker thread 3
stopping worker thread 4

What’s wrong? I’ve been reading some other topics and I think I already have jdk as a Environment Variable, so I don’t know what else is wrong.

Here is a screenshot of the error:

And I believe this is the same error that occurs with CP 2.2:


Hi there,

Can you still try using CP 2.2 and see if the error persists.

If you have python already installed, can you try to open python (using command windows) and then type the following commands one after another inside python:

import javabridge
import bioformats

Let us know whether any of those commands give you any errors,



Hi Minh!

The error still persists with CP 2.2.

As for those commands, these are the outcomes:



The error hints us that Javabridge could not be loaded correctly. Can you please do:

  • Update JDK, can be downloaded here
    Note that you have to install the 32- or 64- bit accordingly. I guess you have 64 bit system, so please choose 64-bit JDK.

  • Download and install Visual C++ 9.0 and its compiler for Python 2.7 here

After both steps, re-run the commands I posted before, and let us know the output.

Good luck and thanks for nice screenshots !



I’ve done that and re-ran the commands and I got the same output as before.


That actually narrows down the problem into JAVA_HOME.

Can you please check how many Java you have in your computer, for example :

C:\Program Files\Java\jdk1.8.0_114
C:\Program Files\Java\jre1.8.0_114

If you indeed have multiple, please go to your command windows, and type (for example):

JAVA_HOME=C:\Program Files\Java\jre1.8.0_114

To set it to correct 64-bit version of JRE

You can also try to remove that JAVA_HOME: follow the instruction in this post to find the settings and remove it.

Let me know if it helps.


Still getting the same error (RuntimeError: Failed to start Java VM) :frowning:

I believe I did everything as you said:


Now, that error (UnicodeEncodeError: “ascii” …) actually gives me some more hope :smile:

Please do the following:
Open command line windows as administrator (how-to), and type:

  • pip uninstall javabridge

  • pip install git+

Then check again if it helps.
Fingers crossed for you !


Do I need to be in any specific folder? 'Cause right now, the second command gives me this:

Having these installed:


I wonder if it’s better when you set your JAVA_HOME to the location of JDK instead of JRE

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131

and re-run the 2nd command and if javabridge installation is done successfully, try to experiment running CellProfiler under the effect of JAVA_HOME set to either JDK or JRE.

Many thanks for being very patient here, giving a lot of screenshots. It’s really helpful for us.


So what I did now was set both a JDK_HOME and a JAVA_HOME (for JRE) and it solved the previous problem, but now, appears this one D:

You’re welcome! I’m the one who’s grateful for all your help!


So, after a long, long talk with Minh, we (well, Minh) realised the problem was the username account. My username has a special character therefore creating some problems with Java (CP was not able to start Java VM).

One solution is to install CP on your computer, as you would normally do, create a new account whose username does not has any special character and always run CP using the new account. With this, CP runs well, as it should be.


Many thanks to JotaPT’s patience to test out every possible suggestions.

To add to JotaPT’s reply, here is some more important notes, hope it would benefit others as well:

  • First and foremost, do not use non-ASCII character on anywhere along the path, including username, folder name, file names… Related issues

  • Check which versions of the following softwares have you installed (32- or 64- bit of python 2.7/3.5, Java Development kit (JDK), Java Runtime Environment (JRE), and of course your OS). Combine them wisely !

  • If you happen to have python 2.7 32-bit installed on Windows 64-bit , then you would need both JRE 64-bit and JDK 32-bit installed first, before installing CellProfiler.

  • Before installing CellProfiler, it’s better to set JAVA_HOME to JDK 32-bit. After successful installation of CellProfiler, set JAVA_HOME to JRE 64-bit. How to set JAVA_HOME

Hope it helps.

Can you help me with the istall&shut down problem?