Skip to content

Path too long #304

Closed
Closed

Description

@H-Lo

Just tried to install (unzip) latest STS 4.2.2 into my Windows 10 and got an error while extracting it to "Program files" directory. Please do not say to put it in a root because it's not the place to install apps.

The file is "ConfigurationMetadataRepositoryJsonBuilder.class" and it's not the only one.

The directory is
"sts-4.2.2.RELEASE\plugins\org.springframework.tooling.boot.ls_1.7.0.201905231938\servers\spring-boot-language-server\BOOT-INF\classes\org\springframework\ide\vscode\boot\configurationmetadata"

Is there any chance to make it Windows friendly app?

Thanks!

Activity

  1. BoykoAlex commented on Jun 2, 2019

    @BoykoAlex
    Contributor

    Here are the options to workaround Path too long problem on Win with STS4:

    1. Use 7zip to unzip the downloaded STS4 zip file
    2. Use JRE to unzip the downloaded STS4 zip file: jar xf spring-tool-suite-4-4.3.0.RELEASE-e4.12.0-win32.win32.x86_64.zip
    3. Edit Windows registry to enable long paths thus Windows standard zip archiver would work. See intructions below to edit the Windows registry:
    • Type RegEdit in the Win 10 search and open the RegEdit app
    • Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem in the tree (left pane)
    • Find LongPathsEnabled setting in the right pane (should be set 0 by default). Set it to '1' by right-clicking and then Modify
      Screen Shot 2019-06-02 at 10 23 45
      (Create the setting key-value pair if it's not there)
    • Restart your PC
  2. H-Lo commented on Jun 2, 2019

    @H-Lo
    Author

    @BoykoAlex Thank you very much for fast and useful answer!

  3. ergouser commented on Jul 2, 2019

    @ergouser

    I'm not sure why this issue was closed. Requiring a registry edit to install the software is not workable. In a corporate environment many users do not even have rights to edit the registry. The issue persists on 4.3 making it unusable to many.

  4. H-Lo commented on Jul 2, 2019

    @H-Lo
    Author

    I'm not sure why this issue was closed. Requiring a registry edit to install the software is not workable. In a corporate environment many users do not even have rights to edit the registry. The issue persists on 4.3 making it unusable to many.

    Definitely, but I'm too old to fight those fights about bugs called features :)

  5. BoykoAlex commented on Jul 2, 2019

    @BoykoAlex
    Contributor

    Maybe we should go back to fat JAR for LS rather than have exploded JAR... It'd fix this problem but would void some performance improvements done for the LS startup unfortunately..
    @martinlippert what do you think?

  6. ergouser commented on Jul 2, 2019

    @ergouser

    The performance is somewhat irrelevant if you can't install the application.

  7. kdvolder commented on Jul 2, 2019

    @kdvolder
    Member

    The performance is somewhat irrelevant if you can't install the application.

    That's a good point, but this only affects Windows users who can't edit their registry, and the performance affects everyone. So its not so clear whether that means we shoud just undo the performance optimisations.

  8. ergouser commented on Jul 3, 2019

    @ergouser

    I would suggest that most people, when they have an application that fails at the installation stage would just move on -STS 3 or to Eclipse (or IntelliJ). Assuming the user has the determination and desire to continue, you now have to search the web - it's not a difficult search, but, for me, it lead me only to this bug (well, the first hit was an irrelevant page of obsolete forum posts that didn't mention the issue). This issue is closed which normally means fixed not "read further for a workaround". It's filed against 4.2, 4.3 doesn't install, not my issue (because this is labelled as fixed). Move along. So now were down to the vanishingly small number of user who will read the regedit workaround and the small percentage of those who are willing and able to execute on that. I fell at the last hurdle.

  9. kdvolder commented on Jul 3, 2019

    @kdvolder
    Member

    normally means fixed

    Not necessarily, if something can't be fixed, tickets usually also get closed since there is very little point keeping tickets open. As the problem (Windows limitation) is somewhat beyond our control that is kind of the situation here.

    Now, we do understand that this is clearly very frustrating to you and other Windows users, so we should probably take another look if there's anything we can do (without throwing away the optimisation changes that seem to be running into this annoying limitation of Windows).

    Anyhow let's re-open this ticket for now and I'll bring this up for discussion tomorrow at team meeting.

  10. martinlippert commented on Jul 3, 2019

    @martinlippert
    Member

    First of all, the "path too long" problem is a long-standing and well-known issue on the windows operating system, especially when you unzip Java applications (but not alone Java apps). Having long or deeply nested package names makes it more likely to hit this issue, long bundle names in Eclipse installs can cause the same (even though less likely than exploded JARs with deeply nested package structures).

    Editing the windows registry to enable support for long path is indeed a bit crude in order to be able to install STS4, I totally agree (I wonder why that support isn't enabled in Windows by default though, but that is another story). But keep in mind that this problem happens only if you use the Windows built-in ZIP file support to unzip STS4.

    It works just fine (and a lot faster) if you use one of the many ZIP tools for Windows that are out there (for example 7-Zip), which I would recommend independent of this issue when you deal with ZIP files on Windows.

    In addition to that you can even use the jar tool of the JDK to unzip the STS4 distribution on your windows system via the command line: jar xf spring-tool-suite-4-4.3.0.RELEASE-e4.12.0-win32.win32.x86_64.zip. Something that every Java dev should have installed and ready-to-use.

    So yes, I think editing the registry is not the best option and the others should probably have been mentioned earlier here. But there are good and easy-to-use solutions available if you come across this issue - as described.

  11. ergouser commented on Jul 3, 2019

    @ergouser

    This is the first time I've come across this issue and this link with the RegEdit suggestion was the first suggestion I found searching - not the much cleaner suggestion to just use 7zip. If it's the case that it's just Window's zip then at a minimum it might be worth putting a note to that effect next to the Windows download button. A more forceful approach would be to provide it as, say, a 7z. If I recall correctly, 7zip will wrap zips (or 7z files) as self-extracting executables which would prevent the use of the default zip application.

  12. martinlippert commented on Jul 3, 2019

    @martinlippert
    Member

    @ergouser absolutely agree, we should at least be a lot better at communicating this important piece of the install process on Windows, absolutely. The self-extracting executable is an interesting suggestion indeed, thanks for that. We will take a look to see what is possible (additional questions may come along such as integration into the CI build, which runs on non-windows systems, licensing questions, etc.). But we will try to sort something out.

  13. BoykoAlex commented on Jul 3, 2019

    @BoykoAlex
    Contributor

    I have updated my comment at the very top with the win registry workaround with 7zip and Java archive extraction workarounds.

  14. abrarum commented on Oct 23, 2019

    @abrarum

    Issue still persists.

  15. martinlippert commented on Oct 23, 2019

    @martinlippert
    Member

    @abrarum Not sure what you exactly mean. We don't have a self-extracting installer yet, but the usage of 7Zip or jar should allow you to unzip the file correctly. What exactly doesn't work for you?

  16. abrarum commented on Oct 23, 2019

    @abrarum
  17. kdvolder commented on Oct 24, 2019

    @kdvolder
    Member

    @abrarum Interesting that you still have a 'path too long' error with 7zip. We were assuming that the problem would allways be avoided by using 7zip. The error is worrying since, although you may not notice this readily, missing classes will cause unpredictable / broken behavior (essentially some part of STS implementation is effectively missing from the installation).

    We are working on a self-extracting jar archive specially to address this issue for Windows users. Actually, we already have a self extracting archive available for nightly builds though it is not yet being published on the official/main STS download page for STS 4 release.

    I wonder if you want to try it out and let us know if the self-extracting jar works better (i.e. unpacks itself without showing any error popups).

    If you feel like trying go here: http://dist.springsource.com/snapshot/STS4/nightly-distributions.html

    Scroll down to the section SPRING TOOL SUITE 4 - BASED ON ECLIPSE 2019-09 RELEASE (4.13.0).

    There find the file that ends in win32.x86_64.self-extracting.jar. Copy the file to where you want to install STS and then double click it. It should unpack a copy of STS right next to the self-extracting jar. If you try it, please let us know how it goes.

  18. kdvolder commented on Oct 24, 2019

    @kdvolder
    Member

    Update: the self-extracting jar link is now also provided from STS main download page. So it is what people will get by default from now on. Let's hope it resolved the issue. We have tested this a bit ourselves, but it's hard to predict whether it will really work for everyone.

    Anyhow... I will close this ticket for now. If people still experience problems with the new packaging, please comment here and we can re-open the ticket... or raise a new ticket.

  19. added this to the 4.4.1.RELEASE milestone on Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions