0
In this class, I need to read files *.properties
that are in another project folder/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();
}
}
And there is the possibility that this method might work if I extract the file to . jar?
I’m using the Restlet library. It’s kind of similar.
– mutlei