JVM Backwards compatibility not praised enough.
About a couple of weeks ago, while dumbscrolling on my phone, I saw this tweet (aka post) from James Ward on my twitter feed (aka X):
Apparently some people are surprised that you can run a 13 year old self-contained Jar on the latest JVM. And thinking about other language ecosystems, it is actually pretty freaking amazing and not something that we talk about enough.
— James Ward (@_JamesWard) April 29, 2024
To me, it was no surprise that Java has backwards compatibility as one of its multiple selling points. But this tweet (aka post) made me wonder if I could dig up any of my uni projects when I was learning java and if they would still run 🤣 :laughing: .
The language for data structures and the whole degree was C++, but I took one optional course that was about Java. I remember the final project for this course was a game in the form of an applet!!. I did a missile command clone from my intellevision nostalgia, the source code/jar files perhaps is still available on a CD somewhere. The other one I remembered is for compilers course, a swing application that used JavaCC for defining part of the Logo programming language. Just had to find out where it was, I was sure I had it on an external hard drive that included backups from previous machines and the only personal macbook I ever have had, but alas the folder was empty.
Recovering the project from an old email in gmail
Turns out I remembered I had shared the project via gmail to my friend and former classmate, that once send me a twitter dm telling me he had email me asking about this project that we worked together almost at the end of our BS degree.
At that time I still had it, we exchanged comments about politics of our countries and I sent him back the project in a zip file disguised as text file to bypass gmail’s protection for the binary files being sent.
When I went to gmail to try to download the file it was not present. Because the email it’s so old, the only way to download the attachment is downloading the email as eml format. Then use munpack to decode the attachment.
thedude @ slimbookpro ➜ Downloads munpack Pregunta.eml tempdesc.txt: File exists logo.txt (text/plain)
But since I sent it as txt file to trick gmail to allow the zip file back in the day, need to change the content-type of the attachment in the eml file from
Content-Type: text/plain; name="logo.txt" Content-Disposition: attachment; filename="logo.txt"
to
Content-Type: application/x-zip; name="logo.zip" Content-Disposition: attachment; filename="logo.zip"
Running the munpack command with these changes extracts the zip file successfully from the eml file
thedude @ slimbookpro ➜ Downloads munpack Pregunta.eml tempdesc.txt: File exists logo.zip (application/x-zip)
A 23 year old java swing desktop application
The application intended to be an IDE for the LOGO language
We used JavaCC to generate the parser. At least could compile and execute the program, alas not directly from the toolbar as we didn’t know about executing processes at that time. So the execution was on a separate class that had to be executed on a separated java command using the out file.
We used Allaire Kawa as the IDE (it was a big improvement over using Notepad + javac)
The project file had .kpx extension that was just an xml file with an entry for every file, and some sort of run configurations like IntelliJ does, and also defining the famous classpath environment variable.
Funny enough we didn’t use any package, so all classes where on the default package, the source has spanglish and has lots of bugs 🤣🤣
Manifest-Version: 1.0 Main-Class: IDE Created-By: 1.3.0 (Sun Microsystems Inc.)
Comments
To add comments, reply on my Bluesky post