This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
zero_cool's profile picture

Java API

Started by zero_cool, 16 July 2013 - 07:37 AM
zero_cool #1
Posted 16 July 2013 - 09:37 AM
I need to run some Java code behind a ComputerCraft API. In the Wiki such APIs are mentioned as there are some built-in. Is it possible to simply add an Java API or maybe through a mod for CC? Or can I add a block that can be accessed through the peripherals API and provides API funtions with Java code running behind? Im anything of these is possible, a link to a tutorial would be great :)/>/>

Thanks, Erik.
Lyqyd #2
Posted 16 July 2013 - 11:00 AM
Split into new topic.

You will need to create a peripheral mod. Check out the Peripherals section for more information.
theoriginalbit #3
Posted 16 July 2013 - 11:21 AM
What task is this Java code actually going to perform? Is it for a peripheral mod you're making, or is it just part of a program you're making?
apemanzilla #4
Posted 16 July 2013 - 12:54 PM
Also I think MiscPeripherals has a Java interface planned, not sure how good it would be for this.
zero_cool #5
Posted 16 July 2013 - 04:08 PM
What task is this Java code actually going to perform? Is it for a peripheral mod you're making, or is it just part of a program you're making?

The Java code is part of my program. I need to run quite a lot of Java code. This should then be mapped to lua functions to be able to access it in a normal CC computer.

You will need to create a peripheral mod. Check out the Peripherals section for more information.

Ah, I looked into that forum now. Maybe the wiki should link there :)/>
I will look into the javadoc, shouldn't be too difficult now. Thanks for the hint :)/>
theoriginalbit #6
Posted 16 July 2013 - 04:21 PM
The Java code is part of my program. I need to run quite a lot of Java code. This should then be mapped to lua functions to be able to access it in a normal CC computer.
What functionality does this Java code perform? i.e. Are you just using it for certain libraries, or is it doing some work with the internet and/or a server.

Making a peripheral sounds like the best bet (until more info can be ascertained). But be aware that in order for the functions to be accessible by each computer the peripheral needs to be attached to said computer.
zero_cool #7
Posted 16 July 2013 - 06:26 PM
Yeah, I'm using a 3rd party program. My CC api ist kind of an interface to this.

I know that every computer needs my peripheral block attached but that's not a too big issue, semantically.
theoriginalbit #8
Posted 17 July 2013 - 02:38 AM
Well in that case time to make a Minecraft mod (CC Peripheral).
zero_cool #9
Posted 17 July 2013 - 06:27 AM
Yeah, now I just have to learn how to do that :D/>
The only experience that I have is related to bukkit, but CC isn't that much, is it?