I realize that using anything Javascript through dss.bat is not officially supported anymore, but I was hoping someone might be able to help anyway.
I made a small barebones class called 'JavaTest' that opens a scripting environment, opens a CCS session, waits a while for the IDE to come up, then opens a debug session and does stuff. I have it running well in CCS v4, but not in CCS v5.
I placed the JavaTest.class and a script to run it with in the scripting/bin directory (same as dss.bat). Here are the contents of the script:
setlocal ENABLEDELAYEDEXPANSION
set DEBUGSERVER=%~dp0..\..\DebugServer
set JAVA_HOME=!DEBUGSERVER!\..\eclipse\jre
set PATH=!DEBUGSERVER!\..\eclipse\jre\bin;!PATH!
REM Path to necessary binaries
set PATH=!DEBUGSERVER!\..\..\eclipse\plugins\com.ti.dvt.ofssymbolmanager_1.0.0;!PATH!
set PATH=!DEBUGSERVER!\..\..\eclipse\plugins\com.ti.dvt.tidisassembly_1.0.0\os\win32;!PATH!
set PATH=!DEBUGSERVER!\..\common\bin;!PATH!
REM add path to Windows 32-bit on Windows 64-bit (WOW64) folder for 64bit Windows to use the 32bit applications.
if exist "!SYSTEMROOT!\SysWOW64\" set PATH=!SYSTEMROOT!\SysWOW64\;!PATH!
java.exe -version
java.exe -Dxpcom.bridge.executeOnDedicatedThread=no -Dorg.eclipse.swt.browser.XULRunnerPath="!DEBUGSERVER!\bin\win32" -DXPCOM.RUNTIME="!DEBUGSERVER!\bin" -classpath ".;!DEBUGSERVER!\packages\ti\dss\java\dss.jar;!DEBUGSERVER!\..\dvt\scripting\dvt_scripting.jar;!DEBUGSERVER!\..\..\eclipse\plugins\*" JavaTest
I include all of eclipse plugins in the classpath to get the equinox launcher and ccstudio apps jars.
Currently the script fails with :
WARNING: CCSServer.openSession() failed. DSS was unable to launch Code Composer Studio, however script execution will continue. java.lang.reflect.InvocationTargetException: null
The same problem occurs with a javascript test using dss.bat if the eclipse\plugins classpath is added and "the old way of launching the script" is used (place a goto LAUNCH_DSS_SCRIPT near the beginning). The dss.bat script only works when it uses eclipsec.exe to launch eclipse rather than starting from java. Is there anything I am missing to make starting from java like starting from eclipsec.exe?