No download.oracle.com anymore

In case people are wondering why mess with this. There is no means of having cross platform anything commercially java without using 1.8 (build 73 or so?) or openJDK. SDK is neither of these.

openJDK 13 is supposed to have a jpackager that will fix all of this but its an unknown quantity and something for the future. If using 1.8 and SDK, there is nothing unless you do all of this manually.

I made it so that when using the current naming scheme the SDK expects, i.e the default behavior now, that it pulls the JRE from AdoptOpenJDK.

If you supply a version, using the current java naming scheme, it will still pull the version from AdoptOpenJDK.

This will only work for 1.8 because the AdoptOpenJDK naming scheme itself changes after 1.8. Easy enough to fix once the SDK moves away from oracles netbeans to OpenJDK but not worth fixing until then, and assuming the SDK survives this of course. Not holding my breath.

To summerize, I removed all references to linux 32 bit jre since this SDK version build has no jre for that anymore. Time marches on I guess.

Changed files.

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCustomizerPanel.java
+++ b/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCustomizerPanel.java
@@ -46,12 +46,6 @@
         } else {
             jCheckBox2.setSelected(false);
         }
-        String str3 = properties.getProperty("linux-x86.app.enabled");
-        if ("true".equals(str3)) {
-            jCheckBox3.setSelected(true);
-        } else {
-            jCheckBox3.setSelected(false);
-        }
         String str4 = properties.getProperty("linux-x64.app.enabled");
         if ("true".equals(str4)) {
             jCheckBox4.setSelected(true);
@@ -83,11 +77,6 @@
         } else {
             properties.setProperty("windows-x64.app.enabled", "");
         }
-        if (jCheckBox3.isSelected()) {
-            properties.setProperty("linux-x86.app.enabled", "true");
-        } else {
-            properties.setProperty("linux-x86.app.enabled", "");
-        }
         if (jCheckBox4.isSelected()) {
             properties.setProperty("linux-x64.app.enabled", "true");
         } else {
@@ -125,7 +114,6 @@
 
         jCheckBox1 = new javax.swing.JCheckBox();
         jCheckBox2 = new javax.swing.JCheckBox();
-        jCheckBox3 = new javax.swing.JCheckBox();
         jLabel1 = new javax.swing.JLabel();
         jScrollPane1 = new javax.swing.JScrollPane();
         jTextArea1 = new javax.swing.JTextArea();
@@ -139,8 +127,6 @@
 
         jCheckBox2.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox2.text")); // NOI18N
 
-        jCheckBox3.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox3.text")); // NOI18N
-
         jLabel1.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jLabel1.text")); // NOI18N
 
         jTextArea1.setEditable(false);
@@ -149,6 +135,7 @@
         jTextArea1.setRows(5);
         jTextArea1.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jTextArea1.text")); // NOI18N
         jTextArea1.setWrapStyleWord(true);
+        jTextArea1.setCaretPosition(0);
         jTextArea1.setDisabledTextColor(new java.awt.Color(0, 0, 0));
         jScrollPane1.setViewportView(jTextArea1);
 
@@ -160,6 +147,11 @@
         jCheckBox6.setToolTipText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jCheckBox6.toolTipText")); // NOI18N
 
         jTextField1.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jTextField1.text")); // NOI18N
+        jTextField1.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                jTextField1ActionPerformed(evt);
+            }
+        });
 
         jLabel2.setText(org.openide.util.NbBundle.getMessage(DesktopExeCustomizerPanel.class, "DesktopExeCustomizerPanel.jLabel2.text")); // NOI18N
 
@@ -167,25 +159,24 @@
         this.setLayout(layout);
         layout.setHorizontalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)
+            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
             .addGroup(layout.createSequentialGroup()
                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jCheckBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
-                    .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
-                    .addComponent(jCheckBox3, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
+                    .addComponent(jCheckBox1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(jCheckBox6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addGroup(layout.createSequentialGroup()
                         .addContainerGap()
-                        .addComponent(jScrollPane1))
-                    .addComponent(jCheckBox4, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
-                    .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE)
-                    .addComponent(jCheckBox6, javax.swing.GroupLayout.DEFAULT_SIZE, 365, Short.MAX_VALUE))
-                .addContainerGap())
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addContainerGap()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)
+                            .addGroup(layout.createSequentialGroup()
                 .addComponent(jLabel2)
-                .addGap(18, 18, 18)
-                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addGap(0, 0, Short.MAX_VALUE))))
+                    .addComponent(jCheckBox4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(jCheckBox5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap())
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -196,27 +187,28 @@
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addComponent(jCheckBox2)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jCheckBox3)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addComponent(jCheckBox4)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addComponent(jCheckBox5)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                 .addComponent(jCheckBox6)
                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                     .addComponent(jLabel2))
-                .addGap(12, 12, 12)
-                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addContainerGap())
         );
     }// </editor-fold>                        
 
+    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {                                            
+        // TODO add your handling code here:
+    }                                           
+
     // Variables declaration - do not modify                     
     private javax.swing.JCheckBox jCheckBox1;
     private javax.swing.JCheckBox jCheckBox2;
-    private javax.swing.JCheckBox jCheckBox3;
     private javax.swing.JCheckBox jCheckBox4;
     private javax.swing.JCheckBox jCheckBox5;
     private javax.swing.JCheckBox jCheckBox6;
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java
+++ b/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java
@@ -31,7 +31,6 @@
     private final String[] keyList = new String[]{
         "windows-x86.app.enabled",
         "windows-x64.app.enabled",
-        "linux-x86.app.enabled",
         "linux-x64.app.enabled",
         "macosx-x64.app.enabled",
         "bundle.jre.enabled",
@@ -72,7 +71,6 @@
         public void actionPerformed(ActionEvent e) {
             if ("true".equals(properties.getProperty("windows-x86.app.enabled"))
                     || "true".equals(properties.getProperty("windows-x64.app.enabled"))
-                    || "true".equals(properties.getProperty("linux-x86.app.enabled"))
                     || "true".equals(properties.getProperty("linux-x64.app.enabled"))
                     || "true".equals(properties.getProperty("macosx-x64.app.enabled"))) {
                 desktopDeployment.loadTargets("nbres:/com/jme3/gde/desktop/executables/desktop-deployment-targets.xml");
@@ -99,33 +97,26 @@
             if ("true".equals(properties.getProperty("windows-x86.app.enabled"))) {
                 String jreName = projectPath + File.separator + "resources"
                         + File.separator + "desktop-deployment"
-                        + File.separator + "jre-windows-x86.tar.gz";
+                        + File.separator + "jre-windows-x86.zip";
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre(jreVersion, "windows-i586", jreName);
+                    JreDownloader.downloadJre(jreVersion, "jre_x86-32_windows", jreName, ".zip");
                 }
             }
             if ("true".equals(properties.getProperty("windows-x64.app.enabled"))) {
                 String jreName = projectPath + File.separator + "resources"
                         + File.separator + "desktop-deployment"
-                        + File.separator + "jre-windows-x64.tar.gz";
+                        + File.separator + "jre-windows-x64.zip";
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre(jreVersion, "windows-x64", jreName);
+                    JreDownloader.downloadJre(jreVersion, "jre_x64_windows", jreName, ".zip");
                 }
             }
-            if ("true".equals(properties.getProperty("linux-x86.app.enabled"))) {
-                String jreName = projectPath + File.separator + "resources"
-                        + File.separator + "desktop-deployment"
-                        + File.separator + "jre-linux-x86.tar.gz";
-                if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre(jreVersion, "linux-i586", jreName);
-                }
-            }
+
             if ("true".equals(properties.getProperty("linux-x64.app.enabled"))) {
                 String jreName = projectPath + File.separator + "resources"
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-linux-x64.tar.gz";
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre(jreVersion, "linux-x64", jreName);
+                    JreDownloader.downloadJre(jreVersion, "jre_x64_linux", jreName, ".tar.gz");
                 }
             }
             if ("true".equals(properties.getProperty("macosx-x64.app.enabled"))) {
@@ -133,7 +124,7 @@
                         + File.separator + "desktop-deployment"
                         + File.separator + "jre-macosx-x64.tar.gz";
                 if (!new File(jreName).exists()) {
-                    JreDownloader.downloadJre(jreVersion, "macosx-x64", jreName);
+                    JreDownloader.downloadJre(jreVersion, "jre_x64_mac", jreName, ".tar.gz");
                 }
             }
         }
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/JreDownloader.java
+++ b/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/JreDownloader.java
@@ -71,7 +71,8 @@
      * linux-i586, linux-x64, maxosx-x64)
      * @param location The absolute file path to download to.
      */
-    public static void downloadJre(String jreVersion, String platform, String location) {
+    public static void downloadJre(String jreVersion, String platform, String location, String fileType) {
+
         String property; // The JRE Version
 
         if (jreVersion == null) {
@@ -81,9 +82,15 @@
         }
 
         Matcher m = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)_(\\d+)\\-b(\\d+)").matcher(property);
+
         if (m.matches()) {
-//            "http://download.oracle.com/otn-pub/java/jdk/${jv.minor}u${jv.update}-b${jv.build}/jre-${jv.minor}u${jv.update}-${platform.durl}.tar.gz";
-            String urlString = "http://download.oracle.com/otn-pub/java/jdk/" + m.group(2) + "u" + m.group(4) + "-b" + m.group(5) + "/jre-" + m.group(2) + "u" + m.group(4) + "-" + platform + ".tar.gz";
+
+           String urlString =  
+                   "https://github.com/AdoptOpenJDK/openjdk" +  m.group(2) 
+                   + "-binaries/releases/download/jdk" + m.group(2) 
+                   + "u" + m.group(4) + "-b" + m.group(5) 
+                   + "/OpenJDK" + m.group(2) + "U-" + platform 
+                   + "_hotspot_" + m.group(2) + "u" + m.group(4) + "b" + m.group(5) + fileType;
             attemptDownload(urlString, new File(location), 0);
         }
     }
@@ -92,7 +99,7 @@
         logger.log(Level.INFO, "Attempt to download JRE from {0}", newUrl);
         try {
             HttpURLConnection connection = (HttpURLConnection) new URL(newUrl).openConnection();
-            connection.setRequestProperty("Cookie", "gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie");
+//            connection.setRequestProperty("Cookie", "gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie");
             connection.setAllowUserInteraction(false);
             connection.setInstanceFollowRedirects(true);
             connection.connect();

I can push this or keep it for myself. Up to you guys.

2 Likes