Skip navigation

restart disables javaws again

19408 Views 75 Replies Latest reply: Mar 8, 2013 9:33 AM by Shareef Yousef RSS
  • GlintOZ Calculating status...
    Currently Being Moderated
    Jan 31, 2013 5:46 AM (in response to Matthew Knight)

    I just used TextWrangler to edit the XProtect.Meta.plist file and change the version back to 1.7.10 then saved it after saving an original copy of the file just in case.

  • WroDo Calculating status...
    Currently Being Moderated
    Jan 31, 2013 6:22 AM (in response to WroDo)

    Update:

     

    #!/bin/bash

    #

    # https://discussions.apple.com/message/21091715#21091715

    #

    # 2013-01-31,          14:46, kh:          FYI: Das script muss als root ausgeführt werden.

    # 2013-01-31,          15:20, kh:          Sollte gehen.

     

     

    # Globale Variablen

    GFILETEMP="/tmp/javaws_fix.tmp"

     

     

    # Finde die aktuelle Java-Version raus, und ja, das sch* Java schreibt das nach stderr statt stdout.

    java -version > "${GFILETEMP}" 2>&1

    JAVARUNTIMEVERSIONLINE="`grep \"Runtime Environment\" \"${GFILETEMP}\"`"

    JAVARUNTIMEVERSION="`echo \"${JAVARUNTIMEVERSIONLINE}\" | cut -d\( -f3 | cut -d\  -f2 | cut -d- -f1-3`"

     

     

    # Erzeuge den Key JavaWebComponentVersionMinimum mit dem Wert, der unserer Java-Version (java -version) entspricht

    defaults write /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta JavaWebComponentVersionMinimum "${JAVARUNTIMEVERSION}"

     

     

    # Da das defaults-write die Rechte der Datei vergurkt, wieder korrekt setzen:

    chmod 644 /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta. plist

     

     

    # Aufraeumen

    test -f "${GFILETEMP}" && rm "${GFILETEMP}"

     

     

    # EOF

  • newrulez Calculating status...
    Currently Being Moderated
    Jan 31, 2013 6:35 AM (in response to yabbanoname)

    For me worked this solution:

     

    First install the developer version from here

     

    https://developer.apple.com/downloads/index.action?name=Java%20for%20OS%20X%20De veloper%20Preview

     

    Then i used this shell script to toogle the javaws from 7 to 6 and revert

     

    put in the variables the path to both java runtimes

     

     

    ________________________________________________________

     

    ! /usr/bin/env bash

     

     

    # Command that toggles the Java web start version between Java 6 and

    # Java 7 (or, strictly speaking what ever is the current JDK).

     

     

    javaws_6=/Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Command s/javaws

    javaws_7=/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/j avaws

    javaws_bin=/usr/bin/javaws

     

     

    # Since this normally will be run by user by clicking on the icon in

    # Finder, we'll keep it open for a a wee while

    function keep_window_open_a_wee_bit() {

      local seconds=10

      echo "I will exit in $seconds seconds (or hit Ctrl+c to exit now) ..."

      sleep $seconds

      exit 0

    }

     

     

    function green() {

      if [[ -t "0" || -p /dev/stdin ]]; then

        echo -e "\033[01;32m${@}\033[0m"

      else

        echo "$@"

      fi

    }

     

     

    function red() {

      if [[ -t "0" || -p /dev/stdin ]]; then

        echo -e "\033[01;31m${@}\033[0m"

      else

        echo "$@"

      fi

    }

     

     

    function sanity_check() {

      if [ ! -f $javaws_bin ]; then

        echo $javaws_bin "doesn't exist on" $HOSTNAME "I'll exit"

        exit 1

      fi

    }

     

     

    ## $1 :: from

    ## $2 :: to

    function change_link() {

      local from=$1

      local to=$2

     

     

      if [ -f $from ]; then

        echo "Enter your password to change the Java version"

        sudo ln -sf $from $to

        if [[ $(readlink $to) == "$from" ]]; then

          echo "Java web start version updated $(green successfully) :-)"

        else

          echo "Couldn't update the Java web start version :-("

        fi

      else

        echo $from "didn't exist, no touching" $to

      fi

    }

     

     

    sanity_check

     

     

    if [[ $(readlink $javaws_bin) == "$javaws_6" ]]; then

      echo "Java web Start uses $(red Java 6), changing it to $(green Java 7) ... "

      change_link $javaws_7 $javaws_bin

    elif [[ $(readlink $javaws_bin) == "$javaws_7" ]]; then

      echo "Java Web Start uses $(red Java 7), changing it to $(green Java 6) ... "

      change_link $javaws_6 $javaws_bin

    else

      echo "Java Web Start" \

        "points to something I don't know what it is, setting" \

        "it to point to Java 7 "

      change_link $javaws_7 $javaws_bin

    fi

     

     

    keep_window_open_a_wee_bit

     

    ________________________________________________________

     

    save this in a texteditor under yourdesiredfilename.sh

     

    and run in terminal  with root permission with     sudo ./yourdesiredfilename.sh

     

     

    after that you should able to run webstart 6 with command javaws FILENAME.jlnp

    everytime you run it it will change the version of java

  • thomas_r. Level 7 Level 7 (26,945 points)
    Currently Being Moderated
    Jan 31, 2013 7:44 AM (in response to Thorsten007)

    This command solves the problem here for us:

     

    Note that there is a reason that Apple disabled the current version of Java: it's not secure. It is critically important for everyone who considers using the "fixes" described here to understand that using them essentially cripples your computer's security, opening it up to the possibility of a malware "drive-by download." DO NOT do this unless you know exactly what you are doing and are willing to deal with the consequences of the corresponding reduction in security!

  • Janemann Calculating status...
    Currently Being Moderated
    Jan 31, 2013 7:47 AM (in response to thomas_r.)

    Thanks Apple protecting us! And keep us away from working! Without asking or giving us a hint.... my opinion: Booooooh!

  • newrulez Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 31, 2013 7:53 AM (in response to Janemann)

    DITO dude!

  • thomas_r. Level 7 Level 7 (26,945 points)
    Currently Being Moderated
    Jan 31, 2013 7:56 AM (in response to Janemann)

    Admittedly, Apple should be a bit more open about what's going on here. However, it's extremely short-sighted to criticize them for trying to keep you safe from threats that you are unaware of. If you don't like security, switch to Windows, where you can keep using Java just fine... assuming the viruses don't cripple your machine, steal your identity and destroy all your important data.

  • Thorsten007 Calculating status...
    Currently Being Moderated
    Jan 31, 2013 8:04 AM (in response to thomas_r.)

    What i strongly criticize them for is doing updates to machines without asking for user's permission to do so and without informing anybody about it. The least we could except would be an announcement and a possibility to opt-out from such a critical decision.

     

    A huge number of customers were surprised by it this morning and unable to do there daily work because of important applications not able to start.

    And on the other side, we as a software deliverer with an active Apple developer account too were suprised by calls from customers not able to work and spent a half day figuring out of how to get things to work again.

     

    Security is one thing but freedom of choice is another and for me that's much more valuable!

  • newrulez Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 31, 2013 8:14 AM (in response to Thorsten007)

    exactly. especially when the company programs DOESN'T support JAVA 7 yet.

  • Matthew Knight Level 1 Level 1 (15 points)
    Currently Being Moderated
    Jan 31, 2013 8:42 AM (in response to thomas_r.)

    Ironically, Thomas, we are having to use a Windows 7 VM, in order to do our work.

  • Janemann Level 1 Level 1 (5 points)
    Currently Being Moderated
    Jan 31, 2013 10:28 AM (in response to Janemann)

    Hi again, our first version of the fixed FinalCutServer.app had a little bug (Upload via non Edit-in-Place clients was not working) with a missing library we fixed recently.

     

    Please download the file again and use the new one WITHOUT struggling with securityissues etc. Do not tweak around, just use that application which is tiny and maybe also a fix for keeping 10.7 and 10.8 clients from working...let us know

     

    (Upload via non Edit-in-Place clients was not working)

     

    http://moovit.de/index.php/TechBlog/Techblog/finalcut-server-won-t-launch-after- restart

     

    Greetings from Cologne, Jan

     

    www.moovit.de

  • tneale Calculating status...
    Currently Being Moderated
    Jan 31, 2013 11:02 AM (in response to htilly)

    htilly's edit worked for me, briefly.  As soon as I restarted the machine, the XProtect list was updated and the comment was removed.  Java stops working again.

     

    The key sets the minimum version to be 1.6.0_37-b06-435:

     

    <key>JavaWebComponentVersionMinimum</key>

            <string>1.6.0_37-b06-435</string>

     

    The current released version is 1.6.0_37-b06-434.   If you look further down the plist, Oracle's latest release (1.7.11) has also been disabled.

     

    So, Apple as disabled java completely.  Does this imply that they are about to release an update?  We rely on java for a gradebook program at school which is suddenly not working.  This is very bad.

  • newrulez Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 31, 2013 11:07 AM (in response to tneale)

    use my solution. this will work also after reboot. see this post from me

     

    https://discussions.apple.com/message/21092152#21092152

  • jlnovak Calculating status...
    Currently Being Moderated
    Jan 31, 2013 12:26 PM (in response to newrulez)

    I found an easier solution that involves editing the XProtect.meta.plist file that can be found at

    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.p list

     

    On line 6:

    <string>1.6.0_37-b06-435</string>

     

     

    Should be:

    <string>1.6.0_37-b06-434</string>

     

    This allows us to launch java apps from the browser.

  • alucasTHX Level 1 Level 1 (5 points)
    Currently Being Moderated
    Jan 31, 2013 2:59 PM (in response to yabbanoname)

    OK.  I have a fix for you all that seems to work especially if you need Java 6u37 working on any computer Apple disabled it on.  This will work best on 10.6 but can work on 10.7/10.8 as well.

    Do not attempt this if you do not know what you are doing.

    I will not be held responsible for your system if it stops working or you expose yourself to a virus.  If you are a novice user, you attempt to do this, and something goes wrong, remember you were warned.

    DO THIS AT YOUR OWN RISK:

     

     

    Using whatever editor you want at command line as root or using sudo, you will need to edit:

    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.p list

     

    Change:


    <key>JavaWebComponentVersionMinimum</key>

    <string>1.6.0_37-b06-435</string>

     

    To:


    <key>JavaWebComponentVersionMinimum</key>

    <string>1.6.0_37-b06-434</string>

     

     

    Change:


    <key>MinimumPlugInBundleVersion</key>

    <string>1.7.11.22</string>

     

    To:


    <key>MinimumPlugInBundleVersion</key>

    <string>1.7.11.21</string>

     

     

    And best of all, change:


    <key>LastModification</key>

    <string>Thu, 31 Jan 2014 16:55:59 GMT</string>

     

    To any date in the future.  (Bad programming on Apple's part but repreive for those of us who have to support archaic Oracle based systems that won't work under Java 7+.)  It won't update again until after the date you put in there.

     

    DO NOT Delete any of the lines that have to do with version number because it will allow older versions of Java, which are not secure, to run.  I would also not recommend that you change the date too far ahead if you are on 10.7/10.8 and are running Java 7 because the security holes in Java 7 are horrible.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.