This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
My rhino debugger isn't finding a custom java class I have created. I set the CLASSPATH environment variable in the dss.sh script to:
CLASSPATH=/cygdrive/c/ti/ccsv6/ccs_base/scripting/bin/../../DebugServer/../dvt/scripting/dvt_scripting.jar:/cygdrive/c/ti/ccsv6/ccs_base/scripting/bin/../../DebugServer/packages/ti/dss/java/dss.jar:/cygdrive/c/ti/ccsv6/ccs_base/scripting/bin/../../DebugServer/packages/ti/dss/java/js.jar::/cygdrive/c/SWIG:/cygdrive/c/SWIG/DAQ:.
The last part is pointing to my daq class. When I run the following javascript code:
var oldPath = java.lang.System.getProperty("java.class.path");
print(oldPath);
importClass(Packages.daq);
I get:
C:\ti\ccsv6\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
s: "../Artifacts/10-20-01/MultiChannelTimer.js", line 195: Function importClass must be called with a class; had "[JavaPackage daq]" instead.
js: "../Artifacts/10-20-01/MultiChannelTimer.js", line 195: org.mozilla.javascript.EvaluatorException: Function importClass must be called with a class; had "[JavaPackage daq]" instead. (../Artifacts/10-20-01/MultiChannelTimer.js#195)
I don't think the rhino debuger/eclipse environment is using my CLASSPATH values at the time it started up.
I figured out the problem. As I thought, the java script importClass() failed because it didn't have the proper path.
Just changing the CLASSPATH environment variable didn't solve the problem. The solution was from this page: e2e.ti.com/.../427002
Option 1 of the comment worked but not option 2. The options were:
You have two options:
1) add -dev <Path>\external.jar to whatever script that execute eclipsec.exe. i.e "eclipsec.exe -dev c:\temp\my.jar", use comma to separate the jar files.
2) drop your jars into the jre runtime under <installpath>\ccsv6\eclipse\jre\lib\ext
For my specific invocation I added the -dev option to the ccstudio command. It looked like:
$DEBUGSERVER_ROOT/../../eclipse/ccstudio -dev `cygpath -w /cygdrive/c/xPG_UnitTest/SWIG/DAQ` -nosplash -application com.ti.ccstudio.apps.runScript -product com.ti.ccstudio.branding.product -dss.debug -dss.rhinoArgs $*