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

  • SEARCH
  • Home
  • 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 8721285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:11:47+00:00 2026-06-13T07:11:47+00:00

Sbt always does full rebuild because of modified binary dependency: rt.jar: [debug] [debug] Initial

  • 0

Sbt always does full rebuild because of modified binary dependency: rt.jar:

[debug] 
[debug] Initial source changes: 
[debug]     removed:Set()
[debug]     added: Set()
[debug]     modified: Set()
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set(C:\Program Files\Java\jdk1.6.0_37\jre\lib\rt.jar)
[debug] Initial directly invalidated sources: Set()

Obviously, rt.jar wasn’t changed, its created/accesses/modified dates are the same and quite old.

It’s in c:\Program Files\Java\jdk1.6.0_37\jre\lib\

JAVA_HOME is set as C:\Progra~1\Java\jdk1.6.0_37

JAVA_HOME/bin is in PATH.

Any ideas why sbt thinks rt.jar was changed?

  • 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-06-13T07:11:48+00:00Added an answer on June 13, 2026 at 7:11 am

    I had JAVA_HOME set to C:\Progra~1\Java\jdk1.6.0_37 and sbt resolved the dependency as C:\Program Files\Java\jdk1.6.0_37\jre\lib\rt.jar. Sbt uses java.io.File.equals() which is not correct in this case:

    In sbt/compile/inc/Incremental.scala:

    def externalBinaryModified(entry: String => Option[File], analysis: File => Option[Analysis], previous: Stamps, current: ReadStamps)(implicit equivS: Equiv[Stamp]): File => Boolean =
        dependsOn =>
            analysis(dependsOn).isEmpty &&
            orTrue(
                for {
                    name <- previous.className(dependsOn)
                    _ = println("Name: " + name)
                    e <- entry(name)
                    _ = println("entry: " + e)
                } yield {
                    val resolved = Locate.resolve(e, name)
                    println("resolved: " + resolved)
                    println("dependsOn: " + dependsOn)
                    println("resolved != dependsOn: " + (resolved != dependsOn))
                    (resolved != dependsOn) || !equivS.equiv(previous.binary(dependsOn), current.binary(resolved))
                }
            )
    

    gives the following output:

    Name: java.lang.Object
    entry: c:\Progra~1\Java\jdk1.6.0_37\jre\lib\rt.jar
    resolved: c:\Progra~1\Java\jdk1.6.0_37\jre\lib\rt.jar
    dependsOn: c:\Program Files\Java\jdk1.6.0_37\jre\lib\rt.jar
    resolved != dependsOn: true
    

    Thus, sbt always thinks rt.jar was changed.

    Workaround would be setting JAVA_HOME to “c:\Program Files\Java\jdk1.6.0_37”
    Solution would be to do:

    resolved.getCanonicalPath != dependsOn.getCanonicalPath
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My scala/sbt project uses grizzled-slf4j and logback. A third-party dependency uses Apache Commons Logging.
I have a build.sbt file in my project root.. all my source files live
I observed SBT compiles all source files everytime when I issue the compile task,
I read somewhere that all arguments for sbt: java -jar /home/robert/.conscript/sbt-launch.jar arg1 arg2 ..
I have an sbt plugin, that needs to get compiler AST's from source files.
Does SBT make use of fsc? For test purposes I am compiling a 500-line
SBT has a nice hook which allows you to execute arbitrary code after all
For SBT 0.7 there is https://github.com/weiglewilczek/bnd4sbt , but what to do for SBT 0.10
I am using SBT as a build manager, and Eclipse as my IDE, or
I have an SBT project with multiple subprojects. One of the subprojects have tests

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.