Is there a way to test the JVM version? #1326
Replies: 6 comments
-
Posted at 2019-05-21 by Wilberforce Espruino does not have a jvm. It is not java - it's JavaScript and it's interpreted rather than complied. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-21 by @gfwilliams 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 You can also check with code by looking at |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-30 by Skog 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. http://www.espruino.com/Compilation you can also use C++ source files //#include "jsvar.h" i guess however java is elusive |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-30 by @allObjects ...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?) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-06-01 by Skog it is a form of library building - i was in the mood for java |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-06-03 by @gfwilliams 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? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-20 by Skog
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)
SKOG
Beta Was this translation helpful? Give feedback.
All reactions