Menu

#330 New drjava beta app won't launch - damaged

v1.0 (example)
open
nobody
None
5
2016-10-06
2016-09-14
hperkins
No

I just downloaded the new beta (drjava-beta-20160913-225446-osx.tar.gz) on OS X 10.11.6, unpacked it (tar xzf), copied the application to /Applications and tried to launch it. The finder says "the application is damaged" and won't launch it.

If I cd into the application and lunch it from a terminal window it starts up and seems to be ok:

DrJava.app/Contents/Resources/Java $ java -jar drjava.jar

Any idea what's wrong when trying to launch it via the regular application?

Thanks

Hal

Related

Support Requests: #330

Discussion

  • hperkins

    hperkins - 2016-09-14

    One additional thing that might be useful: this particular laptop has two JVMs installed: the latest Oracle one and the old Apple Java 6 (https://support.apple.com/kb/dl1572?locale=en_US):

    $ pwd; ls -l
    /Library/Java/JavaVirtualMachines
    total 0
    drwxr-xr-x 3 root wheel 102 Jul 14 2015 1.6.0.jdk
    drwxr-xr-x 3 root wheel 102 Jul 20 17:50 jdk1.8.0_102.jdk

    The Java 6 one is needed to launch some of the old Adobe CS6 applications like DreamWeaver. But the Oracle one is the one that is the default in the terminal and eclipse, and is also the one that DrJava uses when it is launched from the terminal window. Both VMs do show up in DrJava's popup window. I haven't tried selecting the Java 6 one and doing anything with it - with luck it is basically ignored.

     
  • Robert Cartwright

    Hi Hal,

    First, OS X can lie about the status of apps. It does not like apps that
    have not been registered with Apple for a fee. If you are running Apple
    Java 6 (which I doubt), you can simply open the app manually and it should
    run and not generate any warning messages when you subsequently open it.
    Since you have Java 6 installed, it may work if you simply open the app
    manually. I have a recently purchased MacBook Pro on my desk but I hate it
    (the iOS UI conventions are awful) so I primarily use my old Linus laptop
    (a Lenovo 420s bought on eBay and upgrades for less than $250) instead.
    The old laptop is actually faster than than the MacBook Pro (a new 2.9Ghz
    dual core i5 with SSD and 16GB of ram) on the DrJava unit tests. My old
    laptop is no slouce with a Samsung SSD and 16GB or ram but it has a
    strictly lower performance i5-2520M (2.5Ghz) CPU so Mac OS X is creating
    much more overhead than Ubuntu LInux (even with the heavyweight Unity
    desktop).

    About two years ago, many user reported a message simliar to the one you
    are seeing simply because of a new gatekeeper in Mac OS X. So I would try
    manually opening it;
    I don't see how it can hurt anything if your machine tries to use the wrong
    Java launcher because it will immediately abort.

    You may be seeing the "corrrupted" message because of the incompatibility
    between the Apple and Oracle Java launchers. I need to update our
    technology for packaging the OS X app. The current OS X app is packaged
    with the Apple launcher which assumes you are running Apple Java 6.
    Starting with Java 7, the standard OS X
    JVMs are provided by Oracle which requires a different incompatible
    launcher. (Why? I think there may be bad blood between Oracle and Apple.)
    I know that Apple is no longer supporting Java but there may be an
    open-jdk release for OS X (the openjdk JVMs on Linux is generally
    indistinguishable from the corresponding Oracle JVMs). Unfortunately,
    open-jdk releases generally lag far behind Oracle releases. Since most
    people now run Java 7 or Java 8, I really should use the Oracle package
    manager. In the interest of avoiding further delays in releasing a new
    version of DrJava, I ducked that change for the time being.

    If you are running either Oracle Java 7 or Java 8 (recommended), then you
    need to download the jar file and run it from a terminal exactlly as you
    would in Linux. It appears that you have already done this or extracted
    the jar file from the OS X app. There is no difference between the jar
    file download and jar file embedded in the Mac OS X app.

    It is always great to hear from you so don't hesitate to ask more questions.

    Best,

    Corky

    On Wed, Sep 14, 2016 at 1:51 PM, hperkins hperkins@users.sf.net wrote:


    Status: open
    Group: v1.0 (example)
    Created: Wed Sep 14, 2016 06:51 PM UTC by hperkins
    Last Updated: Wed Sep 14, 2016 06:51 PM UTC
    Owner: nobody

    I just downloaded the new beta (drjava-beta-20160913-225446-osx.tar.gz)
    on OS X 10.11.6, unpacked it (tar xzf), copied the application to
    /Applications and tried to launch it. The finder says "the application is
    damaged" and won't launch it.

    If I cd into the application and lunch it from a terminal window it starts
    up and seems to be ok:

    DrJava.app/Contents/Resources/Java $ java -jar drjava.jar

    Any idea what's wrong when trying to launch it via the regular application?

    Thanks

    Hal

    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/drjava/support-requests/330/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Support Requests: #330

  • hperkins

    hperkins - 2016-09-15

    (This was sent via email but didn't get cc'd here because of some email permission problem. So posting a copy to get everything in one place)

    Hi Corky -

    Good to hear from you.

    I suspect that the launcher version is exactly the problem. The warning I'm getting is basically "this application is broken and can't be launched". That's different from the gatekeeper warning about unsigned apps, which can be solved by right-clicking the app to launch it manually and selecting the correct option to launch it without a warning in the future. I'm not seeing that one, and I can't seem to force it to happen so I can approve the app and get past any gatekeeper issues.

    What I'd suggest is either to update the OS X app to use the oracle launcher, or, if that's not possible in time, don't ship the OS X app this time around and tell OS X people to download the jar file and double-click it to run DrJava, which does work. Given that DrJava is moving past Java 6 (hooray!) and that Java 7 or 8 requires Oracle Java on the Mac, it's likely that few people would even have the Apple Java 6 installed, and apparently things aren't working even if it is. (Maybe the class file version(s) in the compiled code is(are) too recent for the Java 6 launcher?)

    I'm not sure of the entire history between Apple and Oracle. What I do remember in the early days is that Apple wanted complete control of everything Java and rolled their own, with their own non-standard, non-unix directory structure, but at least at the technical levels they were trading info with Sun. Several years ago in roughly the Java 5 or 6 era, Steve Jobs and Larry Elison decided it was crazy for Apple to be an outlier and that it made sense for Oracle to ship Java on all platforms, which is how Apple decided to abandon Java and let Oracle pick it up. Of course one difference is that apple had switched to OS X by then, which is a unix and close enough to regular Unix/Linux systems that it didn't require a completely different setup as on the old classic Mac OS.

    At least in the last several years, the openjdk and Oracle releases have seemed to track quite closely since, as I understand it, almost the entire code base is now the openjdk one and is shared between them. Usually the major linux distros release updates to match new versions from Oracle within a few days or a couple of weeks at the most. I don't know what the app launcher grubbies look like, so maybe at that level there are bigger Oracle vs OS X differences.

    Anyway, that's my 2 pence from the left coast. If you can, update to use the Java 7/8 launcher on mac os x, otherwise just ship the jar without the app if there's not enough time. I think that shipping code that tries to use the old Apple Java 6 launcher is going to be nothing but a headache. Even if you can make it work, it would require downloading the Apple Java 6 shim and installing that, something that a lot of people probably won't want to do, and likely will increase your bug report/support headache.

    Hope that helps. Thanks for keeping things going after all these years.

    Cheers

    Hal

     
  • Alex Jacoby

    Alex Jacoby - 2016-10-06

    I would second what Hal said. As a teaching tool, I think it's preferable for new programmers if they can just download and run the application without worrying about the command line right away (or the gatekeeper warning for that matter, but that's a smaller hurdle).

    Thanks for all the great work,
    Alex

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.