<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1159</bug_id>
          
          <creation_ts>2015-05-26 14:58:34 +0200</creation_ts>
          <short_desc>AWT-free alternative to java.awt.Desktop.browse(URI)</short_desc>
          <delta_ts>2019-03-27 04:18:33 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Newt</product>
          <component>core</component>
          <version>2.4.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Julien Gouesse">gouessej</reporter>
          <assigned_to name="Julien Gouesse">gouessej</assigned_to>
          <cc>gouessej</cc>
    
    <cc>sgothel</cc>
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4719</commentid>
    <comment_count>0</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-05-26 14:58:34 +0200</bug_when>
    <thetext>AWT has a method that allows to launch the default browser to display a URI. It doesn&apos;t work under GNU Linux with KDE. There is not yet any alternative to this method in NEWT.

The method org.lwjgl.Sys.openURL(String URL) of LWJGL 2 is a good source of inspiration:
https://github.com/LWJGL/lwjgl/blob/master/src/java/org/lwjgl/Sys.java#L232

It uses Java Webstart first and it has several platform-dependent fallbacks. I suggest to modify them a little bit:
- $BROWSER, &quot;xdg-open&quot;, &quot;gnome-open&quot;, &quot;kde-open&quot;, &quot;x-www-browser&quot; or &quot;sensible-browser&quot; under GNU Linux
- &quot;open&quot; under Mac OS X (instead of com.apple.eio.FileManager.openURL())
- &quot;rundll32 url.dll,FileProtocolHandler&quot; under Microsoft Windows
- new Intent(Intent.ACTION_VIEW, Uri.parse(String URL)) and startActivity(intent) under Android</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4720</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-05-26 15:44:56 +0200</bug_when>
    <thetext>XFCE uses exo-open, it should be called if the xdg-utils package isn&apos;t installed.

Maybe &quot;cmd /c start&quot; can be used under Windows:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4843</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-28 14:51:00 +0200</bug_when>
    <thetext>Why shall this feature be part of NEWT?

While I see the short-cut benefits of kicking off a native browser,
I would prefer seeing html[5]/css rendering via OpenGL/Graph
purely performed within Java.

Further, launching an external browser might also be considered a security
risk, since the launch requires privileged mode and the browser itself
cannot be considered secure.

If there are no others liking to introduce this features,
I would like to mark this entry invalid, while open a new bug report
introducing the need for a Java browser using OpenGL/Graph.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4849</commentid>
    <comment_count>3</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2015-07-28 20:06:44 +0200</bug_when>
    <thetext>This kind of feature is commonly used by some major free softwares, for example Notepad++ and TortoiseGit. Numerous Android applications use it too in order to redirect the end users to a website.

Is there a way of providing a safe implementation of this feature? I can implement it (I need it for my own native update system) but I don&apos;t see why it wouldn&apos;t be part of NEWT.

Creating a Java web browser for such a rudimentary need is like using a nuclear bomb to kill a butterfly to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6018</commentid>
    <comment_count>4</comment_count>
    <who name="Julien Gouesse">gouessej</who>
    <bug_when>2017-01-17 15:21:12 +0100</bug_when>
    <thetext>I tried to use JCEF, the build files were half-broken, the source code contained a very few compile errors and there were so much problems that I gave up. It worked somehow in very simple cases but I didn&apos;t find a way of shutting it down cleanly.

I tried gngr too but it doesn&apos;t have enough features, it&apos;s a very poor web browser.

I ended up by using The DJ Project &quot;Native Swing&quot;. It seems to launch a native browser embedded into a Swing component:
http://djproject.sourceforge.net/ns/index.html

If you don&apos;t need to embed a browser in your software, my first suggestions will be enough.

Sven is right, opening a website in the default web browser doesn&apos;t need to be a part of NEWT even though it&apos;s an AWT feature whereas displaying HTML/CSS content within JOGL with the Graph API would make sense.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>