Search code examples
filemavenniojava-7java-6

Maven repository for java.nio


I am writing an application in Java 6 (I have to stick with this). I need to write a module for file watcher.

After googling around, I found that Java 7 java.nio package is good. I want to import this sub package alone to maven [my repository] and create the module.

Can any one guide me how can i achieve this? is there any maven repo for such sub-modules?


Solution

  • All the java.nio packages are part of the rt.jar of the basic JRE. So they are not present in any other Maven package, since they assume you already have it.

    If you want to use NIO from Java 7, you could package and deploy all or part of the rt.jar as a Maven module onto your own repo, but I wouldn't recommend it.