mil.dod.th.ose.shell/src/mil/dod/th/ose/shell/MissionProgramManagerCommands.java
@Descriptor("Execute a JavaScript")
    public void executeFile(@Descriptor("file containing script to execute")final File file) 
            throws ScriptException, IOException
    {
        final Reader reader = new FileReader(file);
        try
        {
            synchronized (m_ScriptEngine)
            {
                m_ScriptEngine.put(ScriptEngine.FILENAME, file.getPath());
                m_ScriptEngine.eval(reader);
            }
        }
        finally
        {
            reader.close();
        }
    }
/**
     * Execute a JavaScript from the given file.
     * 
     * @param file
     *      file containing script to execute
     * @throws ScriptException
     *      if the script fails in some way
     * @throws IOException
     *      if error occurs with given file
     */
Execute a JavaScript from the given file.

@param file
file containing script to execute
@throws ScriptException
if the script fails in some way
@throws IOException
if error occurs with given file
Execute a JavaScript from the given file . @param file file containing script to execute @throws ScriptException if the script fails in some way @throws IOException if error occurs with given file
@Descriptor("Execute a JavaScript")
    public void executeFile(@Descriptor("file containing script to execute")final File file) 
            throws ScriptException, IOException
    {
        final Reader reader = new FileReader(file);
        try
        {
            synchronized (m_ScriptEngine)
            {
                m_ScriptEngine.put(ScriptEngine.FILENAME, file.getPath());
                m_ScriptEngine.eval(reader);
            }
        }
        finally
        {
            reader.close();
        }
    }
@ Descriptor ( "Execute a JavaScript" ) public void executeFile ( @ Descriptor ( "file containing script to execute" ) final File file ) throws ScriptException , IOException { final Reader reader = new FileReader ( file ) ; try { synchronized ( m_ScriptEngine ) { m_ScriptEngine . put ( ScriptEngine . FILENAME , file . getPath ( ) ) ; m_ScriptEngine . eval ( reader ) ; } } finally { reader . close ( ) ; } }
Execute a JavaScript from the given file.
Execute a JavaScript from the given file .