Are you talking about Windows property on a specific file when you right click on it using Explorer?
If so, you need to use the Java API for file attributes, precisely UserDefinedFileAttributeView
.
You can use this view to write any property you may want on a specific file.
Path path = FileSystems.getDefault().getPath("C:/file.txt");
UserDefinedFileAttributeView view =
Files.getFileAttributeView(path, UserDefinedFileAttributeView.class);
view.write("classification_of_file", Charset.defaultCharset().encode("sensitive"));
You can also call FileStore.supportsFileAttributeView()
to check if your file system supports it.
You will find more explanations on file attributes in the Java documentation.
As for the second point, I don't know Apache Jackrabbit so I can't help you that much.