Apr 2, 2014

f Comment

[SOLVED] Fixing Error Dialog: Cannot Find Java SE Runtime Environment Error!

Amazon If you use Interactive Broker's Trader Workstation and you see an error dialog saying Error: could not find Java SE Runtime Environment when you run the TWS Windows shortcut you are in the right place. This article will walk you through fixing this error.

The error dialog looks like the following:

Windows error dialog: could not find Java SE Runtime Environment

Even though this article is related to IB's TWS Java program it may help you fix the same error that occurs when you run a different Java software application.

Cause of the problem

First of all TWS is a software application written in the Java programming language. It needs the Java runtime environment in order to run.

Right click on the TWS Windows shortcut to examine the actual shortcut. It should be something like this:

C:\Windows\System32\javaw.exe -cp jts.jar;total.2012.jar -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx1024M -XX:MaxPermSize=256M jclient/LoginFrame C:\Jts

When you finish installing TWS on your Windows platform, a Windows shortcut is created automatically which points to C:\Windows\System32\javaw.exe. javaw.exe is the Java runtime environment executable. However if C:\Windows\System32\javaw.exe is incompatible with your computer hardware or with TWS program, you will see this error dialog.

Therefore, the root cause of the problem where system cannot find Java runtime environment is that the installed Java runtime environment is incompatible with your system hardware or with the Java program.

Solution

To fix the error that Windows cannot find Java SE runtime environment, simply download and install the latest JRE from the internet. Once you finish installing JRE on your Windows system, you should see the JRE files in C:\Program Files (x86)\Java.

In my situation I have both jre6 and jre7 folder. Let's go to jre7 -> bin and I see javaw.exe. The complete path to javaw.exe is:

C:\Program Files (x86)\Java\jre7\bin\javaw.exe

I copy it to C:\Windows\System32\ to replace the old javaw.exe and run the TWS shortcut again. And it works!

If you don't know which version of JRE to download, download several of them, and try each one.

Questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
ADVERTISING WITH US - Direct your advertising requests to Michael