Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6084241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:29:53+00:00 2026-05-23T11:29:53+00:00

I have a project in Eclipse and a problem with a groovy script therein.

  • 0

I have a project in Eclipse and a problem with a groovy script therein.

In the script I need to import some classes from a different package in the project. I can import things like groovy.sql.Sql or java.sql.ResultSet just fine.

However, when I try to import classes from the project, I get an “Unable to resolve class …” exception on each import. All java classes can do any imports with no problems. Why won’t it recognize things added to the build class in eclipse?

Anyone know how I can get this to work? Not sure if it matters but I have the most up-to-date version of the groovy-eclipse plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:29:54+00:00Added an answer on May 23, 2026 at 11:29 am

    Its not as simple as the Groovy classes your are trying to import are not among the project’s Source folders, is it?

    I do this all the time without issue. As long as all the source folders are in the project, “Run As Groovy Script” and “Run as Groovy Console” work like a champ.

    import org.rekdev.util.*
    println "Hello.  It is ${new Date().format('yyyy-MM-dd hh:mm:ss zzz')}"
    // this guy is in src/org/rekdev/util/Hello.java
    def hello = new Hello("Bob")
    println "$hello"
    // this guy is in src/org/rekdev/util/World.groovy
    def world = new World("Earth")
    println "$world"
    // this guy is in src/NoPackage.groovy
    def nopkg = new NoPackage()
    println "$nopkg"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project in Eclipse with maybe 7 different classes that i open
I have serious problem, I have deleted Java project from Eclipse and I don't
I have a project in Eclipse. When I run it from inside Eclipse, everything
I have checked in a huge Eclipse project from my desktop computer to the
I have a project in Eclipse, that inculdes some files with data(not in classpath),
I have a Maven project in Eclipse that successfully reaches the package goal. In
I have a problem when I'm trying to export my project in eclipse. While
I have a C++ project on eclipse which compiles and runs fine from eclipse,
I have an Eclipse project. All testcases are in one *.cpp file. The problem
I have a Java project in Eclipse and version-control is a mercurial repo. From

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.