« Return to Thread: Netbeans on Linux, need help...

Re: Netbeans on Linux, need help...

by Anthony Richardson-3 :: Rate this Message:

Reply to Author | View in Thread



On Thu, Jul 17, 2008 at 10:22 AM, Lawrensium <lawrensium@...> wrote:

Hi guys,

   I just start to learn RoR and wish to seek some help here. Recently I
try to switch from Windows XP to Ubuntu 8.04. I used Netbeans 6.1 to develop
RoR application on Ubuntu. But I faced some problem with it, which I'm not
sure whether the problem is Netbeans, Ubuntu or Linux specific, because
Netbeans works fine on Windows XP.

1. When I switch to other application, like browser, pdf reader(to read
something) or console. and when I focus back(click on the editor) to
Netbeans, the cursor is there but I can't type anything. I need to click on
other part of Netbeans(says project explorer) then click back the editor,
then only i can edit it. This happen mostly when I switch between programs.

2. In Netbeans, there are times when it will pop up a yes/no confirmation
windows, like when you need to add plugins, or stop the server. And quite
often I got a empty windows(no message nor button) i need to redo the step a
few time in order for a proper windows to pop up.

Do you guys got any problems like that on linux? Please advise. Thank you.

These are common problems to experience and CAN be fixed.

The first problem may be associated with changing NetBeans default widget set to use MToolkit, most likely by setting the environment variable AWT_TOOLKIT=MToolkit .... DON'T DO THIS, there is a bug in Java that causes the behaviour you described when you use MToolkit, they are not planning to fix this. If yuo have deliberately changed this setting then maybe the SDK upgrade mentioned below will help.

The second problem is also a Java issue and related to Ubuntu using the Compiz window manager. The only solution I know of is to install the latest beta of the JAVA SDK from suns website. Steps to do this:

1) Goto: http://download.java.net/jdk6/binaries/ and download the "Linux self-extracting JDK file".This will look something like jdk-6u10-rc-bin-b27-linux-i586-08_jul_2008.bin

2) Rename the file to jdk-6-linux-i586.bin (you must do this for the next steps to work)

3) Ensure that you have the java-package insatlled.
    sudo apt-get java-package

4) Create a DEB package from the sun installer
    make-jpkg jdk-6-linux-i586.bin

5) Install the DEB
    sudo dpkg -i sun-j2sdk1.6_1.6.0_i386.deb

6) Configure the newly install java to be the default
    sudo update-alternatives --config java (here choose the one that points to the JDK you installed probably /usr/lib/j2sdk1.6-sun/bin/java)

7) Configure the newly install java compiler to be the default
    sudo update-alternatives --config javac (most likely the correct one has been already selected, but best to check)

Cheers,

Anthony Richardson

 « Return to Thread: Netbeans on Linux, need help...