maven - 2 apps in the same JRE, are getting different result from java.awt.Desktop.isDesktopSupported() -
i have maven project uses java.awt.desktop
. i'm using google authentication, need way open browser dialog google login, , user confirmation.
i'm exporting library in .jar file, intend include in lots of liferay portlets, in web-inf/lib
if test standalone project, running liferay's tomcat jre, works fine, , desktop.isdesktopsupported()
returns true.
when portlet, deployed on same tomcat, calls same library function, desktop.isdesktopsupported()
returns false.
since in both cases, i'm using same java environment, why getting different behavior?
also, if know alternative way open browser window instead of using desktop.browse, nice share.
still not sure why it's not working in servlet/portletcontext.
a workaround opening os browser java.lang.runtime, demonstated here
Comments
Post a Comment