Can we create onchain programs in Java Programming Language In Solana? I have been studying about it and saw Rust, C and C++ languages. Can we do it in Java?
3 Answers
On Solana, smart contacts cannot be written using onchain programs. Currently, only C and Rust are supported.
However, you may submit transactions by utilising the Java SDK.
From here
Solana on-chain programs are compiled via the LLVM compiler infrastructure to an Executable and Linkable Format (ELF) containing a variation of the Berkeley Packet Filter (BPF) bytecode.
Because Solana uses the LLVM compiler infrastructure, a program may be written in any programming language that can target the LLVM's BPF backend. Solana currently supports writing programs in Rust and C/C++.
BPF provides an efficient instruction set that can be executed in an interpreted virtual machine or as efficient just-in-time compiled native instructions.