Your first bridge¶
In this example, we’re going to use Rubicon to access the Java standard
library, and the java.net.URL
class in that library. java.net.URL
is
the class used to represent and manipulate URLs.
This tutorial assumes you’ve set up your environment as described in the Getting started guide.
Accessing java.net.URL
¶
TODO
Time to take over the world!¶
You now have access to any method, on any class, in any library, in the entire Java ecosystem! If you can invoke something in Java, you can invoke it in Python - all you need to do is:
load the library with ctypes;
register the classes you want to use; and
Use those classes as if they were written in Python.
Next steps¶
The next step is to write your own classes, and expose them into the Java runtime. That’s the subject of the next tutorial.