3 Replies Latest reply: Dec 6, 2008 1:24 PM by 843793 RSS

    Filer.createResource ignores directory part of relative URI

    843793
      My annotation processor tries to create an output file called META-INF/persistence.xml in the classes output directory (i.e. -d option to javac). So, I wrote following code:
      final FileObject fo = processingEnv.getFiler().createResource(
      StandardLocation.CLASS_OUTPUT, // -d option to javac
      "",
      "META-INF/persistence.xml",
      null);
      This works as long as I pass -d option to javac. e.g., if I invoke:
      javac -d . Foo.java
      it creates *./META-INF/persistence.xml*. But, if I invoke
      javac Foo.java
      it creates *./persistence.xml*; where is my META-INF directory gone?

      Sahoo