Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3837 Installing from jedit5.1.0install.jar failure

normal bug
closed-fixed
Eric Le Lay
7
2013-12-27
2013-10-15
Edward Diener
No

On some Linux distros installing from the 5.1 jar file via 'java -jar jedit5.1.0install.jar' eventually fails when specifying that the jedit plugin and API documentation should be installed, whose checkbox is on by default. The failure puts out a message of:

""The installer could not create the destination directory. Maybe you
do not have write permission."

This will occur even when all three of the specified install paths ( for the installation, script, and man pages ) are within the installer's home folder and therefore the installer must have write permission to those directories. This must mean that the jedit plugin and API documentation is being erroneously installed in directories where the installer does not have write permission outside of the installer's home directory.

Related

Merge Requests: #196

Discussion

1 2 > >> (Page 1 of 2)
  • Alan Ezust
    Alan Ezust
    2013-10-15

    After testing the .jar file, I made the following observations.
    It choose the path /usr/local if the user can write to it. if that fails, it tries and chooses /usr/local/share (if the user has write permissions). Perhaps it checks a couple of other locations too before it finally defaults to ~/jEdit/5.1.0
    So your actual install location depends on the permissions the user happens to have at install-time.

    Same goes for the locations for shortcut and man pages - if the user has write permissions to /usr/local/ it goes there, if not, it tries a couple of other places.

    What were the paths it picked for the three locations (program, manpage, and startup script) for you?
    Do you have write permissions to /usr/local/ or /usr/local/share ?

     
  • Alan Ezust
    Alan Ezust
    2013-10-15

    Did you say you actually manually specified locations in your home directory (that were different from the defaults) for each of those three locations?
    Because what I did to reproduce this issue is make sure I didn't have write permissions i /usr/local/ and /usr/local/share, re-ran the installer and then it picked defalt locations that were under my homedir, which I let it install to.
    I was unable to reproduce this.
    The locations it picked for me were
    ~/jEdit/5.1.0
    ~/bin
    ~/man/man1

    double-check those are the locations it used for you and that you have write permissions in those directories please?

     
  • Alan Ezust
    Alan Ezust
    2013-10-15

    Or please supply more detailed steps to reproduce. I can only test on debian or kubuntu though.

     
  • Alan Ezust
    Alan Ezust
    2013-10-15

    • labels: 102668 --> java installer
     
  • Baldurien
    Baldurien
    2013-10-15

    This fails in Windows 7 x64 + jdk7u40 (x64) too : my current user does not have right on C:/Program Files (I need to run as admin), and I try to install jedit into C:/program-noinstaller - a directory where I have full right - but it fails witht the same message.

    On a side node, running java as an admin, failed too.

    Step to reproduce: simply run the jar, put some directory which belong to the user, ...

    Please tell me if there is a way to enable log when running from command line.

    Also, I don't know what you use to tell if one has the right to write, but I remember a bug in the JDK7 with java.nio2 :

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7091747 duplicate of
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7190897

    The workaround was to transform a Path to file, and use canWrite() : (java.nio.file.Path) path.toFile().canWrite();

    However, it seems it works fine now.

     
  • Dale Anson
    Dale Anson
    2013-10-15

    I can reproduce this:

    0. start clean, rm -rf ~/jEdit
    1. get installer jar from jedit.org, http://sourceforge.net/projects/jedit/files/jedit/5.1.0/jedit5.1.0install.jar/download
    2. put installer in home directory, I put it in /home/danson/downloads.
    3. in a terminal, cd ~/downloads
    4. java -jar jedit5.1.0install.jar
    5. click next twice to get to the place to enter the installation paths, Mine defaulted to:
    install program in: /home/danson/jEdit/5.1.0
    install short cut in /home/danson/bin
    install manual page in /home/danson/man/man1
    Of these 3, only /home/danson/bin exists
    6. click next, leave all boxes checked
    7. click install
    8. See the message "The installer could not create the destination directory. Maybe you do not have write permission?

    Based on Edwards emails about this, I check ~/jEdit/5.1.0/doc/api and see that it has some files but is missing many. It appears to have installed up to org/gjt/sp/jedit/gui, but no api docs beyond that. There should be help, indent, input, etc at the same level as gui, but those are missing. At the doc/api level, there should also be bsh, com, gnu, and resources in addition to org, but those are also missing. Further, the man pages are not installed in ~/man/man1, that directory is not even created.

    So it looks like the installer is putting the files in the right place, but bombs out for some reason. Unfortunately, this is as far as I had time to investigate.

     
  • Dale Anson
    Dale Anson
    2013-10-15

    I should have mentioned I tried this on an up to date version of Arch Linux.

     
  • Edward Diener
    Edward Diener
    2013-10-15

    I used the default locations supplied by the installer, which were all within my home directory. Whether the directories were there or not, clearly I have rights to create new directories beneath my home directory. This is what made me believe that the install must be trying to create files in a directory outside my home directory. But I have no idea what that outside directory would be. If the installer puts out a log file I could look in there and try to see in what directory it did not have write permission.

    Also not that the problem I describe in this bug report occurred in OpenSuse 12.3 and Fedora 18, but did not occur in Mageia 3, CentOS 5.9, and CentOS 6.4. This makes me believe that I did have write priveleges to whatever directory outside my home directory the installer was trying to write files in some Linux distros but not in others.

    Finally because it succeeded in OpenSuse 12.3 and Fedora 18 when I unchecked the box that wanted to install help information for plugins and the jedit API my strong guess is that it tried to install help information for those areas in some directory outside my home directory structure. Hopefully someone can look at the installation program and figure it out with that information.

     
  • Gergeo Letay
    Gergeo Letay
    2013-11-14

    I am seeing exactly the same issue, trying to install on Redhat Enterprise 6.2
    Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
    ...
    Installing jedit-api
    *** An error occurred: The installer could not create the destination directory.
    Maybe you do not have write permission?
    the installation directory exists, and I of course do have write permissions.

     
  • Edward Diener
    Edward Diener
    2013-11-14

    I did not manually specify locations but took the default locations provided by the installer, and did not change them. All of the paths it picked as default were within my home directory.

     
1 2 > >> (Page 1 of 2)