Java – Word Wrap in Net Beans

idejavajavabeansnetbeans

Netbeans is great but there's no way to wrap text in it (or hopefully I haven't found it yet). Is there any way to do this, and if not, is there any similarly good IDE for Java with this functionality (hopefully free as well).

Best Solution

You can use word wrap in Netbeans.

Add the following to netbeans.conf (netbeans_installation_path/etc/netbeans.conf, by default /etc/netbeans.conf under linux):

-J-Dorg.netbeans.editor.linewrap=true

to the sixth line so it looks like this:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dorg.netbeans.editor.linewrap=true"

and restart Netbeans.

Set the Line Wrap option in Tools->Options->Editor->Formating.

Works fine for me in Netbeans 6.9 and 7