diff --git a/examples/header.rb b/examples/header.rb
index 18e58dff1d0fd16dc1b2127e8f798ce35f37f77c..8925fbc33a187fb2fe2d3e82b5325d920090a259 100755
--- a/examples/header.rb
+++ b/examples/header.rb
@@ -55,7 +55,7 @@ class HeaderWindow < FXMainWindow
 
     # Document icon
     doc = nil
-    File.open(File.join("icons", "minidoc.png"), "rb") do |f|
+    File.open(File.expand_path("../icons/minidoc.png", __FILE__), "rb") do |f|
       doc = FXPNGIcon.new(getApp(), f.read)
     end