title: How To Export A Windows Registry File Using Java
body: <p>How can one export and import a .reg file which contains all keys and subfolders just like the registry editor export function?</p>
  
  <p>I've seen various suggestions and libraries e.g. <a href="https://stackoverflow.com/questions/62289/read-write-to-windows-registry-using-java">here</a>.</p>
  
  <p>They only read / write keys by name which doesn't help with many or varying entries. Can it be done using the <a href="https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.1.0/" rel="nofollow noreferrer">jna library</a>?</p>