In this class, I need to read *.properties
files that are in another folder / project package. The folder structure is this:
util → properties (here are the .properties)
util → server → queries (here is the class that will read the .properties)
package util.server.consultas;
import java.io.File;
import org.restlet.Response;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
public class ConsultasResource extends ServerResource {
@Get
public Response returnConsulta() throws Exception {
File dir = new File(getClass().getResource(/*Como proceder aqui?*/"").toExternalForm());
return getResponse();
}
}
Is there any way that this method can work if I extract the file to .jar?