Selected JRE is defective

Issues with installing under all versions of MS Windows
Post Reply
MikeRivers
Posts: 4
Joined: Thu Apr 18, 2013 7:15 pm

Selected JRE is defective

Post by MikeRivers »

Solved? Not for me!

I encountered this error message when trying to search the Help keyword index, and get the same message when trying to create a data base:

"Open Office requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install another JRE and select it under Tools-Options-OpenOffice.org-Java"

The currently installed version is what appears and is apparently selected in the pop-up window window. The "Use a Java runtime environment" box is checked. Just in case it actually was defective, I downloaded, installed, and verified it - twice.

Another post in this thread stated that Visual C++ was required, and I have that installed as well.

Open Office 3.4.1
Java 1.7.0.21
Windows 7, 32-bit
OpenOffice3.4.1_Windows7/32-bit
User avatar
Hagar Delest
Moderator
Posts: 33346
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Selected JRE is defective

Post by Hagar Delest »

Post split from the initial topic since the other one was solved...

Id the JRE checked in the Tools>Options>OOo>Java dialog?
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
MikeRivers
Posts: 4
Joined: Thu Apr 18, 2013 7:15 pm

Re: Selected JRE is defective

Post by MikeRivers »

Hagar Delest wrote: Is the JRE checked in the Tools>Options>OOo>Java dialog?
Of course. There's one instance of Java listed, its path is correct, and in addition to the "Use a Java runtime environment" box being checked, the button next to the Java version in the window is "pressed" (black dot in the circle).
OpenOffice3.4.1_Windows7/32-bit
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: Selected JRE is defective

Post by Bill »

MikeRivers wrote:Another post in this thread stated that Visual C++ was required, and I have that installed as well.
Which "Visual C++" did you install? There are several different versions currently available. Only one will work.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Greengiant224
Posts: 284
Joined: Wed Jun 09, 2010 3:50 pm
Location: All Over The World

Re: Selected JRE is defective

Post by Greengiant224 »

MikeRivers:
I am using,
Open Office 3.4.1
Java 1.7.0.21
Windows 7, 32-bit
I will try to simplify it further.
Java v 1.7 JRE uses the msvcr100.dll, it is installed by default in the C:\Program Files\Java\bin folder.
There is also a copy in the C:\Program Files\Java\bin\plugin2 folder.

By installing the MS Visual Basic C++ Redistributable 2010 (x86) file, a copy of:
msvcr100.dll and msvcr100_clr0400.dll is installed to the C:Windows\System32 folder.
Windows automatically registers these .dll files for use by the OS.
"Open Office requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install another JRE and select it under Tools-Options-OpenOffice.org-Java"
OpenOffice 'recognizes' the installed version of Java but cannot interact with it any further.
Thus showing The selected JRE is defective error message.

As Bill pointed out.
Bill:
Which "Visual C++" did you install? There are several different versions currently available. Only one will work.
OpenOffice installs the MS C++ 2008 Redistributable version (msvcr90.dll) by default which needs a Java v1.6 JRE to interact.
Java v1.6 JRE installs the msvcr90.dll in it's \Java\bin and \Java\bin\plugin2 folder.

Hope this helps.
Last edited by Greengiant224 on Sat Apr 20, 2013 12:22 am, edited 1 time in total.

Win 7, Portable AOO 4.1.14, LibreOffice 6.2, 7.4.5 & 7.6.1 (Java 1.7.81 & 1.8.0_281) utilising HSQL 1.8.10 & 2.4.*, MySQL, PostgreSQL, SQLite
+ Blood, Sweat and Tears (Application, Determination and Perseverance)
MikeRivers
Posts: 4
Joined: Thu Apr 18, 2013 7:15 pm

Re: Selected JRE is defective

Post by MikeRivers »

Greengiant224 wrote:
Java v 1.7 JRE uses the msvcr100.dll, it is installed by default in the C:\Program Files\Java\bin folder.
There is also a copy in the C:\Program Files\Java\bin\plugin2 folder.
Check. There's a copy of msvcr100.dll in both of those folders. However, when I searched for msvcr*.dll, there's a truckload of them, msvcr70, 71, 80, and 90 in addition to a few copies here and there of 100. I didn't consciously install MSC++ so it must have arrived with some other program or programs, in whatever version was bundled with those programs. From the locations, I can see that they are installed in folders with Adobe Audition, Pro Tools, and Open Office, as well as Windows\system32.

However, the System32 folder only had msvcr70.dll and msvcr71.dll, not msvcr100.dll. So on a lark, I put a copy of 100 in the System32 folder, and voila! I didn't ring out Open Office completely, but I no longer got the error message when I tried to search the Help index, and I even found what I was looking for. So I guess what I had was not an Open Office problem, but a Java problem (as you were leading to). Odd that Open Office was able to locate Java, but Java wasn't able to locate the file that it needed to run even though it was in a Java folder and apparently installed when I installed Java.

Oh, well.
By installing the MS Visual Basic C++ Redistributable 2010 (x86) file, a copy of:
msvcr100.dll and msvcr100_clr0400.dll is installed to the C:Windows\System32 folder.
Windows automatically registers these .dll files for use by the OS.
Well, I guess it didn't get there naturally since I never (knowingly) installed MS Visual Basic C++ Redistributable 2010. Is just placing a copy of the .dll in the System32 folder sufficient, or must I do something else to register it there?

I'll try a few other things before I consider this "solved" but I think I'm nearly there.

Thanks for the clues.
OpenOffice3.4.1_Windows7/32-bit
User avatar
Greengiant224
Posts: 284
Joined: Wed Jun 09, 2010 3:50 pm
Location: All Over The World

Re: Selected JRE is defective

Post by Greengiant224 »

MikeRivers;
There's a copy of msvcr100.dll in both of those folders. However, when I searched for msvcr*.dll, there's a truckload of them, msvcr70, 71, 80, and 90 in addition to a few copies here and there of 100. I didn't consciously install MSC++ so it must have arrived with some other program or programs, in whatever version was bundled with those programs. From the locations, I can see that they are installed in folders with Adobe Audition, Pro Tools, and Open Office, as well as Windows\system32.
Yes, they are installed with the respective packages. To enable them to interact with the OS
Here is a list of version numbers and respective packages I gleaned from my Win7 x64 Lappy.

msvcr70.dll (v7) MS Visual Studio.NET
msvcr80.dll (v8) MS Visual C++ 2005
msvcr90.dll (v9) MS Visual C++ 2008
msvcr100.dll (v10) MS Visual C++ 2010

Well, I guess it didn't get there naturally since I never (knowingly) installed MS Visual Basic C++ Redistributable 2010. Is just placing a copy of the .dll in the System32 folder sufficient, or must I do something else to register it there?
I did not think for one minute that you would attempt to copy and paste these files to try.
It appears that copying these respective .dll files to the windows folder works.
You can register the .dll files using the command prompt try:
http://support.microsoft.com/kb/249873#method1

If it fails you can install the MS Visual C++ Redistributable 2010 (x86) file which should 'overwrite' the copied versions.

Could you also try Open Office>>File>>Letter Wizards using this is Java specific also.

good luck

Greengiant224

PS I see you use ProTools! ! !. Very good program. I still dabble with midi, currently working on
a midi/text editor with simple gui

Win 7, Portable AOO 4.1.14, LibreOffice 6.2, 7.4.5 & 7.6.1 (Java 1.7.81 & 1.8.0_281) utilising HSQL 1.8.10 & 2.4.*, MySQL, PostgreSQL, SQLite
+ Blood, Sweat and Tears (Application, Determination and Perseverance)
janmberan
Posts: 1
Joined: Sat Apr 20, 2013 10:01 pm

Re: Selected JRE is defective

Post by janmberan »

I had this same problem on Vista, glad I checked the forum because the copy&paste worked for me as well. However, it is not registering using the Regsvr 32 application. It can't find the entry point.
OpenOffice 3.4.1 on Windows Vista
User avatar
Greengiant224
Posts: 284
Joined: Wed Jun 09, 2010 3:50 pm
Location: All Over The World

Re: Selected JRE is defective

Post by Greengiant224 »

janmberan welcome to the forum.
You asked:
I had this same problem on Vista, glad I checked the forum because the copy&paste worked for me as well. However, it is not registering using the Regsvr 32 application. It can't find the entry point.
You might need to be logged in as an administrator to use the regsvr32.exe, it has been a long time since I used it to
register a dynamic link library (*.dll) file.

You could try this as a workaround.
Shutdown OpenOffice and exit the Quickstarter if enabled.

1. Remove the msvcr100.dll from the C:\Windows\System32\ folder and place it on your desktop.

2. Open C:\Program Files\OpenOffice.org 3\program\ and place the msvcr100.dll alongside the msvcr90.dll

3. Close Windows explorer, and re-boot as necessary.

4. Fire up OpenOffice and see if Java v1.7.* is now/still recognized.

5. Try the OpenOffice Help file or File >>Wizards>>Letter (both are Java dependant)

I am confident that this will work, although having never tried it myself. :bravo:

Good luck

Greengiant224

Win 7, Portable AOO 4.1.14, LibreOffice 6.2, 7.4.5 & 7.6.1 (Java 1.7.81 & 1.8.0_281) utilising HSQL 1.8.10 & 2.4.*, MySQL, PostgreSQL, SQLite
+ Blood, Sweat and Tears (Application, Determination and Perseverance)
MikeRivers
Posts: 4
Joined: Thu Apr 18, 2013 7:15 pm

Re: Selected JRE is defective

Post by MikeRivers »

Greengiant224 wrote:

I did not think for one minute that you would attempt to copy and paste these files to try.
It appears that copying these respective .dll files to the windows folder works.
I believe that Windows has the equivalent (or exactly) a "path" statement built in that points to the \windows\system32 folder (and perhaps a couple of others) to look for a file that a program can't find where it thinks that it should be. I've made things work before by copying a missing .dll file to the system32 folder, though this was my first try with Win7.
OpenOffice3.4.1_Windows7/32-bit
digdoug78
Posts: 16
Joined: Wed Apr 24, 2013 6:08 am

Re: Selected JRE is defective

Post by digdoug78 »

RE: JRE not found error
Could you summarize the solution?
Should I remove the plethora of Visual Basic versions that are not the prescribed version? Will that cause other programs not to work?
Why doesn't OO install itself properly?
Seems like a lot of work to send a letter.
openoffice 3.1.0 on windows 7
User avatar
RoryOF
Moderator
Posts: 35055
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Selected JRE is defective

Post by RoryOF »

In OpenOffice there are usually several solutions to problems. My solution for the Java problem, which was caused by Java changing the entry points in newer versions, is to advise troubled Users to download and install a 32 bit Java (OpenOffice, being a 32 bit application, needs a 32 bit Jave, even if running on a 64 bit OS).

You will find a 32 bit Java at
http://download.oracle.com/otn/java/jdk ... s-i586.exe
Install this.
Start OpenOffice.
Go to /Tools /Options /OpenOffice.org Java and select this new Java.
Press OK.

All should now be well.

If you only wish to write letters, AbiWord may be a more suitable application to use.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: Selected JRE is defective

Post by Bill »

digdoug78 wrote:RE: JRE not found error
Could you summarize the solution?
Should I remove the plethora of Visual Basic versions that are not the prescribed version?
Only if you are willing and able to deal with any unforseen consequences.
digdoug78 wrote:Will that cause other programs not to work?
Maybe. Only you can analyze the requirements of the programs installed on your system
digdoug78 wrote:Why doesn't OO install itself properly?
Seems like a lot of work to send a letter.
AOO does install itself properly. JRE is not part of AOO.
AOO 4.1.14 on Ubuntu MATE 22.04
digdoug78
Posts: 16
Joined: Wed Apr 24, 2013 6:08 am

Re: Selected JRE is defective

Post by digdoug78 »

Thanks.
Guess I'll move on as this is way too complicated.
Hope y'all have fun with OO.
openoffice 3.1.0 on windows 7
User avatar
Hagar Delest
Moderator
Posts: 33346
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Selected JRE is defective

Post by Hagar Delest »

For the record, problem solved for digdoug78: [Solved] Selected JRE is defective message.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
digdoug78
Posts: 16
Joined: Wed Apr 24, 2013 6:08 am

Re: Selected JRE is defective

Post by digdoug78 »

oops, it did it again!
Where did my functioning JRE go?
I can't use wizards or data bases without it.
It was working and now it doesn't.
I don't remember how I solved it last time.
Is this going to be a chronic issue?
openoffice 3.1.0 on windows 7
thomasjk
Volunteer
Posts: 4452
Joined: Tue Dec 25, 2007 4:52 pm
Location: North Carolina

Re: Selected JRE is defective

Post by thomasjk »

Tom K.
Windows 11 23H2
LibreOffice
User avatar
RoryOF
Moderator
Posts: 35055
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Selected JRE is defective

Post by RoryOF »

It may be that your computer is set to silently update Java versions, and that this has happened transparently to you. Whatever is happening is probably caused by some setting on your computer.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
digdoug78
Posts: 16
Joined: Wed Apr 24, 2013 6:08 am

Re: Selected JRE is defective

Post by digdoug78 »

so how do I "fix" it?
When I go to Tools>>Options>>Java
there appears to be no jre installed.
When I try to Add, it is not found.
When I search my computer, it is found.
Do I have to download Java again?
How often will I have to do this?
openoffice 3.1.0 on windows 7
thomasjk
Volunteer
Posts: 4452
Joined: Tue Dec 25, 2007 4:52 pm
Location: North Carolina

Re: Selected JRE is defective

Post by thomasjk »

Uninstall Java and download and install a fresh copy.
Tom K.
Windows 11 23H2
LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 33346
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Selected JRE is defective

Post by Hagar Delest »

Is your java a 32bit version?
AOO does not see the 64bit version.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
Post Reply