5

What issues should be specifically checked for when deploying a server application written in Java (without any specific platform dependencies) that was written and tested on Windows.

Two that I know of:

  1. Case sensitive file names
  2. Available fonts

4 Answers 4

3

Ensure that any third part JAR files you use (such as SWT) have the appropriate platform-dependent version. While you said "without any specific platform dependencies", platform-specific behavior can sometimes be hidden.

Also:

  1. File paths (do you have paths such as C:\Program Files?)
  2. File paths (do you use '/' or '\' or do you use the appropriate constant File.pathSeparator?)
  3. How do you locate important directories such as the user's home directory?
  4. If you're opening sockets below port 1024, will you be the root user in UNIX?
  5. Will you be using the Sun JVM, gcj, or some other JVM? Will differences in implementation or performance affect your application?
  6. Check the JVM release notes (e.g., for J2SE 5 or Java SE 6) for mention of bugs or other behavior differences on your platforms of choice.
1

You'll almost certainly want to set

-Djava.awt.headless=true

in case any libraries try to do any font rendering, image manipulation, or anything else that touches Swing, AWT or ImageIO

1

1) Ensure your JVM's are identical on both platforms. 2) Some level of JVM tuning will likely be necessary. 3) Enable logging of your JVM for a short period of time to determine if you are having any problems.

0

Admittedly not particularly Windows-to-Unix specific, but worth noting based on our experiences:

  • Check the settings in $JAVA_HOME/jre/lib/security/java.security - particularly networkaddress.cache.ttl - the Sun JRE by default will cache DNS lookups forever, which has bitten us and our clients on several occasions. '-Dsun.net.inetaddr.ttl=60' should override it from the command line.

  • Ensure you are running with an adequately sized heap: -Xmx2048m or similar (depending on your app requirements)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .