lainchan / Ω
(untitled)
Joey · 2022-04-21 22:59
Not many devices run the JVM anymore, do they? Even feature phones run Kai OS now, which is all JS. I miss the days when Java was truly cross-platform, honestly. It never merited the hate it got, I'll easily pick the JVM with languages like Java, Clojure, Scala, Kotlin, etc. over one dominated by JS.
I guess my question is, does the JVM have a future?
Ishikura "Tatsu" Tatsuhiko · 2022-04-22 01:13
>>59638
Many companies still use it, same for google for example. I honestly fail to think any language that has been used a lot will ever die(Fortran and COBOL are still being used, for example).
Noodle Soup -1/7 · 2022-04-22 05:31
>>59638
Amazon's kindle paperwhite (their e-ink book readers) run java. There are a lot of Enterprise servers running java too. It's definitely not dead.
But i wish the web used less JS and more server-side rendering coded in java.
Ivan Petrov · 2022-04-22 05:37
>>59639
Well, Java IS the new COBOL after all...
Miho Iwakura · 2022-04-22 10:55
Why didn't you use the existing thread? >>28096 or >>16855
>>59638
>I guess my question is, does Java have a future?
Yes, since a lot of legacy applications (mainly business apps and Android apps) use Java.
Yamaoto Toshi · 2022-04-22 21:16
>>59642
I guess I should have specified I'm talking about the future of the JVM in particular moreso than the language. For example, Android apps don't use the JVM even though they can be written in Java.
As >>59640 the Kindle *does* run the JVM still, which I overlooked, but it seems the dream of the Java Virtual Machine running everywhere, and cross-platform software being written for it, is dead.
Anyone disagree?
queue · 2022-04-22 23:26
>>59643
As X86 dies, the dream of an ultra RISC zero adress machine will become a reality, but it's going to be something closer to ARM assembly. On CISC hardware it seems too wasteful.
XERXES · 2022-04-23 00:54
>>59644
Why do you think that?
Chani · 2022-06-28 16:12
>>59645
Not the anon you responded to, but it's probably because of the stupidly complex instruction set, hence the name. X86, for example, has many dedicated operations for moving values (cmpxchg, movq2dq etc.) that have extremely few limited use case and programming language compilers fail to make use of.
Zero Cool · 2022-06-28 19:07
>>59638
The main use-case for Java and C# have always been enterprise apps (where slow startup times don't matter) and web browser applets (when they were cool). The Write Once, Run Everywhere (more like "Write Once, Debug Everywhere") is not true for non-trivial programs (and never has been).
H.R. Giger · 2022-06-28 23:30
>>59638
Minecraft was made in Java.
Runescape was made in Java.
A lot of amazing programs in all areas are made in java, java also teaches people how to use their programming language and libraries quite effectively.
I do not see java dying anytime soon.
Unnamed · 2022-06-29 01:21
>>61279
Minecraft is over a decade old and was rewritten in C++ (see: Bedrock Edition). OSRS is prehistoric and RS3 is probably close to a decade old at this point.
>>59641
>Well, Java IS the new COBOL after all...
When the massive decline of the JVM finally happens as we move to RISC and create newer technologies, it's going to be 'adapt or die' for a lot of languages that are built on the JVM.
SHODAN · 2022-06-29 04:21
>>61280
>Minecraft is over a decade old and was rewritten in C++ (see: Bedrock Edition)
The bedrock edition is worse though in everything besides . And it never got such a good modding scene as java one. Probably because of how easy jvm programs are to reverse compile.
Agent Jones · 2022-06-29 09:36
Can someone inform me on graalvm native images ?
I'm learning java and I would like to write a program that compiles to a binary but it seems rather complicated.
藤原純一 · 2022-07-03 09:49
>>61290
I've only used GraalVM to compile simple CLI programs. You need to download the GraalVM runtime, and also the Native Image component. Then, point your IDE to use the GraalVM runtime as a compiler, instead of the usual JDK. And if you happen to use Maven in your project, append this to the <profiles></profiles> section:
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.5</version>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<imageName>myapp</imageName>
<mainClass>myapp.Main</mainClass>
<buildArgs>
<buildArg>--no-fallback</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Then, you can run the "native" Maven task to build a standalone binary. Beware, for a simple CLI app that's about 5 kB JAR size, the native binary will be sized about 10 MB.
Cutter · 2022-07-03 11:26
>>61284
>Probably because of how easy jvm programs are to reverse compile.
this is a very hilarious side effect of using Java
Emmanuel · 2022-07-03 12:11
>>61284
They even provide the obfuscation mappings themselfs, hell both forge and fabric exist because of this, its practically pseudo-opensource at this point.
Lord Nikon · 2022-07-03 14:22
>I miss the days when Java was truly cross-platform, honestly.
>t. java bot churned out of college
just about every language i've used is cross platform
Elliot Alderson · 2022-07-03 20:12
>>61410
Forge and Fabric existed long before Mojang released their official mappings. Remember MCP?
Morpheus · 2022-07-03 20:39
>>61410
also bukkit. literally just a modified decompilation of mojang's binaries.
Agent Richard Gill · 2022-07-05 13:42
>>61418
Sure, but Java's VM makes it the easiest to WORE, and used to be in absolutely everything.
Nobody important · 2022-07-05 13:59
>>61424
The oldest versions don't even have obfuscation, Notch literally named the classes after the alphabet, literally [a,b,c ... n].class
Undisclosed · 2022-07-05 16:51
>>61489
You may find it interesting to know that the main "deobfuscate" program used, at least back when I was working on runescape private server dev, did this for all things Java. So, it may just be that someone used that tool on minecraft.
Cutter · 2022-07-05 17:12
>>61491
yea but i checked in the jar itself because jar's are just zip files and vim has a neat utility which lets you check zips, it had inside of it png's and a singular .gif, i know that not all of them were this some had minecraft in the name so yea, it might or might not be, can't determine since i don't know Notch personally and i don't think anyone here does either.