Set Java Preferences w/script

johnnasset
Contributor

Is there a way to set Java security preferences with a script? We have a lab using Wordle and the site applet gets blocked by Java with the default "High" security level. When I drop the level to medium, it works fine. I'd like to set this level across all machines in this lab remotely. I tried the following defaults command:

defaults write com.oracle.javadeployment.plist deployment.securty.level MEDIUM

This added the key outside of my <dict> array. I'd like to add the MEDIUM security setting inside that array like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> <key>/com/oracle/javadeployment/</key> <dict> <key>deployment.javaws.appicon.index</key> <string>/Users/john/Library/Application Support/Oracle/Java/Deployment/cache/6.0/appIcon/appIcon.xml</string> <key>deployment.javaws.splash.index</key> <string>/Users/john/Library/Application Support/Oracle/Java/Deployment/cache/6.0/splash/splash.xml</string> <key>deployment.modified.timestamp</key> <string>1378397568382</string> <key>deployment.proxy.type</key> <string>0</string> <key>deployment.security.level</key> <string>MEDIUM</string> <key>deployment.version</key> <string>7.21</string> </dict>
</dict>
</plist>

Is there a way I can modify my defaults command or another way to do this?

Thanks,
John

43 REPLIES 43

dderusha
Contributor

you should be good to go with those permissions.

kempt
New Contributor II

So after I run that package in Self-Service, I should be able to open my Java Preferences and see the slider set to Medium?

dderusha
Contributor

yes, make sure you check the box for FEU - fill existing users.

kempt
New Contributor II

Still not doing it, and I had FEU checked.