Adding java backend to SwiftUI

Hi I just started using SwiftUI and I wanted to ask if there was a way to include java code with my app.

I have a java program that takes in an input and then outputs a result. Is there a way to have Swift send the input as a variable and for the output to be stored somewhere when the Java program runs?

I wonder if grpc could solve this.

I too am looking for this, because unlike swift which is open source and available on all major platforms(apple, linux and windows), swiftUI is compatible only with apple.

Adding java backend to SwiftUI
 
 
Q