-
Bug
-
Resolution: Not an Issue
-
P3
-
6, 6u2
-
x86, sparc
-
solaris_2.5.1, windows_xp
OPERATING SYSTEM(S):
--------------------
Windows XP Professional SP2
FULL JDK VERSION(S):
-------------------
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b04)
Java HotSpot(TM) Client VM (build 1.6.0_02-b04, mixed mode)
DESCRIPTION:
------------
PROBLEM DESCRIPTION
Opening an MP3 file using Desktop.open() failed with IOException.
Note: problem is seen only on some machines (Where winamp is not available as default mp3 player and windows media player is the only player by default available for mp3 files).
Exception details are below:
java.io.IOException: Failed to open file:/C:/hello.mp3. Error mess
age: The system cannot find the file specified.
at sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:59)
at sun.awt.windows.WDesktopPeer.open(WDesktopPeer.java:36)
at java.awt.Desktop.open(Desktop.java:254)
at DesktopOpen.main(DesktopOpen.java:14)
TEST CASE:
import java.awt.Desktop;
import java.io.*;
class DesktopOpenTest {
DesktopOpenTest()
{
}
public static void main(String args[])
{
if (args.length <= 0) {
System.out.println("usage: java DesktopOpenTest <filename>");
System.exit(-1);
}
Desktop desktop = null;
if (Desktop.isDesktopSupported())
desktop = Desktop.getDesktop();
else
System.out.println("Desktop is not supported on this platform");
try {
desktop.open(new File(args[0]));
} catch (IOException ioexception) {
System.out.println("Desktop open failed with IOException");
ioexception.printStackTrace();
}
}
}
--------------------
Windows XP Professional SP2
FULL JDK VERSION(S):
-------------------
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b04)
Java HotSpot(TM) Client VM (build 1.6.0_02-b04, mixed mode)
DESCRIPTION:
------------
PROBLEM DESCRIPTION
Opening an MP3 file using Desktop.open() failed with IOException.
Note: problem is seen only on some machines (Where winamp is not available as default mp3 player and windows media player is the only player by default available for mp3 files).
Exception details are below:
java.io.IOException: Failed to open file:/C:/hello.mp3. Error mess
age: The system cannot find the file specified.
at sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:59)
at sun.awt.windows.WDesktopPeer.open(WDesktopPeer.java:36)
at java.awt.Desktop.open(Desktop.java:254)
at DesktopOpen.main(DesktopOpen.java:14)
TEST CASE:
import java.awt.Desktop;
import java.io.*;
class DesktopOpenTest {
DesktopOpenTest()
{
}
public static void main(String args[])
{
if (args.length <= 0) {
System.out.println("usage: java DesktopOpenTest <filename>");
System.exit(-1);
}
Desktop desktop = null;
if (Desktop.isDesktopSupported())
desktop = Desktop.getDesktop();
else
System.out.println("Desktop is not supported on this platform");
try {
desktop.open(new File(args[0]));
} catch (IOException ioexception) {
System.out.println("Desktop open failed with IOException");
ioexception.printStackTrace();
}
}
}
- relates to
-
JDK-6508888 Desktop.browse("file:///C:/Foo.txt") does not work on Windows
-
- Closed
-
-
JDK-6575098 UIMM: Desktop print failed when printing bmp image
-
- Open
-
-
JDK-6704972 Desktop.browse() not working correctly with image files
-
- Open
-