Search code examples
javaandroid-room

Can I use the Room Persistence Library for Java desktop applications?


Is it possible to use the Room Persistence Library from Google's Android Architecture Components in a java desktop application or in other words – as I haven't found anything on that – which things needed to be done and how complicated would that be?


Solution

  • No, you can't. When creating a Room database, you need to supply an android Context, but that does not exist outside of android projects. I would suggest trying an ORM like exposed or ktorm instead