swpalmer | 29 May 18:44 2015
Picon

Netbeans templates - ${date}

The FAQ is wrong.
 http://wiki.netbeans.org/FaqTemplateVariables 

It states that ${date} inserts the date in the format "Feb 16, 2008", but I get "29-May-2015".  I tested this
on two system I have, one OS X, the other Windows 7.  On both systems the date string is in the same format. On
the Windows system the trick to extract the year works anyway, but on the OS X system it fails.  The error
message generated in the template output states:
The expected format was "MMM d, yyyy".

This is interesting because that is the format stated in the FAQ, but it is not the format of the date string on
both my working and non-working system.  
Is some aspect of the date format picked up from system settings?

Yo-Kodwo Acquaah | 29 May 10:19 2015

UNABLE TO INSTALL SOME MODULES

Hi all,

 

I recently downloaded and installed JDK 1.8 bundled with Netbeans 8.0 and have began learning it; however I have run into some problems and need help.

 

In a console application when I click on Help on the menu bar the menu item (About Payroll) pops up as is shown in pay.doc; when I click on About Payroll a write-up is displayed as shown in rslt.doc; all this is working in the console application, but if I choose Java Project with existing sources to achieve the same thing in Netbeans nothing is displayed; the code that is working in the console application is AboutPayrollConsole.java while the one that is not working in Netbeans is AboutPayrollNetbeans.java; all are attached for your perusal and direction, please. Your assistance to me in this regard is highly appreciated.

 

I hope to hear from you soon.

 

Rgds.

 

 


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Attachment (pay.doc): application/msword, 49 KiB
Attachment (rslt.doc): application/msword, 39 KiB
import java.awt.*;
import javax.swing.*;

public class AboutPayroll extends JFrame {

    public AboutPayroll() {
	    
        String label = "<html> <b> <u> <h1> <center> <font color = red> Payroll Application </h1> </center> <h2>
<center> <font color=green> Version 1.2 </h2> </u> </center> </b> <br> <p> This is a standard payroll
application designed </p> <p> to assist small-scale industries in their </p> <p> Labour Reporting
Systems. </p>";
        this.getContentPane().setLayout(new BorderLayout());
        this.getContentPane().add(new JLabel(label), BorderLayout.CENTER);
        this.pack();
    }

    public static void main(String[] args) {
	
        AboutPayroll ap = new AboutPayroll();
        ap.setSize(300, 200);
        ap.setVisible(true);
        ap.setResizable(false);
        ap.pack();
    }
}

package my.payroll;

public final class AboutPayroll {

    static void setEnabled(boolean selected) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    public AboutPayroll() {
	    
	String label = "<html> <b> <u> <h1> <center> <font color = red> Payroll	Application </h1> </center> <h2>
<center> <font color=green> Version 1.2 </h2> </u> </center> </b> <br> <p> This is a standard payroll
application designed </p> <p> to assist small-scale industries in their </p> <p> Labour Reporting
Systems. </p>";
                getContentPane().setLayout(new BorderLayout());
                getContentPane().add(label, BorderLayout.CENTER);

        this.pack();
    }

    public static void main(String[] args) {
	
	AboutPayroll ap = new AboutPayroll();
	ap.setSize(300, 200);
	ap.setVisible(true);
	ap.setResizable(false);
	ap.pack();
    }

    AboutPayroll(payrollUI aThis, boolean b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    void pack() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    private void setSize(int i, int i0) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    void setVisible(boolean b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    private void setResizable(boolean b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    private Object getContentPane() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
jla | 29 May 02:28 2015
Picon

How do I modify environment variables per-project? (JNI)

Hi,

I'm working on a JNI project with the Java half developed in Netbeans. I've written a JNI wrapper library
that loads another library (which may load others).

Before adding in the load call for the second library I could load my wrapper by either modifying the
Project's Working Directory or VM Options (-Djava.library.path) setting.

Once the JNI wrapper library started attempting to load a second library in the same directory as the
wrapper, it stopped working. I'm currently on Windows and it would search where the JDK is installed and
then my %PATH% and then fail.

I understand that the library loading the second library follows the OS rules for locating the library,
even if it is unfortunate that java.library.path doesn't somehow assist with this. I don't understand
why setting the working directory doesn't work. Maybe Java's working directory isn't the same as
Windows'. Setting the Working Directory for a driver program in Visual Studio does the right thing.

What does work is modifying %PATH% to include the directory containing the libraries. I can either do this
system wide or for my user using the control panel (ugh) or I can modify it in a cmd.exe session and launch
Netbeans from that.

I have read that I could modify netbeans.conf to vary the environment, at least on *nix systems, but what I
would really like is to modify it on a per-project basis, like I can with Arguments, Working Directory, or
VM Options under Run in Project Properties. Is there a setting to modify the environment that is given to
java.exe/javaw.exe when clicking Run or Debug?

I'd like to tweak PATH on Windows and LD_LIBRARY_PATH on Linux.

Getting the Working Directory to "do the right thing" would also be a great solution.

Thanks,
Jacob

greyelephant | 29 May 00:23 2015

jtextfeild colour change

I am using netbeans 8.0.2

This is a very confusing problem firstly i managed to change the colour of the textfield using the
background color property which works fine for the first text field 
however if I then try to apply the same code but with the reference change it prevent the text being written
into the textfield but still changes colour
code for the first textfield 

Code:

 private void jTextField2CaretUpdate(javax.swing.event.CaretEvent evt) {                                        
       jTextField2.setBackground(Color.green); 
    } 

code for the second textfield 

Code:

private void jTextField3CaretUpdate(javax.swing.event.CaretEvent evt) {                                        
         jTextField3.setBackground(Color.green); 
    }          

I have tried everything I can think of altering the look and feel changing properties of the textfields all
to no avail, I Have created a small application with two buttons and two textfeilds 
And it works fines
So there is something I am missing if someone can please tell me where to look I would be very greatful

Part of the error code
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Attempt to mutate in notification
	at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1338)
	at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:659)
	at javax.swing.text.JTextComponent.setText(JTextComponent.java:1718)
	at bookloader7.MyJframe.jTextField3PropertyChange(MyJframe.java:993)

this is the code for the application that works

Code:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
       // jTextField1.setBackground(Color.yellow);
        jTextField1.setText("hello");
    }                                        

    private void jTextField1CaretUpdate(javax.swing.event.CaretEvent evt) {                                        
      jTextField1.setBackground(Color.yellow);
    }                                       

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
         jTextField2.setText("bye");
    }                                        

    private void jTextField2CaretUpdate(javax.swing.event.CaretEvent evt) {                                        
         jTextField2.setBackground(Color.green);
    }                   

jemmett | 28 May 23:21 2015

Deploy JavaFX app to windows from a linux machine.

This may seem pretty trivial, but I'm not finding an answer.  I do all of my programming from linux/netbeans,
but all of my users are windows 7 pro.  Is it possible to deploy a desktop application in exe/msi format from
my linux box or would I need to package it from a windows machine?

Vilvo | 28 May 10:24 2015
Picon

ClassNotFoundException => always same bug

Hello,

There is my following problem :

Code:

java.lang.ClassNotFoundException: javax.vecmath.Point3f
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:244)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Caused: java.lang.NoClassDefFoundError: javax/vecmath/Point3f

Any ideas how to solve it ?

Thanks for advance.

Best regards.

Thomas Wolf | 28 May 19:21 2015
Picon

Is there a Rational Team Concert (RTC) client for netbeans?

Just started a new job and the developers in the group all use Eclipse with RTC to do their "agile thing".  I'd loathe to have to learn Eclipse and its workspace nonsense, but I haven't found an RTC client for Netbeans.  Well, I did see a couple (or are they the same?):
and

But neither has much in terms of explanation.  At a minimum, I'd need integration with RTC's source control (all the other stuff is accessible via a web interface).

RTC is enormous - and proprietary.  I thought organizations (other than MS shops) have abandoned proprietary tools because they bind an organization so tightly to the tool provider.  I guess I was wrong :-(

Any info/suggestions would be much appreciated.  Please tell me I don't need to learn Eclipse!

thnx,
tom
m1k0 | 27 May 23:53 2015
Picon

codefolds for sql

It is possible to folding code in sql files?
I trying

Code:

--//<editor-fold defaultstate="collapsed" desc="opis">
INSERT INTO Tabelak(id,name) VALUES(11,  'name');
INSERT INTO Tabelak(id,name) VALUES(12,  'name');
INSERT INTO Tabelak(id,name) VALUES(13,  'name');
INSERT INTO Tabelak(id,name) VALUES(14,  'name');
INSERT INTO Tabelak(id,name) VALUES(15,  'name');
INSERT INTO Tabelak(id,name) VALUES(16,  'name');
INSERT INTO Tabelak(id,name) VALUES(17,  'name');
--//</editor-fold>

but this is not work for me

mikk3lro | 27 May 23:17 2015
Picon

Grunt or gulp with upload on save

I'm trying to use gulp (and / or grunt) with netbeans - that would open
a whole new world of possibilities!

...but unfortunately it isn't playing nice with the "Upload on save"
feature, which is essential to my work flow. Netbeans simply does not
detect changes made by grunt / gulp - or at least it doesn't upload the
generated files until I manually open them in the netbeans editor (or
tab to them if already open)... which means several extra manual steps
on each save. Other than this it has always handled externally modified
files without issues (well sometimes it messes up a bit if moving
several huge folders rapidly, but never had a problem with single files
before).

If I run grunt tasks from within the IDE (ie. by rightclicking
Gruntfile.js) then changes *are* detected and uploaded. If I run gulp
tasks in the same way (using the nightly build) the problem is same as
for both running "externally".

I posted a more complete description of the problem (including a couple
of files to reproduce) on stack overflow in the hopes that I'm simply
doing it wrong:
http://stackoverflow.com/questions/30488923/grunt-or-gulp-with-netbeans
-and-upload-on-save

And I found another question on there that has so far gone unanswered:
http://stackoverflow.com/questions/25532135/netbeans-doesnt-scan-extern
al-changes-after-gulp-task

I don't have high hopes of getting an answer on stack overflow, and
google doesn't seem to have any useful suggestions. Geertjan Wielenga
was kind enough to point me to this list before posting a bug report...

I use netbeans 8.0.2 (x64 php version) on windows 7 - have tried the
nightly build as well.

Any suggestions are much appreciated.

noxtar | 27 May 19:07 2015
Picon

Cant Connect to FTP Server unless Charset is set to UTF-8

Hello Guys,

this are the default ftp profile settings netbeans saves in C:\Users\Username\AppData\Roaming\NetBeans\8.0.2\config\Preferences\org\netbeans\modules\php\project\RemoteConnections

$label=my-ftp-server
anonymousLogin=false
encryption=
host=ftp.example.com
ignoreDisconnectErrors=true
initialDirectory=/
keepAliveInterval=30
onlyLoginEncrypted=true
passiveMode=true
port=21
timeout=30
type=FTP
user=myname

And those are the Settings of a Filezilla Client Profile Saved in C:\Users\username\AppData\Roaming\FileZilla\sitemanager.xml

        <Server>
            <Host>ftp.example.com</Host>
            <Port>21</Port>
            <Protocol>0</Protocol>
            <Type>0</Type>
            <User>myname</User>
            <Pass encoding="base64">mypassword</Pass>
            <Logontype>1</Logontype>
            <TimezoneOffset>0</TimezoneOffset>
            <PasvMode>MODE_DEFAULT</PasvMode>
            <MaximumMultipleConnections>0</MaximumMultipleConnections>
            <EncodingType>UTF-8</EncodingType>
            <BypassProxy>0</BypassProxy>
            <Name>myserver</Name>
            <Comments />
        </Server>

Im curious if there is a way to set the Charset type for the ftp-connection in netbeans to UTF-8,  i mean this
directive <EncodingType>UTF-8</EncodingType>

I have a customer who runs an pure-ftpd privsep server with forced UTF-8 encoding. If i use netbeans i have no
way to set to use UTF-8 Charset. The strange thing is that then the authentication fails. If i use filezilla
i can also only connect to the server if i enable force UTF-8 Charset

ddevecchio | 27 May 04:21 2015

securing source code in NBP project

Hello,
Short version:
Is there some way to secure the source code in an NBP project?

Long version: 
I am considering doing my next big project in NBP. 

The last time I looked into this, all Java applications are essentially "open source" in the sense that
anyone can "decompile" a .JAR file into something that looks an awful lot like the original source code.  
This would be a problem for our circumstances.

The (no cost) software is used as a selling point for the hardware.   But the same software could be easily
adapted to use anyone's hardware if you had the source code.   So I have a problem releasing the source code in
standard java app.

Can NBP or some other tool, offer me assistance with this problem?


Gmane