As a JAVA beginner, I tried using GRAL via a tutorial. I came about the following error:
java.lang.RuntimeException: java.io.IOException: Property file not found: drawablewriters.properties
This runtime error came from the following lines of unaltered GRAL source code:
public final class DrawableWriterFactory extends AbstractIOFactory<DrawableWriter> {
/** Singleton instance. */
private static DrawableWriterFactory instance;
/**
* Constructor that initializes the factory.
* @throws IOException if the properties file could not be found.
*/
private DrawableWriterFactory() throws IOException {
super("drawablewriters.properties"); //$NON-NLS-1$
}
/**
* Returns an instance of this DrawableWriterFactory.
* @return Instance.
*/
public static DrawableWriterFactory getInstance() {
if (instance == null) {
try {
instance = new DrawableWriterFactory();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return instance;
}
The class above is reference in another class which is referenced the code that was initially run.
After reading about the keyword super, it seems super would never have a .properties file as an argument when used in a constructor. How does it use a .properties file in this case?
I noticed in the following question that a new InputStream is typically used to extract the contents of a .properties file. Is this somehow done with super?
Also, I simply tried placing drawablewriters.properties in the same directory as the source code above. This didn't work.