Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • Last Modified:

Java font display problem in Windows

This is not a programming question, but there are no relevant Java App troubleshooting categories.

I am running several Java applications that seem to have there own JRE installed. One is the Zend Development Environment and another is the Sun ONE Server Console 5.2 for LDAP management.

When I installed the Server Console both applications began having a font display issue. It seems like the metrics are off completely now. Since I cannot upload screenshots, I will try to describe what is happening. All text in the apps is displayed about 10 pixels above there baselines. This stretches all buttons, labels, text fields, etc. This is annoying at best. At worst, it makes the applications unusable. In several cases it would seem that font metrics are not used, so the fonts are clipped to where you can only see the bottom few pixels of what is being typed.

I have seen no solution that is right on target. Some say modify the font.properties file. This doesn't explain why the Zend app worked fine before and starting having this problem after I installed the Sun app. Also, I am running the current jre 1.4.2_05 but that isn't really relevant either, because I cannot see how to force these apps to use a JRE other than the one that is installed with them.

Also, uninstalling does nothing. It seems that the problem infects a machine. The only way I have been able to get my Zend app to work properly again was to install it on a clean OS.

Please help. Give me anything you can think of.
Thanks,
--brian
0
Brian Bush
Asked:
Brian Bush
  • 3
  • 2
1 Solution
 
CEHJCommented:
>>because I cannot see how to force these apps to use a JRE other than the one that is installed with them.

Start them in the console by using different jres:

<full pathto jre>\java YourApp

and see if it makes a difference
0
 
Brian BushSolutions ArchitectAuthor Commented:
Ok. Good suggestion.

In general terms, these are rolled up as executables and I cannot call them from Java directly, because I don't know which JAR to hit and what flags to use.

That being said, Zend was kind enough to create a batch file:
C:\Program Files\Zend\bin\runStudio_windows.bat

You can repoint it to another JRE and it works great. The next thing I am going to attempt is renaming the jre dirs in these apps to jre.old and installing a new one in their places.

As soon as I verify this solves the issue, I will close the case and award the points.
Thanks,
--brian
0
 
CEHJCommented:
You will probably find it gives you more flexibility if you use a JAVA_HOME environment variable and define the runtime from that. That way you will be able to switch versions without editing hard-coded paths
0
 
Brian BushSolutions ArchitectAuthor Commented:
OK, it worked.
Just to be clear on the fix for these two applications.

First install new JRE. In this case j2re1.4.2_06.

Zend Development Environment (Zend Studio):
Rename C:\Program Files\Zend\jre to C:\Program Files\Zend\jre.old
Copy C:\Program Files\Java\j2re1.4.2_06 to C:\Program Files\Zend\jre

Sun ONE Server Console 5.2:
Rename C:\Program Files\Sun\MPS\bin\base\jre to C:\Program Files\Sun\MPS\bin\base\jre.old
Copy C:\Program Files\Java\j2re1.4.2_06 to C:\Program Files\Sun\MPS\bin\base\jre

Done.
--brian
0
 
CEHJCommented:
8-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now