is there something like .dll or .so, but cross-platform?
DLLs are Microsoft's implementation of the idea of a "shared library." You can only use them on platforms that, in some fashion, implement support for them. In general, this means that no, you can't just take the DLL files you have and use them on Android, or on a macOS installation, or whatever. Now, things like .
you can not write platform independent dlls. They depend on the architecture (x86 or x64) and only work on windows.
The Java analog to a DLL is the . jar file, which is a zip file containing a bunch of Java . class files and (perhaps) other resources. See Sun's, er, Oracle's documentation. Copy link CC BY-SA 2.5.
A Dynamically Linked Library (DLL) is a library that can be shared by several applications running under Windows. A DLL can contain any number of routines and variables. One advantage of DLLs is that you can change and enhance them without forcing all the applications that depend on them to be relinked or recompiled.
Java .class files and .jar archives will fulfil this requirement, as will .Net assemblies running under Mono.
A universal executable format? No.
That's the whole reason for the existence of virtual machines (java) or IL (.Net) - so the same source code can be compiled into a universal intermediate language, that can then be executed by the framework in the underlying system bytecode without the programmer having to know the differences between the systems.
In practice, the VM has to be consistently implemented on all platforms.
not for c/c++ AFAIK, java has .jar files that are sort of analogous though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With