Is there a Java programing interface for VEX?
No the Cortex doesn’t have enough memory to run the JVM.
If only someone made a video addressing the need for a new cortex…
I really hope we get it this year, even an announcement would be great.
I may have heard rumors…
Java Virtual Machine. It’s what runs the Java language on devices it is installed on.
The closer you get to the hardware, the more likely you are to be with a compiled program in C or C++. Java needs more compute power and memory. These poor little ARM controllers are nice but nowhere near what is in your phone processing wise or memory wise.
JVM’s also do garbage collection which means a few milliseconds you normally had in your control loops are now not there. You need multiple cores to handle this so the program can keep doing what you want it to be doing versus housekeeping.
It’s not saying Java can’t be done, it certainly can and is done. You just need a wee bit more power.
Nice article here on IoT which is a nice parallel.
The reason I was asking if Java would work on the cortex, is I am getting started with FIRST, they use Java, and I need to learn it.
Supposedly first has a lot of tools to help you learn to program in their environment.
And at the end of the day, Java is just another high level language. So once you have the main concepts down pat, you shouldn’t have much an issue using it in FIRST. Maybe get some experience using it elsewhere, like writing applications with it?
I may be wrong, but there are LEGO NXT’s that have less processing power than the VEX Cortex’s, and yet are capable of running Java.
Information of VEX Cortex and LEGO NXT:
CORTEX: VEX ARM® Cortex®-based Microcontroller - VEX Robotics
NXT: https://shop.lego.com/en-US/LEGO-MINDSTORMS-NXT-2-0-8547
Video with NXT’s running a program with Java: Lego remote controlled NXT brick programmed in java - YouTube
Am I mistaking anything?
NXT actually has the same RAM and a little bit less program space. The specs are pretty close. Lejos also slows the NXT down noticeably.
Ah, okay, That makes sense since I always wondered why the NXT’s are so slow while I was in middleschool. But I still wonder why the Cortex’s aren’t capable of java while the NXT’s are…
The only thing I could assume is that there could be a different version of Java that the NXT is able to handle.
Well the cortex could handle Java just as well as the NXT can roughly. It is a lot of work to get the JVM running and it would be slower than all the C solutions available. It might not be as slow as the python solution for the cortex but I mean, what is.
I provided a less than complete answer here.
Java comes in a few flavors. Some are so tiny they can fit on a SmartCard.
I don’t know exactly what version of the language / JVM the NXT can run, but it’s likely one of the embedded versions. This is a subset of Java SE which is what everyone writing Java on a computer is used to.
Lol that’s true… But it could afford more educational abilities towards the students, since I am assuming Java is insanely used for everything in our daily lives. I do think that VEX has seriously limited the Cortex and made it basically revolve around really only ROBOTC and EASYC. Maybe they should allow the Cortex’s to have the ability to be Open Sourced for any programming software and any types of inputs or outputs when the student graduates to college for a use of these devices for our daily lives.
Ohhh I gotchu, I am kind of a “new guy” to Java and I didn’t know there was truly different types of versions that I was aware of and I thought everything was just one version xD. Thanks for the response!
Watch my video on the Cortex.