开发者

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

开发者 https://www.devze.com 2023-01-01 14:39 出处:网络
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.

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

im开发者_StackOverflowport 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


Ops, I fixed it by importing all the jar files manually and by putting jacob-1.14.3-x86.dll in the project folder.

0

精彩评论

暂无评论...
验证码 换一张
取 消