[Javascript] Determine operating system in javascript

Peter Brunone peter at brunone.com
Tue Jan 11 14:51:46 CST 2005


   I don't know for sure, but that sounds like a question for the Rhino docs.

From: visitus 04 visitus_04 at yahoo.com

 Peter,   I am running scripts from DOS command prompt on Windows platform. I am using a JS engine called Rhino from mozilla that provides a javascript shell.   Is there a way to fetch environment variables from within the script?   Thanks.

Peter Brunone <peter at brunone.com> wrote:         I don't know of anything Javascript-specific for this.  It usually depends on the environment where you are running the scripts; with most server platforms, there are environment variables that give you this kind of thing.  Are you running this on a web server, and if so (or even if not) what layer/application is the javascript running in?       -----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of visitus 04

  It is the operating system of server. Javascript also runs on the server machine. Is there something like a sytem comman that can get OS name.   Thanks

Peter Brunone <peter at brunone.com> wrote:         The operating system of what?  The client, or the server?         If the client, then this will greatly depend on what type of client software is calling your application.  If the server, then your server environment will determine how you proceed.         -----Original Message-----
From: javascript-bounces at LaTech.edu On Behalf Of visitus 04

  I am using javascript for a server side application (no browser involved). How can I check the type of operating system i.e. windows or unix flavor?    Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050111/d444a6dc/attachment.htm>


More information about the Javascript mailing list