No download.oracle.com anymore

You could try changing the version here. I’m not sure if that’s gonna start an avalanche of new versions, though…

It seems the trick was,

answer

run command prompt as administrator.

Slowly figuring this out.

I am able to grab the files from Adopt now but I do not know what is supposed to be done with them after download and writing them into the resources folder.

There are some things that are different for windows like the file is zip and linux and mac are still tar.gz.

There are also chksum that can be downloaded and ran for everything and since github is wide open whereas oracle used a secure cookie, this should probably be used.

Each file from Adopt has the same procedure for install.
windows

Expand-Archive -Path .\OpenJDK8U-jre_x64_windows_hotspot_8u212b03.zip -DestinationPath .

linux

tar -xf OpenJDK8U-jre_x64_linux_hotspot_8u212b03.tar.gz

mac

tar -xf OpenJDK8U-jre_x64_mac_hotspot_8u212b03.tar.gz

Then add to path,
windows,

set PATH=%cd%\jdk8u212-b03-jre\bin;%PATH%

linux

export PATH=$PWD/jdk8u212-b03-jre/bin:$PATH

mac

export PATH=$PWD/jdk8u212-b03-jre/Contents/Home/bin:$PATH

I see the javafx stubs in the folders and the config file so I suspect this sets the stuff?

Should this work as is for mac and linux since they are the same files tar.gz as was used at oracle?

Suggestions on how to implement the checksum for three different environments?

2 Likes

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

Sorry if I am going to throw gas on the fire with this question, but… with JME3’s master branch now being compatable with JDK 11+ (for now), and netbeans 11 now out (my god they are coming out with new versions before the old ones are even stable). How are we going to handle getting a newer JDK version, such as 11, when (if) the SDK gets moved to a newer netbeans version (I heard rumours of netbeans 9?).

1 Like

I can help only somewhat. If people stick to openJDK as in the apache website they are screwed.

Oracle is releasing openJDK versions every 6 months and as soon as one is released they will not update any older versions with bug fixes or anything else.

AdoptOpenSDK will. Here is the release schedule.

This allows for us to slow this crazy oracle stuff down at least.

There currently is no cross platform support for java as of openSDK11unless you have the different computers to build on.

This is supposed to change with openJDK13 but who knows for sure.

AdoptOpenSDK does have the JRE and SDKs and I read they were planning to keep releasing them but if the jpackager works out none of this matters.

Oracles thinking that its gonna hurt no matter what so may as well just get it over with in one swing approach may pan out to be worth it. May of taken three or so years but dragging it out may of been even worse.

Anyway, I feel that everything needs to be moved over to openJDK myself.

I also read that oracle decided that javaFX is dead to them and they are now going back to swing.

But I could be wrong on all of this so anyone please feel free to chime in.

Thank you for the info!

As for JavaFX, JavaFX 12 was just released, but I am not sure if it is part of the OpenJDK or Oracle:
https://openjfx.io/

JavaFX has been moved to a fully open source community driven development model, but there are still Oracle engineers involved in the project. I haven’t heard anything about Swing being further developed - my understanding is that Swing will no longer be developed further and that JavaFX will continue to be developed as a separate release from Java itself.

Where’d you read that? I don’t doubt it, Oracle couldn’t care less about modern looking software that’s actually marketable, and Swing is more mature for their purposes.

But other than being split out of the JDK (which is an annoyance), I haven’t noticed any major issues yet. There’s even a nice Gradle plugin now which is finally getting me to make the jump to Gradle for good.

@danielp Are you sure it’s even Oracle engineerS (plural) supporting JavaFX? I think it’s very few, I know they let one go (who is still involved with JFX independently) and I can only think of one other.

I wouldn’t count on much help from that boat anchor of a company. Pretty sure Oracle doesn’t give a rat’s about Java or anything Java related now.

As for this ridiculous release schedule, I also blame the kids over at Google/Angular for starting stupid trends.

Looks like you’re right - on their “Testimonials” section there are quotes from two Oracle guys: one is the OpenJFX project lead, but the other is in a different division. That’s also assuming the OpenJFX website is up to date.

At any rate, OpenJFX is primarily supported by Gluon now, which relies heavily on it for their core business and seems to be highly engaged in pushing it forward - so even if Oracle did dump it, I don’t think we’d be any the worse off for it! :joy:

I am trying to find the article again or where I read it.

Yes, I don’t think JFX is worse off without Oracle. Gluon is awesome, I just hope they can stay in business long term. (Tell me I’m just being overly pessimistic…)

If it’s not obvious, I’m a little annoyed by Oracle at the moment. I feel like they’ve neglected Java for years, something which should be a drop in the bucket for them to run. At first I figured maybe they’re having financial trouble due to competition with cloud and nosql database tech, and they needed to cut costs, then I glanced at their financial data… now I don’t know what to think.

I guess it doesn’t matter, based on their actions it makes total sense. I mean they couldn’t even be bothered to do sensible updates to their webpage to help people find Scene Builder when they dropped support for that (and of course, Gluon took that over too). I’m just really disappointed at the way the entire industry is trying to go full-web/mobile and do everything it can to kill desktop software. It’s yet to be seen whether web stuff will ever be totally on par. Or maybe I’m just getting old and grumpy.

Anyway, I’ve hijacked the thread enough. Good luck getting the SDK updates figured out, I’ll be one of the lurkers watching. :slight_smile:

2 Likes

I’ll setup the extra rocking chair on my front porch and you can sit with me while we yell at those crazy kids to get off our lawn…

4 Likes

I completely forgot about this post and just saw it. We should definitely make that work and take a look at how this is done in download-jdks.sh

How would you integrate this into SDK because it is a CLI?

https://openjdk.java.net/jeps/343

Include scripts?

It lands with jdk13.

Edit: For the SDK dist, it would be a similar script I would think.

Edit: You would be able to replace all that in download-jdks.sh because it would all be done from jpackage calls then right?