A problem with this same basic description has cropped up a great many years ago and seems to come back now and then.
...I've been using computers since before Microsoft even existed, so by now I know how to do my homework. And yes, I brought up Microsoft because the platform is Windows. Here's the path I've taken:
Happily using OpenOffice, today I needed to edit a pdf, and decided to use OO to do it. I opened Writer and it responded with a large pop-up that was blank except for the OO logo and in the footer-bar it said "Loading:" and blue squares got about half way across to the right with a centered pop-up titled "JRE Required", and text reading, "OpenOffice requires a Java runtime environment (JRE) to perform this task. Please install JRE and restart OpenOffice."
I'm a programmer who uses Java and this is on my personal development box, so knowing a full JDK and more than one JRE was already on the box, I double checked, figured something needed an update, and updated OpenOffice from whatever it was to the latest, 4.1.5. As you can guess, that changed nothing. I found my way to the Tools -> Options -> OpenOffice -> Java settings, asked it to Add... and went through the exact same steps as so many before me. When it repeatedly, and errantly, kept repeating "The folder you selected does not contain a Java runtime environment. Please select a different folder.", I figured "it's broken", and did an online search.
This got me to a large handful of web pages, a great number on this very site in this forum, where others have been through this same path since roughly 2011, maybe longer, I didn't have the patience to look at older entries. Among the more helpful of these are:
From Sept. 2017:
viewtopic.php?f=5&t=90192
From June, 2018:
viewtopic.php?f=15&t=88978
From Oct. 2016:
viewtopic.php?f=9&t=85667#p399946
From May, 2015:
viewtopic.php?f=13&t=77245
I even found a current bug, number 121955:
https://bz.apache.org/ooo/show_bug.cgi?id=121955
Along the way of trying all the suggested things, I've installed the only 32 bit JRE I could easily find (version 1.6.0_12 - aka "version 6"), and the Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update file msvcr100.dll. I even told the handy Java installation handler about the new 1.6 installation and it happily recognizes it.
Of course, nothing has worked or I wouldn't be posting now. My setup:
Windows 7 Professional with SP1, 64 bit.
OpenOffice 4.1.5
Not sure what else is needed.
I'd like to recommend the OpenOffice project firstly, dramatically improve the error messages on this topic. For example, it must be well known by now that a 32 bit JRE is needed, so the pop-up should know it's Windows and on a 64 bit box and tell the person what's going on. It also can't possibly be the case that the files aren't visible, so instead of saying an installation wasn't found, it can say an installation was found it can't use. I'm sure there are other ways in which the error messages can be improved. No, error messages aren't a high priority for most developers, but they ARE a top priority for users when something is going wrong. Non-useful error messages reflect badly on entire projects.
I'd also like to suggest the OpenOffice project get rid of this problem forever. How embarrassing that it can't solve this bitwise problem! I'd bet there are a number of ways this could be permanently solved, not the least of which is to have a compiled 64 bit version. ...It's not as if 64 bit computers sitting on desktops are anything new. For one thing, Java can be embedded. My wild guess is, being a developer myself, the developers aren't interested because THEY never have the problem.
Neither of my suggestions helps solve the problem now, though. ... I'm guessing it's going to be something like, "OH! You can't use something as old as JRE 1.6!" But before I do this
