.. | .. |
---|
13 | 13 | |
---|
14 | 14 | import javax.sound.sampled.*; |
---|
15 | 15 | |
---|
| 16 | +import javax.net.ssl.HostnameVerifier; |
---|
| 17 | +import javax.net.ssl.HttpsURLConnection; |
---|
| 18 | +import javax.net.ssl.SSLContext; |
---|
| 19 | +import javax.net.ssl.SSLSession; |
---|
| 20 | +import javax.net.ssl.TrustManager; |
---|
| 21 | +import javax.net.ssl.X509TrustManager; |
---|
| 22 | + |
---|
| 23 | +import java.security.cert.X509Certificate; |
---|
| 24 | +import java.net.Authenticator; |
---|
| 25 | +import java.net.PasswordAuthentication; |
---|
| 26 | + |
---|
16 | 27 | //import com.jamonapi.*; |
---|
17 | 28 | public class Grafreed extends Applet implements ActionListener |
---|
18 | 29 | { |
---|
.. | .. |
---|
673 | 684 | PlayWord(word, 1); |
---|
674 | 685 | } |
---|
675 | 686 | |
---|
| 687 | + static boolean isWindows; |
---|
| 688 | + |
---|
676 | 689 | public static void main(String argv[]) |
---|
677 | 690 | { |
---|
678 | | - String osArch = System.getProperty("os.arch"); |
---|
| 691 | + String osArch = System.getProperty("os.arch"); |
---|
679 | 692 | if (Globals.DEBUG) |
---|
680 | 693 | System.out.println("os.arch = " + osArch); |
---|
681 | 694 | |
---|
| 695 | + String osName = System.getProperty("os.name"); |
---|
| 696 | + |
---|
| 697 | + isWindows = !osName.equals("Mac OS X"); |
---|
| 698 | + |
---|
682 | 699 | if (argv.length == 0) |
---|
683 | 700 | { |
---|
684 | 701 | String javaPath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java"; |
---|
.. | .. |
---|
1011 | 1028 | } |
---|
1012 | 1029 | } |
---|
1013 | 1030 | /**/ |
---|
| 1031 | + |
---|
| 1032 | + // Create a trust manager that does not validate certificate chains |
---|
| 1033 | + final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { |
---|
| 1034 | + @Override |
---|
| 1035 | + public void checkClientTrusted(final X509Certificate[] chain, final String authType) { |
---|
| 1036 | + } |
---|
| 1037 | + |
---|
| 1038 | + @Override |
---|
| 1039 | + public void checkServerTrusted(final X509Certificate[] chain, final String authType) { |
---|
| 1040 | + } |
---|
| 1041 | + |
---|
| 1042 | + @Override |
---|
| 1043 | + public X509Certificate[] getAcceptedIssuers() { |
---|
| 1044 | + return null; |
---|
| 1045 | + } |
---|
| 1046 | + } }; |
---|
| 1047 | + |
---|
| 1048 | + try |
---|
| 1049 | + { |
---|
| 1050 | + // Install the all-trusting trust manager |
---|
| 1051 | + final SSLContext sslContext = SSLContext.getInstance("SSL"); |
---|
| 1052 | + sslContext.init(null, trustAllCerts, null); |
---|
| 1053 | + // Create an ssl socket factory with our all-trusting manager |
---|
| 1054 | + HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory()); |
---|
| 1055 | + HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { |
---|
| 1056 | + public boolean verify(String urlHostName, SSLSession session) { |
---|
| 1057 | + return true; |
---|
| 1058 | + } |
---|
| 1059 | + }); |
---|
| 1060 | + // be authentic |
---|
| 1061 | + Authenticator.setDefault(new Authenticator() { |
---|
| 1062 | + @Override |
---|
| 1063 | + protected PasswordAuthentication getPasswordAuthentication() { |
---|
| 1064 | + return new PasswordAuthentication("args[0]", "args[1]".toCharArray()); |
---|
| 1065 | + } |
---|
| 1066 | + }); |
---|
| 1067 | + } |
---|
| 1068 | + catch (Exception e) |
---|
| 1069 | + { |
---|
| 1070 | + e.printStackTrace(); |
---|
| 1071 | + } |
---|
| 1072 | + |
---|
| 1073 | + |
---|
| 1074 | + ///////////// |
---|
1014 | 1075 | |
---|
1015 | 1076 | // javax.swing.ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); |
---|
1016 | 1077 | |
---|
.. | .. |
---|
1024 | 1085 | grafreed.universe = new cGroup(); |
---|
1025 | 1086 | grafreed.universe.name = "Grafreed"; |
---|
1026 | 1087 | grafreed.universe.material = new cMaterial(); |
---|
1027 | | - grafreed.universe.skyboxname = "cubemaps/penguins-skyboxes/yonder"; |
---|
1028 | | - grafreed.universe.skyboxext = "jpg"; |
---|
1029 | 1088 | |
---|
1030 | 1089 | // theApplet3D.universe.textures = CameraPane.DEFAULT_TEXTURE; |
---|
1031 | 1090 | |
---|
1032 | 1091 | grafreed.universe.root = true; |
---|
1033 | 1092 | grafreed.universe.openEditWindow(null, true); //, true); |
---|
| 1093 | + grafreed.universe.editWindow.New(); |
---|
| 1094 | + |
---|
1034 | 1095 | //mon.stop(); |
---|
1035 | 1096 | //System.out.println(mon); |
---|
1036 | 1097 | //timeflow.app.TimeflowAppLauncher.GetTimeFlow(); |
---|