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 7509251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:51:00+00:00 2026-05-29T22:51:00+00:00

When running groovyc in a Windows env, I am running into issues due to

  • 0

When running groovyc in a Windows env, I am running into issues due to the length of the classpath, in my situation. I would like to work around this by creating a pathing jar, and then put that jar on the cp. How can I create a pathing jar w/ all of the classpath entries specified automatically in gradle and then add that jar to the cp?

  • 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-29T22:51:01+00:00Added an answer on May 29, 2026 at 10:51 pm

    I finally got the “pathing jar” idea to work. I consider this to be a permanent workaround. This could be considered a solution if it is made part of gradle itself.

    The original pathing jar code was provided by Peter, but it didn’t work. The problem: classpath elements referenced in the pathing jar must be relative to the location of the pathing jar. So, this appears to work for me.

    task pathingJar(type: Jar , dependsOn: 'cleanPathingJar') {
    /**
     * If the gradle_user_home env var has been set to 
         * C:\ on a Win7 machine, we may not have permission to write the jar to
     * this directory, so we will write it to the caches subdir instead.  
         * This assumes a caches subdir containing the jars
     * will always exist.
     */
    gradleUserHome = new File(gradle.getGradleUserHomeDir(), "caches")
    
    relativeClasspathEntries = configurations.compile.files.collect {
        new File(gradleUserHome.getAbsolutePath()).toURI().
                      relativize(new File(it.getAbsolutePath()).toURI()).getPath()
    }
    appendix = "pathing"
    destinationDir = gradleUserHome
    doFirst {
        manifest {
            attributes "Class-Path": relativeClasspathEntries.join(" ")
        }
    }
    }
    
    compileGroovy {
        dependsOn(pathingJar)
        classpath = files(pathingJar.archivePath)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running a ServiceHost with a single contract is working fine like this: servicehost =
Running into a problem where on certain servers we get an error that the
Running FxCop on my code, I get this warning: Microsoft.Maintainability : 'FooBar.ctor is coupled
Running ipconfig /all shows a Teredo Tunneling Pseudo-Interface. What is that? Does this have
Running IIS5 (yes, really). I'd like to remove the eTag http header that IIS
Running into a problem. I have a table defined to hold the values of
I'm new to Java and Groovy and am running into trouble with the following
All of my tests for my Groovy code look like this public void testButtons()
I'd like to add groovy-shell-server to our application. We have run into a couple
I am running into an extremely strange behavior in Groovy. When I throw an

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.