Are you trying to launch a java application from an NSH? If so, I would create a script to set your CLASSPATH and execute your java code. You'd just call this script via nexec. Obviously your java code would have to run non-graphically.
eg... from an NSH run the following:
% cd //myhost/c/temp
% echo 'set CLASSPATH="%CLASSPATH%;C:\Program Files\myjavaCode"
cd /d "C:\Program Files\myjavaCode"
java MyJavaCode' > C:\temp\myjava.bat
% nexec -e myjava.bat
While running a nsh job against application server forfollowing BLCLI commands we are getting an error
"Error 23.5.2012 8:59:58 Failed to open D:/Program Files/BMCSoftware/BladeLogic/8.1/NSH/jre-32/bin/server/jvm.dll: No such file ordirectory"
Although jvm.dll exist on application server on mentioned location. And following commands run when are executed manually on appserver's nsh prompt.
blcli_setoption serviceProfileName Production
blcli_setoption roleName RBACAdmins
blcli_execute RBACRole syncUsersWindowsServerAdministrators
So I need to update the PATH env variable current path is
/cygdrive/D/Program Files/BMC Software/BladeLogic/8.1/NSH/bin:/cygdrive/D/Program Files/BMC Software/BladeLogic/8.1/NSH/sbin:/cygdrive/c/Program Files/HP/NCU:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/:/cygdrive/c/PROGRA~1/BMCSOF~1/Patrol3/bin:/usr/bin:/jre-32/bin
OK I got the solution by myself...
I just replaced following values in my env variable,
replace D:\Program Files\BMC Software\BladeLogic\8.1\NSH\jre-32\bin
"/cygdrive/D/Program Files/BMC Software/BladeLogic/8.1/NSH/jre-32/bin"
Thanks & Regards