Blog: 2024-10-22: Difference between revisions

From razwiki
Jump to navigation Jump to search
(Created page with "http://jsfiddle.net/uzMPU minecraft javascript rendering demo")
 
No edit summary
Line 1: Line 1:
http://jsfiddle.net/uzMPU minecraft javascript rendering demo
http://jsfiddle.net/uzMPU minecraft javascript rendering demo

Getting the java version to work was quite a journey...

[[File:Screen Shot 2024-10-22 at 7.22.59 PM.png|thumb]]

The final working command:

appletviewer applet.html

Where

<pre>
hack $ cat applet.html
<applet code="M" width="500" height="500"></applet>
</pre>

And the M.class is in the directory.

Along the way, I:

* installed a java decompiler https://github.com/fesh0r/fernflower after http://www.javadecompilers.com/ wanted me to turn off my ad blocker
* installed java 8 in 2 ways, from java.com and from homebrew
* learned how to use the built-in macos tar to extract a rar file

tar -xvf Minecraft 4k.rar

* learned how to use /usr/libexec/java_home to find the location of Java 1.8
* recompiled the decompiled version but got an error because the new class file wasn't compatible with old jre
* learned how to use the java debugger (from appletviewer)

<pre>
hack $ appletviewer -debug M.class
Initializing jdb ...
> run
run sun.applet.Main M.class
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started:
The application exited
</pre>

Feels like retro computing... code that should be in a museum ... something like that.

This is where I got the rar link (a dozen posts down from the top): https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1290821-minecraft-4k-improved-by-crunchycat-download-now

Revision as of 18:34, 22 October 2024

http://jsfiddle.net/uzMPU minecraft javascript rendering demo

Getting the java version to work was quite a journey...

Screen Shot 2024-10-22 at 7.22.59 PM.png

The final working command:

appletviewer applet.html

Where

hack $ cat applet.html 
<applet code="M" width="500" height="500"></applet>

And the M.class is in the directory.

Along the way, I:

tar -xvf Minecraft 4k.rar
  • learned how to use /usr/libexec/java_home to find the location of Java 1.8
  • recompiled the decompiled version but got an error because the new class file wasn't compatible with old jre
  • learned how to use the java debugger (from appletviewer)
hack $ appletviewer -debug M.class
Initializing jdb ...
> run
run sun.applet.Main M.class
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
> 
VM Started: 
The application exited

Feels like retro computing... code that should be in a museum ... something like that.

This is where I got the rar link (a dozen posts down from the top): https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1290821-minecraft-4k-improved-by-crunchycat-download-now