Is there a way to test the JVM version?

Posted on
  • So i am thinking of embedding the makeFile with java instead of C++ structures. However before I start i would like to verify and update the JVM on my Pico board.

    The other question is would i loose the built in operators like the temperature readings and E.(scripting)


  • Espruino does not have a jvm. It is not java - it's JavaScript and it's interpreted rather than complied.

  • I'm not sure I really understand the question here - as mentioned there's no JVM, just the JS interpreter.

    However the version number is shown at boot time, or after a call to reset() - if you just upload some code with the Web IDE you'll see the version after the Espruino logo.

    You can also check with code by looking at process.env.VERSION

  • sure, that makes sence. and it is how i am using the little thing, however it is mentioned that we can compile code for it.

    you can also use C++ source files

    //#include "jsvar.h"

    i guess however java is elusive

  • ...not exactly w/ include... except you build the firmware.

    But you can have C source embedded in your javaSCRIPT code that you upload from the Espruino IDE. The IDE detects that you have (C) code that you want to have compiled, and it will do so upfront and wrap it into some javaSCRIPT wrapper so you can invoke it from your javaSCRIPT application code...

    See the code example in conversation about Efficiently moving things around in zig-zag Graphics buffer visualized w/ 24/32 bpp displays / neopixel strings that uses inline C compiled to to some memory manipulations in a much speedier way as javaSCRIPT ever can do. The inline C code is specified in post @2 in lines 79..106. You can use all that C can do, but you cannot pull any libs or give other directives. Something like that needs a different compilation service environment and feed from the client as setup right now. (May be this is an extension you want to spearhead?)

  • it is a form of library building - i was in the mood for java

  • Trying to 'compile in' Java could be problematic - but I believe Google has a tool for compiling Java code into JavaScript - so that might be an interesting start?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Is there a way to test the JVM version?

Posted by Avatar for Skog @Skog