generated jar file problem switching Windows/Linux OS
I encountered a strange situation and I'm struggling myself, trying to understand which is the problem.
I developed a Java application under Eclipse using Swing and jdbc. I exported an executable jar file, created using Eclipse under Windows.
When I execute the exported file under Linux, everything is working fine, (both the gui and the database access) except that the JDialogs that sometimes are displayed, are not showing anymore in Linux. If I generate the jar again, under Linux, (without modifying anything in the s开发者_运维百科ource code) JDialogs begin to work again.
What's the reason for this? It seems that the problem isn't related to my source code, so do I have always to generate again an executable jar for every different operating system? And again, if it is a problem related to the jar building process, why the only problem occurs with JDialogs?
I hope to be clear
thanks in advance to all
Of course you don't have to build on every platform. The idea is to make it once, run everywhere. Are you using the same versions of JDK/JRE on the Windows and Linux machines? Versions of other tools, e.g. Eclipse, Ant?
There are some Components in java swing that have bugs and may not be platform independant.
Perhaps JDialog is one of those bugs.
精彩评论