4

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 3

4

At this time the primary onchain program languages are Rust and C/C++.

3

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.