I wanted to know if it is possible to include an ObjectDB database file .odb
in a runnable JAR.
The method:
EntityManagerFactory emf = Persistence.createEntityManagerFactory(path);
takes a String path as an argument and not a URL. This means that getResource()
does not work. Neither do getResource.getPath()
and getResource.toString()
work, since they somehow show a distorted path name and during runtime the database file is created outside the jar file.
So I was wondering if it is possible for the .odb
file to be created inside the JAR and be manipulated within the JAR.