public class PropHolder {
public static Properties prop;
static {
//code for loading properties from file
}
}
// Referencing the class somewhere else:
Properties prop = PropHolder.prop;
class PropHolder
is a class of my own. The class resides in the same JAR file of the main class. So that should not because any JAR is missing from classpath.
When I look in to the JAR file by jar tf myjarfile
, I can see the PropHolder.class
listed there.
Btw: the code is running fine on my local machine. But couldn't work when I deploy it with some script onto a Linux server. So I think it is not the problem of the code.
But for some reason. the deploy process is very hard to track.
What could be the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…