Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using jsDoc to create documentations for my JavaScript files. The command I use is

> java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js

What I want is to create a batch or something else (I really don't know), so that I can type

> jsdoc mycode.js

Without having to specify any folders or change my working directory in the command line.

Is this possible? How?


share|improve this question
up vote 1 down vote accepted

Make a batch file called "jsdoc.bat" and ensure that you have a path you your jsdoc folder / app folder (or code the full locations in). Ensure there is a path to wherever you put this file

set path = c:\whereverthebatfileis\
The following would be the code.

java -jar jsrun.jar  c:\whateverfolder\app\run.js -a -t=c:\whateverfolder\templates\jsdoc\ %1

Usage would be:

jsdoc myfile.js

share|improve this answer
can you specify where shall I put "set path = c:\doc_js"?? – Omar Abid Mar 20 '11 at 2:21
Either type it in the command line, or set a path in your enviornment variables (right click your computer and go to properties, click advanced system settings, it will be at the bottom). Find "PATH" in your system variables and add the location to the list. It should be permanant either way. – iivel Mar 20 '11 at 2:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .