代码如下:
String url = "http://www.baidu.com";
Class fileMgr = Class.forName("com.apple.eio.FileManager");
Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] { String.class });
openURL.invoke(null, new Object[] { url });
反射调用FileManager.openURL()方法是我在新浪微博的SDK中找到的,在新浪微博的Demo中调用正常,但是我自己新建一个工程,测试打开百度网站,发现代码能正常运行,但是并不会调起来浏览器,也没有任何报错信息
请问有没有朋友遇到过这种情况
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
小伙看你根骨奇佳,潜力无限,来学PHP伐。