I think .sh files are not really executables. Instead, they require a prorgam to run them (usually /bin/sh); you specify this executable as the first line ("!#/bin/sh", "!#/bin/bash", "!#/usr/bin/python", etc). Try changing your command to "sh date.sh" and see if that works.
My question was from JSP I'm trying to run 2 things 1is a sh file and 2nd is a batch file.
I'm not able to get it done in JSP.
Is someone know how should i proceed.
if windows run batch and if unix run sh.
can some one put some light how should i code it.
Since the code snippet you've posted is out of a JSP page, I'm not exactly clear as to which platform you are refering to : the server platform [where the webapp is running], or the client platform [from where the client is accessing this weapp].
Anyhow, the generic solution is to identify the OS type, and fire your commands accordingly. Java has certain system level properties set, and one among them is the "os.name" property. So what you can do is:
I made what you have suggested I am a Fedora 9 user and my module name is like myadmin I am putting the date.sh file inside that
seems not working or not also throwing any errors. I f i run through shell its sh file is working.