by Alessandro Ebersol (Agent Smith)
Today we are going to talk about how to make your favorite Java program work. Yes, with the Java updates, many programs have stopped working. Some don't work at all with newer versions of Java.
Let's talk about the progress of the Java language. After all, it is thanks to this progress that many programs have stopped working. One of them is my favorite MORPG.
Progress is not always positive. Sometimes it breaks things that have worked for years.
First, let's check the Java version...
Let's see now, what happens if I try to run my favorite MORPG, Eldevin online, in Java 15.
It stays like that forever, and the game doesn't run.
But, why is that? I'll explain in a moment...
First, we are going to have a little history lesson.
Oracle's purchase of Sun
Oracle bought Sun Microsystems, the creators of the Java language, in 2009 for $7.4 billion. At the time, the statements were as follows:
"The acquisition of Sun transforms the IT industry by combining the best of enterprise software and mission-critical systems," Oracle CEO Larry Ellison stated in an official statement. "Oracle and Sun are industry pioneers and partners. This combination is the natural evolution of the relationship and an event that redefines the industry."
"Java is one of the biggest brands in the computer industry and is the most important Oracle software ever acquired. With the acquisition, Oracle can ensure continued innovation and investment in Java technology for the benefit of customers and the community," the statement said, without citing the consequences for MySQL - the platform acquired by Sun in 2008 for $1 billion.
However, despite the optimistic messages, not everyone was happy with what happened.
So much so that in April 2010, James Gosling, one of the creators of the Java language left Oracle. In his personal blog post in April, Gosling announced his resignation.
As for the reasons, Gosling would only say, "As for why I left, it's hard to answer: Almost anything I could say that would be accurate and honest would do more harm than good."
Other professionals in the area, like Dalton Camargo, developer at JavaBB and founder of the JavaFree.org portal, Sun never gave the proper value to Java, much less the communities that foster it.
According to the developer, Oracle has no charisma in the community and has been showing that it evolves its products without transparency to customers. Besides, Camargo believes that Oracle starts from an unbridled premise for evolutions without harmony, which generates fear in developers.
"We don't know if the technology we are working on today will be discontinued tomorrow without any warning, as has already happened with products such as Oracle WorkFlow that became BPEL, the ADF itself that is now becoming OAF and so on," he adds.
Then, Oracle itself started losing money...
On November 6th, in its 10-Q presentation for Q1 of fiscal 2010, Sun announced a 25% drop in total revenue compared to Q1 of the previous year due to the "economic downturn, the uncertainty associated with our proposed acquisition by Oracle, increased competition, and delays in customer purchasing decisions" - this was Sun's official statement.
Not to mention that the Android operating system used Java for its applications, which led Google to develop its own interpreter (the Dalvik machine) in order not to pay royalties to Oracle, since the Java language had to be licensed for use in mobile applications...
Java Android lawsuit
Oracle has filed a patent infringement lawsuit against Google over its use of Java on the Android platform. Android applications run on the Dalvik Java virtual machine. The apps are written in Java but are compiled in Dalvik's custom bytecode format, which is incompatible with standard Java runtime environments. Google has thus avoided the licensing fees associated with J2ME, the mobile version of Java. However, aspects of the Dalvik system are very similar to the Java technology patented by Sun and now Oracle.
The lawsuit went on for years in the U.S. courts. In 2021 the final verdict came out, clearing Google of copyright infringement and ending the lawsuit.
But, all this brings us to 2019.
2019 and the changes in the Java language license
To protect itself from further cases like the one that occurred with Android, and also to maximize monetization of the Java language, Oracle changed the licensing terms of the language in 2019.
Then, it introduced a new term, for commercial projects. Commercial projects using Java had to pay royalties to Oracle.
So, many companies have not updated their programs to the latest versions of Java, because they fall under the NFTC clause restrictions.
Many programs fall into this category. The Eldevin game client falls into this category, and it has not been updated by Hunted Cow (the company that created the software). I even think that the newer versions of the language have features that could run the game smoothly,
But, copyright issues leave our beloved online RPG out.
Now... What to do???
The answer is to use the open source implementation of the Java language, openJDK.
To do this you should go to: https://jdk.java.net/archive/
At this URL, search for openJDK 10
For PCLinuxOS, download the versions with pre-compiled binaries from the following link
I downloaded it into the Eldevin online game folder. You can download it to wherever your Java program that doesn't work anymore is located.
Then unzip the package, and a jdk-10 folder will appear.
Now you must create a script to run your Java program with the downloaded OpenJDK.
For example;
#!/bin/bash
/home/your-user/your-program/jdk-10/bin/java -Xmx1024M -jar your-program.jar
Save with the .sh extension, give execute permission (chmod +ax) and voila, your program will run via OpenJDK 10 and will not modify the Oracle Java already installed on the system.
Of course, leaving the Java program and the OpenJDK in the same folder was a suggestion - I did it with the Eldevin game and it worked very well. You can put it in any other location you want: you just have to modify the script to call the program.
As an example, here is a video in which I show how to make the Eldevin game work with OpenJDK 10: https://www.youtube.com/watch?v=TXYN8fhXDbo
I hope you enjoy it!
|