Friday, February 5, 2016

psw-ce- pentaho workbench - java is not recognized as internal or external command

Upon running the psw-ce- pentaho workbench the black command briefly popped a while and then disappear. In order to view what's the error you must use the command prompt and directly navigate to the directly where the workbench is extracted and run the workbench.bat file

For example in this case I have extracted the workbench schema ps-ce- in my desktop. So i run the command prompt in Windows by click Start>>Search>>Type CMD and press ENTER on the keyboard. Once it is in command prompt usually the position of the folder is something like C:\Users\PC USER 1 (Note: for different computer might be different directory).

Since we know the directory location of the workbench is in desktop and the name is psw-ce-\schema-workbench so i just type the following command to change the directory location to that file.

cd psw-ce-\schema-workbench and press "ENTER" on the keyboard. Now the directory will change to C:\Users\PC USER 1\Desktop\psw-ce-\schema-workbench>workbench in the command prompt.

In this directory C:\Users\PC USER 1\Desktop\psw-ce-\schema-workbench>workbench. You can run the "workbench.bat" file by typing workbench or workbench.bat and the error message below appear.

C:\Users\PC USER 1\Desktop\psw-ce-\schema-workbench>workbench
WARNING: Using java from path
'"java"' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\PC USER 1\Desktop\psw-ce-\schema-workbench>

How to solve this problem

1. Download Java Environment from Oracle Downloads make sure to download the correct version i am using Windows 10 (32 bits) so download the Windows X86 version

2. Once download and install the Java - In this case I've installed in C:\Program Files directory

3. Once installed go to the Pentaho psw-ce-\schema-workbench folder and edit the workbench.bat using notepad++

4. Look for this section
for %%i in ("plugins\*.jar") do call cpappend %%i

set PENTAHO_JAVA=java.exe
call "%~dp0set-pentaho-env.bat"

"%_PENTAHO_JAVA%" -Xms1024m -Xmx2048m -cp "%CP%" -Dlog4j.configuration=file:///%ROOT%\.schemaWorkbench\log4j.xml mondrian.gui.Workbench

rem End workbench.bat

5. Change the java.exe with the installed java including its directory location so that it reads like so set PENTAHO_JAVA=C:\Program Files\Java\jre1.8.0_73\bin\java.exe

6. Save the file and run the workbench.bat again - it should be working

No comments:

Post a Comment

Adjustable DC to DC step up voltage booster using LM2577 -Adj P+ chip

One simple circuit to step up voltage using LM2577 -Adj P+ chip. The schematic is from Texas Instrument and it works expected - and below is...