Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Desktop class problem

843807Aug 11 2010 — edited Aug 12 2010
The code below does nothing. No file opened, no exception thrown, no output.
What can I do to discover the problem?
It does indeed execute the desktop.open(file) line.
Using JDK 1.16.0_81
File file = new File(pathAndFileString); // an existing text file
if (Desktop.isDesktopSupported()) {
	Desktop desktop = Desktop.getDesktop();
	if (desktop.isSupported(Desktop.Action.OPEN )) {
		try {
			desktop.open(file);
		} catch (IOException e1) {
			e1.printStackTrace();
		}
	}
	else {
		System.out.println("Desktop.Action.OPEN not supported");
	}
}
else {
	System.out.println("Desktop not supported");
}

Comments

807557
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Usually this kind of error is an indication that both 32- and 64-bit object files are being used in building the application. Use all 32-bit objects or 64-bit objects - please do not mix them during compilation.
--

If building from scratch is not mandatory for you, you can try installing postfix {and other applications, libraries, ..} with the help of Blastwave's 'pkg-get'. Some instrustions are at: http://technopark02.blogspot.com/2005/06/solaris-installing-appspackages-with.html
% pkg-get -a | grep postfix
             postfix 2.2.8,REV=2006.03.13
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 9 2010
Added on Aug 11 2010
8 comments
3,594 views