mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 05:10:55 +00:00
ffi: support for java native functions
This commit is contained in:
10
examples/java.pork
Normal file
10
examples/java.pork
Normal file
@ -0,0 +1,10 @@
|
||||
func java_system_err()
|
||||
native java "java.lang.System:static-getter:err:java.io.PrintStream"
|
||||
|
||||
func print_stream_println(stream, line)
|
||||
native java "java.io.PrintStream:virtual:println:void:java.lang.String"
|
||||
|
||||
export func main() {
|
||||
let error = java_system_err()
|
||||
print_stream_println(error, "Hello World")
|
||||
}
|
Reference in New Issue
Block a user