Skip to content

can't import other package #219

@HH904789360

Description

@HH904789360

Help!
I want to compile some java code which is String format,like this

"import java.util.*;\n"+
"import xxxx.GsonUtils;\n"+
"\n" +
 "public class Script {\n" +
 "%s"+
 "}"

but I found when icompiler compile this code ,"java.util.*" is ok,but the second line GsonUtils which is a class in my own project,can't find this class when I call this :" compiler.compile()" method. Actually,it can run in my own pc, but when this code deploy on a production server , " compiler.compile()" method will throw exception ,can't find this class.

what can i do ! help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions