java (Sun and OpenJDK) environments contain bogus XFILESEARCHPATH

Bug #586641 reported by Nonconventionally Creative
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned
sun-java6 (Ubuntu)
Won't Fix
Undecided
Unassigned
Lucid
Won't Fix
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned

Bug Description

Java applications will receive the bogus environment setting
XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat

These override the sane default paths that are otherwise used

Ubuntu Jaunty
openjdk-6-jre 6b14-1.4.1-0ubuntu13
sun-java6-jre 6.20dlj-0ubuntu1.9.04

Ubuntu Lucid
openjdk-6-jre 6b17~pre3-1ubuntu2
openjdk-6-jre 6b18-1.8-0ubuntu1

apt-file search shows no existence of /usr/dt; the app-defaults directory should be something like /etc/X11/app-defaults/%N, with no %L (locale) parameter.
Simply appending ":%D" to the current value of XFILESEARCHPATH would invoke the intended behaviour, just in case that directory ever existed and was needed.

The quickest way to detect the effects of a mis-set XFILESEARCHPATH:
Runtime.getRuntime().exec("xterm");
Note that the ctrl-click menu includes the heading "(no app-defaults)" and the "backarrow" option is checked, causing the backspace to generate the wrong code (might not be noticed immediately since the readline library used by bash is forgiving, but a program that relies on the terminal driver (e.g. cat) or a terminfo-based program will malfunction)

I don't know enough about NLSPATH to determine whether it breaks anything, but I expect it does.

Adam Guthrie (therigu)
affects: ubuntu → openjdk-6 (Ubuntu)
Revision history for this message
Nonconventionally Creative (br-longbons) wrote :

Since it occurred across implementations, I thought at first it might be a configuration problem.
But, the offending strings, and thus the bug, are in jre/lib/amd64/libjava.so, which is also in sun-java5 and the jdk7 snapshot I downloaded a while ago.
(How do I add a package to the bug?)

Revision history for this message
Matthias Klose (doko) wrote :
Changed in openjdk-6 (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

marking the sun-java6 task as wontfix, same as the upstream status

Changed in sun-java6 (Ubuntu):
status: New → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted openjdk-6 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in openjdk-6 (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-6 - 6b20~pre1-1ubuntu1

---------------
openjdk-6 (6b20~pre1-1ubuntu1) maverick; urgency=low

  * Include docs in the -doc package. LP: #600834.
  * Update from the IcedTea6 trunk.
    - Plugin and netx fixes.
    - Don't link the plugin against the libxul libraries. Closes: #576361.
    - More plugin cpu usage fixes. Closes: #584335, #587049.
    - Plugin: fixes AppletContext.getApplets().
  * Fix Vcs-Bzr location. Closes: #530883.
  * Search for unversioned llvm-config tool.
  * Don't set XFILESEARCHPATH and NLSPATH on startup. LP: #586641.
  * Fix chinese font metrics and prefer using 'WenQuanYi Micro Hei' font.
    LP: #472845.
  * Strip libjvm.so with --strip-debug instead of --strip-unneeded.
    LP: #574997.
 -- Matthias Klose <email address hidden> Thu, 15 Jul 2010 12:40:10 +0200

Changed in openjdk-6 (Ubuntu Maverick):
status: Confirmed → Fix Released
Matthias Klose (doko)
Changed in sun-java6 (Ubuntu Lucid):
status: New → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-6 - 6b18-1.8-4ubuntu3

---------------
openjdk-6 (6b18-1.8-4ubuntu3) lucid-proposed; urgency=low

  * Update from the 1.8 branch.
  * Rebuild with fixed ant.
  * Disable building the shark based VM on armel.
  * Always build the ARM assembler interpreter in arm mode.

openjdk-6 (6b18-1.8-4) unstable; urgency=low

  * Update from the 1.8 branch.
    - Plugin and netx fixes.
    - Don't link the plugin against the libxul libraries. Closes: #576361.
    - More plugin cpu usage fixes. Closes: #584335, #587049.
    - Plugin: fixes AppletContext.getApplets().
    - Fix race conditions in plugin initialization code that were causing
      hangs when loading multiple applets in parallel.
  * Fix Vcs-Bzr location. Closes: #530883.
  * Search for unversioned llvm-config tool.
  * Don't set XFILESEARCHPATH and NLSPATH on startup. LP: #586641.
  * Fix chinese font metrics and prefer using 'WenQuanYi Micro Hei' font.
    LP: #472845.
  * Strip libjvm.so with --strip-debug instead of --strip-unneeded.
    LP: #574997.
  * Don't turn on the ARM assembler interpreter when building the shark
    VM.

openjdk-6 (6b18-1.8-3) unstable; urgency=low

  * Update from the 1.8 branch.
    - Plugin fixes. LP: #597714.
  * Add powerpcspe build fixes (Sebastian Andrzej Siewior). Closes: #586359.
  * Work around build failure on buildds configured with low ARG_MAX
    (Giovanni Mascellani). Closes: #575254.
 -- Matthias Klose <email address hidden> Fri, 16 Jul 2010 18:46:47 +0200

Changed in openjdk-6 (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.