0

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

Nick
  • 1,439
  • 2
  • 15
  • 28
  • Your question contains two completely unrelated issues. Please create a new question for the second issue (opening NetBeans from shell), and remove that issue from the question above. – skomisa Jan 10 '19 at 02:59
  • I also get nothing when running the project with the browser set to _Chrome with NetBeans Connector_, but everything is fine when using Chrome or Firefox instead. Can you give more details on how you created your "simple html5/javascript project"? Also, update your question with the URLs shown in the browser when you try using _Chrome_ vs. _Chrome with NetBeans Connector_. – skomisa Jan 10 '19 at 05:42
  • @skomisa I reported the warnings too because I thought that they could be useful to resolve the problem. – Nick Jan 10 '19 at 10:14
  • @skomisa I open the project from file---new project---Html5/javascript---Html5/js Application--no template. There isn't URL in the browser bacause the browser can't be opened from Netbeans – Nick Jan 10 '19 at 10:22

1 Answers1

0

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

ArBR
  • 4,032
  • 2
  • 23
  • 29