我已经安装了Apple提供的Java for Developer软件包10.7并且java应用程序运行正常
但eclipse无法找到JDK根路径,我也不能.
有人有什么想法吗?
Apple推出了MacOSX Lion(10.7)的新功能,称为Captive Network Assistant.在我看来,它只是一个无用而烦人的功能.它的目的是帮助您登录需要身份验证的网络(请参阅:Captive Portal),但该功能不存储cookie或保存密码.
在我的大学里,我们也使用这样一个网络,要求用户登录.登录不是通过浏览器而是通过VPN进行的,这使得强制网络助手完全无用且烦人.
所以我在这里发布了一个关于如何用实际有用的东西替换这个"功能"的指南,我不希望它丢失并对其他人有用
#1.创建名为"Captive Network Assistant"的bash脚本,将以下代码粘贴到内部,并在/ System/Library/CoreServices/Captive Network Assistant.app/Contents/MacOS/中替换您的文件.
#!/bin/bash
scriptlocation="/System/Library/CoreServices/Captive Network Assistant.app/Contents/MacOS/vpn.scpt"
osascript "$scriptlocation"
Run Code Online (Sandbox Code Playgroud)
#2.创建名为"vpn.scpt"的applescript,将其放在bash脚本中提到的路径下,并将以下代码放在:
set wlanssid to do shell script "networksetup -getairportnetwork en1 | cut -c 24-"
connectVPN(wlanssid)
on connectVPN(SSID)
tell application "System Events"
tell current location of network preferences
local VPNService
if (SSID = "XYZXYZ") then --WLANNAME
set VPNService to service "XYZXYZ-VPN" --VPNNAME
set isConnected to connected of current configuration of VPNService
if not isConnected then
connect …Run Code Online (Sandbox Code Playgroud)