I have a Maven Project that uses java.awt.Desktop
. I'm using it for Google Authentication, so I need some way to open a browser dialog for Google Login, and user confirmation.
I'm exporting that library in a .jar file, that I intend to include it in lots of Liferay Portlets, in WEB-INF/lib
If I test the standalone project, running from the Liferay's Tomcat jre, Everything works fine, and Desktop.isDesktopSupported()
returns true.
When a portlet, deployed on the Same Tomcat, calls the same library function, the Desktop.isDesktopSupported()
returns false.
Since in both cases, I'm using the Same Java Environment, why am I getting a different behavior?
Also, if you know an alternative way to open a browser window instead of using Desktop.browse, it would be nice to share.