Thufir | 1 Jun 04:01
Picon
Gravatar

installing

It seems that the binary shell script on the NB site installs is 
preferable to using a package manager (yum, apt, emerge).  Is this the 
consensus?

Can you take that shell script and turn into, for instance, an RPM file, 
and would this be a good idea?

-Thufir

Annotation Processing in netbeans: How to do it?

Is netbeans even JSR269 compliant? I can't seem to make netbeans run  
my annotation processors. So far the only way they are run is if  
netbeans invokes ant, which isn't really helpful; I want the errors  
and warnings generated by the processor to be reflected in the editor,  
not in a text font using ^^^ to crudely mark the problem site,  
obviously.

I've added the jar that contains the annotation processor, as well as  
a spi file so processor discovery can find it, in the 'compile'  
section of library dependencies, and I've confirmed that the processor  
DOES run when ant gets invoked, either when building the project or by  
selecting the 'compile' option in the run menu. I'm using a dummy  
processor, very simple - it just sticks a warning on any field with a  
dummy annotation on it, so I can confirm that its working. No luck.

  --Reinier Zwitserloot

alon | 1 Jun 05:41
Picon
Favicon

Error message when using Python

It was just setting the python to be the default...

Thank you so much,

You made my day,

I can start working :)

meatball | 1 Jun 06:03
Picon
Favicon

Database Application shell missing?

Hi,

I'm trying to teach myself how to work with MySQL databases using NetBeans, and I've run into a problem right
out of the gate. 

I'm able to connect to MySQL to create and manipulate databases, but when I try to start a New Project, and
choose Java > Desktop Application, and hit next, on the second page, where according to everything I've
read, including the included help file, the options under "Choose Application Shell" should include a
"Database Application" option. This option seems to be missing from my install, as all I am able to see is
the "Basic Application" option. 

There is probably something really simple here that I can toggle, but I haven't been able to find it, and
Google has not been my friend today. Can anyone help me?

Dale Harris | 1 Jun 09:16
Picon

String handling

Hi,

 

I appear to have a simple problem which doesn’t work for some unknown reason.  I’ve included my method where I’m having problems.  For some reason the commented line does not work.  Neither does the line above.  The length of the string is returned correctly, but if I output the contents of the string, it still includes the part I’m trying to remove.  Does anyone have any ideas?  I’m using NetBeans 6.5 with Java 1.6_13

 

  public String[] getText(boolean wait) {

 

    if (this.isConnected()) {

      if (wait) {

        waitForReady();

        telnetOption.clear();

        System.out.println("reset TelnetOptions");

      }

 

      try {

        InputStream in = getInputStream();

 

        byte[] buff = new byte[in.available()];

        int read = in.read(buff, 0, buff.length);

        if (read > 0) {

          String s = new String(buff, 0, buff.length);

          if (loginStatus == LoginStatus.LoggedOut) {

            String t = s.replaceFirst("[\\r\\n\\s]*", "");

            if (t.length() > 0) {

              t = t.substring(0, t.indexOf("\r"));

              if (t.matches("telnet\\s*\\(.*\\)")) {

                messageAYT = "\r\n" + t.replaceFirst(".*\\(", "").replaceFirst("\\).*", "") + " here\r\n";

              }

            }

          }

          if (wait) {

            if (s.endsWith(messageAYT)) {

              s = new String(buff, 0, s.length() - messageAYT.length());

//              s = s.substring(0, s.length() - messageAYT.length());

              if (s.length() > 800) {

                System.err.println("AYT: " + messageAYT.length());

                System.err.println("s: " + s.length());

                System.err.println("buff: " + buff.length);

                System.err.println(s.substring(900));

                System.err.println("s: " + s.length());

              }

            }

          }

          buffer.append(s);

          int len = buffer.length();

          if (len > maxBuffer) {

            buffer.delete(0, len - maxBuffer);

          }

          String[] lines = s.split("(\\r\\r\\n|\\r\\n|\\r)");

 

          System.out.println();

          for (int i = 0; i < lines.length; i++) {

            System.out.println(lines[i]);

          }

 

          return lines;

        }

      } catch (Exception ex) {

        ex.printStackTrace();

      }

    }

 

    return null;

  }

 

 

Regards,

 

Dale Harris

Dmitry Lipin | 1 Jun 10:32
Picon

Re: Need Help Installing NetBeans

HunkZeus,

Could you please run installer with "--verbose --output out.txt" 
arguments and post here the last ~100 lines of the out.txt file?

Dmitry

HunkZeus wrote:
> [size=12]Hello guys, 
>
>
>
>          I tried installing net beans 6.5.1 version on my system (VISTA 32 bit) but  i just see the first dialog box of
"Configuring the Installer" and then nothing happens .. I do have jdk latest version installed. Do you
guys have any idea as to what i should do in order to install NetBeans.. I am really in need of it..
>
>
>
> Thanks ...Any related suggestions appreciated.[/size]
>
>
>
>
>   

--

-- 
Dmitry Lipin
NBI Team Lead
Sun Microsystems, Inc.
Phone EMEA/APAC x33354 AMER x7033354
Email: Dmitry.Lipin <at> Sun.COM

baliganikhil | 1 Jun 08:50
Picon

Set Selected Text...?

Hello,

   I am new to java programming. I have a requirement, where in I have a text box (GUI using swing) and I have a
button. When I select some text in the text box, and click the button, the selected text should be replaced
by some other text. 

   Getting selected text is as simple as getSelectedText() but I was wondering how to set selected text.
Please help.

                                        Regards,

                                                                                Nik

------------------------
I like my cup of coffee only when it's strong and hot

Chabier | 1 Jun 09:48
Picon

Problem with debugger

Do you have checker the debug.classpath ¡in the project.properties file?

Chabier | 1 Jun 10:19
Picon

Scanning projects

Also you can try this:

http://wiki.netbeans.org/ScanOnDemand

This solution is from NetBeans Developers Forum posted by  Tomas Mysik

ouribeb930 | 1 Jun 10:28
Picon
Favicon

Project character encoding

Sorry, I haven't explain my self well,

I mean, I have an xml file that must be parsed with a tool that I have developed, but one of the features that the
client want is that the file that they give me can be in any character encoding format, but it must be
procesed by my tool in utf-8 format, so the file is going to be stored in database in utf-8 format. But I have
to parse the file before.

What I need is a tool that let me debug this feature. So I need to compare the parsed file by my tool with other
tool result. 

I know that there are many tools that are in web, but if I can do this inside the IDE, it will be very usefull,
because of my job.

I need to parse one target file at a time

Thanks for yor answer Chabier. I appreciate it.


Gmane