Re:What is AT&T doing at 1111340002?
by mavhc on Sunday November 07, 2021 @02:21AM
(#29137268)
Java Card is not very similar to Java, Javascript is more like Java than Java Card is
[ Parent
| on HN ]
Re:What is AT&T doing at 1111340002?
by Aaargh20318 on Sunday November 07, 2021 @03:40AM
(#29137550)
To my understanding it’s an actual subset of Java, a very limited subset, but a subset of the real Java nonetheless. Java Card applets are compiled using a real Java compiler, and then the bytecode is translated into a simplified format for running on the card.
This video from defcon gives a good overview of what Java Card applets is, the limitations and what it can do: https://www.youtube.com/watch?v=31D94QOo2gY
It doesn't resemble JS. It's a JVM/Java subset. You can even write apps using the Java Servlet API with JC 3.x
That's only on JavaCard 3 connected, though – which is dead: https://stackoverflow.com/questions/9546812/javacard-3-in-re...
But I agree – Java to JavaScript is not the best comparison. Maybe a better one would be C programs written for a Unix system vs. C on a microcontroller: Same language; vastly different instruction set, OS and hardware capabilities and APIs available.
Unlike C on microcontrollers, Java Card applications are hardware and OS agnostic, though!
That's what I said, it's so limited compared to Java that saying SIM cards run "a thing like Java" is massively overstating it. It doesn't even have floats.
It's a UICC not a SIM card anyway.