Skip to content

Mac OS Big Sur problem #117

Open
Open

Description

@ebeshero

I'm fighting with my Mac to get it to allow JGAAP to open files in my Documents directory. Unfortunately, the guidelines in the https://github.com/evllabs/JGAAP/blob/master/docs/OSX_User_Guide.pdf aren't quite enough. The app opens, but I need to get Big Sur to recognize a .jar file as the kind of app to which it can give permission to access my directories.

Activity

  1. DavidBerdik commented on Apr 23, 2021

    @DavidBerdik
    Member

    I am not sure I understand the issue you are facing. Although I do not regularly use macOS, I did just test JGAAP on macOS Big Sur, and it worked alright for me. Here are the steps I followed:

    1. Double-click on JGAAP jar file.
    2. Click "OK" on the following prompt:
      image
    3. JGAAP UI launched, and I was able to define the text file I wanted to run experiments on.

    Can you describe how your process differs from the one I show here?

  2. ebeshero commented on Apr 23, 2021

    @ebeshero
    ContributorAuthor

    @DavidBerdik I don't see that prompt (to allow java to access Desktop files) when I click on the JGAAP.jar (which I set on my Desktop). However, I am pretty sure that as you indicate it's a Java issue. I resolved my issue in the Terminal (which may not be ideal for most users). I checked my Java HOME and it's probably in a nonstandard place (in a .jenv folder, which seemed weird). I basically just navigated to my Desktop in the Terminal and ran:

    java -jar JGAAP-8.0.1.jar
    

    And this time when it started up, I was able to add authors and documents as expected. The problem I was seeing was: On trying to add an Author and select documents, I could navigate as far as my Documents, and then could see nothing in JGAAP's representation of my directories. Running from my terminal seems to take care of the problem, at least for me.

  3. DavidBerdik commented on Apr 23, 2021

    @DavidBerdik
    Member

    If you go to System Preferences → Security and Privacy → Click the lock to make changes → Files and Folders, do you see an option for Java?

    image

  4. ebeshero commented on Apr 23, 2021

    @ebeshero
    ContributorAuthor

    @DavidBerdik No, it's not among the apps listed in System Preferences, though I do find it via Terminal.

  5. DavidBerdik commented on Apr 23, 2021

    @DavidBerdik
    Member

    Hmm alright. Do you recall how you installed Java on your system? Also, do you know what version it is (java -version in the terminal will tell you)?

    I know you managed to work around the issue, but I'm trying to gather information that might be useful in sorting out this problem properly both for you and for others who may encounter it.

  6. ebeshero commented on Apr 23, 2021

    @ebeshero
    ContributorAuthor

    @DavidBerdik Yes, I checked that a while back. It's Java 15, and I installed it last fall I think, though I don't quite remember how. It's installed, as I mentioned in an odd location, in my Users profile, in a .venv directory, but it does resolve when I echo $JAVA_HOME.

  7. ebeshero commented on Apr 23, 2021

    @ebeshero
    ContributorAuthor

    @DavidBerdik This is what I have:
    java version "15" 2020-09-15
    Java(TM) SE Runtime Environment (build 15+36-1562)
    Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

  8. ebeshero commented on Apr 23, 2021

    @ebeshero
    ContributorAuthor

    Also, I'm trying to find out if any of my students on Macs saw this problem. I asked them to try installing something earlier in the semester (before JGAAP, it was the eXist XML database) that required installing Java if they didn't have it, and I directed them to Oracle here: https://www.java.com/en/download/help/index_installing.html

    I was debating whether to send them to Open JDK...but Oracle seemed a little safer somehow. Anyway, for lots of them it was their first experience having to install Java. Most of my students are on Windows, but a few of us (including me) are on Macs--I'll see if they'll tell me more tomorrow! @juola delivered a workshop on Wednesday and I wound up just watching his screen instead of running JGAAP on my computer at the time because of this weird Java problem--I'm glad I solved it for myself, but I wonder if it affected anyone else in my student crew.

  9. DavidBerdik commented on Apr 23, 2021

    @DavidBerdik
    Member

    Yeah there are too many variables here unfortunately. I can tell you about my setup though in case it helps. I use the OpenJDK distribution offered through Homebrew.

    If you are familiar with various open source Linux distros, then you probably know about package managers such as apt and yum. Unfortunately, macOS does not include a package manager of this sort out of the box. That's where Homebrew comes in. After installing it, it's very easy to install various tools on your system through the command line.

    To set up OpenJDK through Homebrew:

    1. Install Homebrew. Instructions are here: https://brew.sh/
    2. After it is installed, run brew install openjdk in the terminal (https://formulae.brew.sh/formula/openjdk)
    3. After the install finishes, Java is ready for use!

    My Java info as of this posting:

    Davids-Mac:~ david$ java -version
    openjdk version "15.0.2" 2021-01-19
    OpenJDK Runtime Environment (build 15.0.2+7)
    OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode, sharing)
    
  10. bakerj commented on Apr 23, 2021

    @bakerj

    I know you managed to work around the issue, but I'm trying to gather information that might be useful in sorting out this problem properly both for you and for others who may encounter it.

    @DavidBerdik here is some good discussion on why launching from the terminal is a viable workaround in Big Sur: https://stackoverflow.com/questions/65469536/why-does-a-jar-file-have-no-permissions-to-read-from-disk-when-started-via-doubl

  11. ebeshero commented on Aug 3, 2023

    @ebeshero
    ContributorAuthor
  12. DavidBerdik commented on Aug 3, 2023

    @DavidBerdik
    Member

    Unfortunately, I no longer have access to the virtual machine that I used to use for testing stuff on macOS, so I can't really provide much input into this, but assuming that this forum post is correct, it sounds like Apple no longer provides a built-in jar launcher with macOS?

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions