core/carbide_releases/run.jstack.bat
author Steve Sobek <steve.sobek@nokia.com>
Tue, 19 Oct 2010 07:21:52 -0500
changeset 2161 5dce04793589
parent 696 3edbbd22908c
permissions -rw-r--r--
Update to 3.1 and Java 1.6.0_20

echo off

rem This is a utility batch file to get stack information from the Carbide.c++.3.1.exe process.
rem In order to run it successfully, you will need to have a full JDK installed of version 1.6 or higher.
rem See http://java.sun.com/javase/downloads/index.jsp for download information.
rem If the Carbide process is found (and only one should be running) then stack information will be found in %OUTFILE%.


echo Executing jstack on Carbide.c++.exe...

set  JSTACK=C:\APPS\jdk_1.6.0_20\bin\jstack.exe
set  OUTFILE=.\stack.txt

if not exist %JSTACK% echo ERROR: jstack.exe cannot be found at %JSTACK%. jstack is provided under JDK 1.6 and higher, but is not distributed with Carbide. Please find the location of jstack and update the JSTACK variable in this batch file.  

if not exist %JSTACK% GOTO END


del %OUTFILE%

rem echo Carbide.c++.3.1.exe >  %outfile%

echo
echo Searching for Carbide.c++ process...

FOR /F "tokens=2" %%i IN ('tasklist /FI "IMAGENAME eq  Carbide.c++.3.1.exe"
/NH') DO @%JSTACK% %%i >  %OUTFILE%


echo
if exist %OUTFILE% echo Check for results in %OUTFILE%
if not exist %OUTFILE% echo ERROR: Results not written. Is Carbide.c++.3.1.exe running?

:END

pause