This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 234292 - Netbeans hangs when pasting clipboard content in external software
Summary: Netbeans hangs when pasting clipboard content in external software
Status: RESOLVED DUPLICATE of bug 233557
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-12 21:51 UTC by Remdul
Modified: 2013-08-21 10:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remdul 2013-08-12 21:51:00 UTC
Netbeans 7.3 hangs when pasting clipboard content in external software, such as Firefox or Gedit. Very bad!

Steps to reproduce:
1) click Help > About
2) select the system/version info text at bottom, press Ctrl-C
3) run Gedit/Firefox etc, paste
4) Netbeans now hangs, nothing is pasted

Netbeans must be manually terminated, and as such, project, changes to unsaved files and clipboard contents are lost.

For example, to retrieve the info below, I had to paste the content in a file in my project, save that, open the document in Gedit to paste it in Firefox. So, pasting text to Netbeans itself is not affected. Pasting text from external software to Netbeans is neither a problem.

Consistently reproducible on two distinct machines, one running Linux Mint 13 XFCE, the other Ubuntu 13 (GNOME Classic).

No known workarounds.

Info blurb:

 Product Version: NetBeans IDE 7.3 (Build 201302132200)
 Java: 1.6.0_27; OpenJDK Client VM 20.0-b12
 Runtime: OpenJDK Runtime Environment 1.6.0_27-b27
 System: Linux version 3.2.0-23-generic running on i386; UTF-8; en_US (nb)

PS: bug tracker suggestion; add a category for clipboard related bugs. This bug is not limited to editor copy/paste, it applies to the whole IDE.
Comment 1 Remdul 2013-08-15 11:56:40 UTC
It appears a recent update to the OpenJDK-6 is to blame. I now have a workaround:

1) install OpenJDK-7 [1]:

 sudo apt-get install openjdk-7-jre

2) edit your netbeans.conf [2] to update the path to the new Java libraries
 In netbeans.conf you will find a line saying something like this:

  netbeans_jdkhome="/usr/lib/jvm/default-java"

 (NOTE: on some systems you might alternatively find this file in /usr/local/netbeans-7.0/etc/netbeans.conf)
 Replace this with the path of the OpenJDK-7 new path. For me it became this:

  netbeans_jdkhome="/usr/lib/jvm/java-7-openjdk-i386"

3) Start Netbeans as usual, problem should now be solved!

References:
[1] http://openjdk.java.net/install/
[2] http://www.techytalk.info/netbeans-cannot-find-java-please-use-jdkhome-switch/


I found while looking for a solution to another bug (#234290) I reported. I would suggest to Netbeans developers to add a startup check to detect a bad JDK version and display a warning to the user.
Comment 2 Remdul 2013-08-15 12:40:43 UTC
Noticed I forgot to add the path at step 2, it should be this on Ubuntu or Mint:

 /home/<USERNAME>/netbeans-7.3/etc/netbeans.conf

You may need super user privileges if the file is located elsewhere (sudo).
If you really can't find it, enter the command "locate netbeans.conf" in a terminal window. Likewise, to find the location of the JDK, type "locate java-7".
Comment 3 Antonin Nebuzelsky 2013-08-21 10:50:54 UTC

*** This bug has been marked as a duplicate of bug 233557 ***