Live data from Hacker News

I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

github.com

161–170 of 193 posts

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#161
post #135

Earlier quoted context omitted.

I don't even know what Java 6 means. Last time I wrote something in Java it said Java 1.5 compiled Java class data, version 49.0 (Java 1.5)

They rebranded Java 1.x as Java SE x, then later just Java x.

No, it's way more confusing than that.

They started with Java 1.0 and 1.1 - then to "Java 2" at version 1.2, so you have Java 2 version 1.2 ... they then stuck with that through the version after 1.4 - but rather than 1.5, that was special as it was Java 2 version 5.0 ... thereafter they're just numbered with the plain number.

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#162
You can download the old Java build system, Apache Ant, from 2003 and it still runs without issue:

https://archive.apache.org/dist/ant/binaries/

Download the bin.zip distribution, unzip it, then run this comand:

    java -cp "lib/*" org.apache.tools.ant.Main 
It runs on Java 21 without issues :D.

Java is like Windows: it can run stuff written for it forever.

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#163

Earlier quoted context omitted.

They rebranded Java 1.x as Java SE x, then later just Java x.

No, it's way more confusing than that. They started with Java 1.0 and 1.1 - then to "Java 2" at version 1.2, so you have Java 2 version 1.2 ... they then stuck with that through the version after 1.4 - but rather than 1.5, that was special as it was Java 2 version 5.0 ... thereafter they're just numbered with the plain number.

So that's where the 2 in J2ME comes from!

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#164
post #123

Earlier quoted context omitted.

It's been standard practice for a very long time to use the Gradle wrapper, which fixes the Gradle version, so there really shouldn't be a problem building an old project. Making changes to one is indeed fraught.

You're right that including the Gradle wrapper is a common good practice for years. But if you have to or want to move to a newer Gradle version than you can enjoy the full randomness of the domain specific language from Gradle itself and from a thousand plug-ins.

Exactly, if you have a very old Gradle project, it's best to use the wrapper to keep running with the version of Gradle it was written for, and make sure to use a compatible JDK to compile with (older Gradle versions won't work on new Java versions, which goes against most Java code which will almost certainly run forever even if written for Java 1.1).

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#165
post #87

Earlier quoted context omitted.

The rise of the web? In the past 13 years? Gosh does that make me feel old...

Shit, I learned to program before there was Google .

Reminds of a random comment or tweet I read somewhere where the person said their young children just couldn't believe she was so old that she was born before Google existed :D they just couldn't believe her :D so cute.

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#166
post #92

I found mine too, archived in 2001, but my browser can't run Java applets anymore. https://web.archive.org/web/20010407081008/http://www.multim... In fact I noticed 10 years after the publishing when I tried to run the applet that it didn't even run because the compiler of that time had generated invalid byte code (not caught by the JVM) or that the source code itself was invalid and that had not been caught by the c…

If you want to run your applet today, try CherpJ: https://cheerpj.com/

This should be able to run absolutely any Java in the browser.

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#167

Earlier quoted context omitted.

I think the last breaking change I remember was enumerations being added, which broke any code that used the class name as a variable name. But I could be wrong; it was almost 20 years ago.

Thread#stop no longer works as of at least Java 21.

True, I think since Java 17 they have been removing really obsolete stuff.. I think that's when they removed CORBA from the JDK as well (though you can still get it as a library I believe). Same with Nashorn (the JS runtime).

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#168

Earlier quoted context omitted.

I think the last breaking change I remember was enumerations being added, which broke any code that used the class name as a variable name. But I could be wrong; it was almost 20 years ago.

With Java 11 they hid a lot of internal functions that people had used in their code, so breaking things. But that was never really part of the public API, so strictly not a breaking change. I remember moving to Java8 changed the iteration order of hashmaps etc, which also broke some stuff for us. But again, that was mostly our fault for relying on unspecified behavior.

With Java 11 they only hid it, you just need to pass some parameters to get it working. When it truly broke, I believe, was only on Java 21, which finally removed some clutches people had been using to work around the new limitations.

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#169

What a strong ad for Java

Except now a days you're not encouraged to run a system-wide JVM! You can still download a JVM for Java 21, but it's from weird third parties like Adoptium

That's bullshit.

Here are the JDK distributions supported by SDKMAN, a really good JVM-oriented package manager: https://sdkman.io/jdks

There's a couple of dozen vendors in there , including very weird ones like IBM, Microsoft, AWS, Azul, Eclipse, SAP, Redd Hat, and even... Oracle!

Re: I found one of my first programs (Java, 2011) on the Wayback Machine and it runs

#170
post #79

Not to be snarky but 2011 is yesterday for programming, no major shift. I'd imagine almost all code written there would be able to run today.

In the Java world, sure. Other programming language ecosystems tend to have tons of churn. For an anecdote, every TypeScript project I find from 2021 or earlier is simply impossible to build nowadays, meanwhile the ClojureScript code I dealt with in a previous job was able to survive 8 years worth of updates to libraries and the core language. I frequently ran into code that was last modified around 2013 because it j…

The snarky response would be that TypeScript and Go are not industrial strength languages :)

C++, C, even Fortran run just fine after decades.

Post reply on HN