How to import org.codehaus.groovy.scriptom.* on Groovy?

Posted by Mulone on Stack Overflow See other posts from Stack Overflow or by Mulone
Published on 2010-05-28T11:19:23Z Indexed on 2010/05/28 11:21 UTC
Read the original article Hit count: 325

Filed under:
|

Hi guys, I'm trying to run a Groovy app to manipulate Excel files on STS (by SpringSource) 2.3.0.

My Groovy version is 1.7.

Class:

package com.mytool

import org.codehaus.groovy.scriptom.ActiveXObject


/**
 * @author Mulone
 *
 */
class SurveyTool {

    static main(args) {
        print 'test'
        def wshell = new ActiveXObject('Wscript.Shell')
        wshell.popup("Scriptom is Groovy")
    }

}

Sadly, this is what I get:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\workspace\SurveyTool\src\com\geoadapta\surveytool\SurveyTool.groovy: 6: unable to resolve class org.codehaus.groovy.scriptom.ActiveXObject
 @ line 6, column 1.
   import org.codehaus.groovy.scriptom.ActiveXObject
   ^

1 error

I also tried to rename ActiveXObject to ActiveXProxy with the same result.

I tried to import scriptom manually from the package scriptom-all-assembly-1.6.0 but I didn't work. Any idea?

Cheers

© Stack Overflow or respective owner

Related posts about groovy

Related posts about scriptom