Netbeans 10 doesn't run html pages in the browsers

4.3k Views Asked by At

I have Apache netbeans 10 on Ubuntu 18.04 64 bit.

I created a simple html5/javascript project but when I run it in the notification area I have the error:

Cannot run /usr/bin/google-chrome

I have already manually installed chrome netbeans extension but nothing. I have the same problem with Firefox and the default web browser. Which could be the problem?

Finally, when I run the binary file netbeans from shell to open Netbeans I have following warning:

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.netbeans.core.windows.view.ui.MainWindow (jar:file:/home/nick/netbeans/platform/modules/org-netbeans-core-windows.jar!/) to field sun.awt.X11.XToolkit.awtAppClassName WARNING: Please consider reporting this to the maintainers of org.netbeans.core.windows.view.ui.MainWindow WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

Regards

1

There are 1 best solutions below

0
On

Recently I was having the same problem, when trying to run a HTML5 NetBeans-Project using Chrome, on NetBeans 12.0, CentOS7. Here is what I did to be able to run the Site on Chrome through, NetBeans Run's Command-Bar Option.

  1. Select Tools>Options.
  2. On WebBrowser List, select Chrome
  3. Press Edit Button
  4. The WebBrowsers Manager window will open.
  5. In the Process opt., search for Chrome-App. E.g. /usr/bin/google-chrome-stable
  6. In the Argument's Textbox, set: --no-sandbox {URL}
  7. Press OK for each Window until all are closed.
  8. On the Run's Button Bar select Chrome.
  9. Press Run; then Chrome should launch your HTML5 Site.

Note: A warning will be prompted on Chrome due to -no-sandbox param.

enter image description here