public class PropHolder {
public static Properties prop;
static {
//code for loading properties from file
}
}
// Referencing the class somewhere else:
Pr
You are getting a java.lang.NoClassDefFoundError
which does NOT mean that your class is missing (in that case you'd get a java.lang.ClassNotFoundException
). The ClassLoader ran into an error while reading the class definition when trying to read the class.
Put a try/catch inside your static initializer and look at the exception. If you read some files there and it differs from your local environment it's very likely the cause of the problem (maybe file can't be found, no permissions etc.).