Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Zen1th

Lukyt - Java on OpenComputers (without mod)

Recommended Posts

A while ago i made a JVM in Lua with the first goal of running Java on OC, just because i like Java and we all know it's a good programming language.

So here's the JVM running a program that fills GPU:

Screenshot_20200515_110611.png.27d1b4cea0566c373c7eb90ca0eaeb29.png

Oops, made a typo.

Screenshot_20200515_114213.thumb.png.14237f8cfb188734952cf06109926e37.png

Ok at first this might not seem impressive at all, but now you can interact with components using Java! That's an awesome thing for Java-ers like me!

Race to first Java OS in OC? Anyone?

Here's the (simple) code i used above

import lukyt.oc.Component;

public class ComponentTest {

	public static void main(String[] args) {
		String gpu = Component.getPrimary("gpu");
		Component.invoke(gpu, "setBackground", new Object[] {0x2D2D2D});
		Component.invoke(gpu, "fill", new Object[] {1, 1, 160, 50, " "});
		System.out.println("Filled screen with RGB 0x2D2D2D");
	}

}

Here's GitHub page (to download and use on your favourite OC computer): https://github.com/zenith391/lukyt

Link to post
Share on other sites

Just updated the Lukyt Java VM for OpenComputers, i updated a few things and now integer, longs and objects can be printed to output stream.

Object hash codes was also fixed.

Link to post
Share on other sites

If you ported Minecraft graphics system (tho rest is prob good) to OpenComputers it could run Minecraft :lol:

Oh and i would also need to make Lukyt run Java 8, shouldn't be that hard, no?

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.