deivi! | 24 May 12:28 2016
Picon

Problem to start a new Java project

Hello!

This is the first time I use NetBeans in Ubuntu Studio, and when I want to start a new Java Project appear the
message in the attached image. And I can't go on... I try to start another kind of project without success.
How can I do?

Thanks!

Attachments: 
http://forums.netbeans.org//files/screenshot_190.jpg

dhenton | 23 May 20:25 2016
Picon

running single junit test on maven project fails

for future users, what worked for me was 
properties --> compile --> Compile on Save (clear checkmark)

Brett Ryan | 24 May 02:08 2016
Picon
Gravatar

How can I handle lambda alignment?

Is there a way to control the indenting behaviour of lambda parameters?

I was trying to come up with an example that might be something others would grasp, but couldn't be creative
enough to come up with one, so I'll share the specific problem I face.

I use Spring's JdbcTemplate [1] combined with TransactionTemplate for data access that are both supplied
in a helper function, the specifics look as follows:

    public <T> T execute(final BiFunction<JdbcTemplate, TransactionStatus, T> cb) throws
DataAccessException {
        TransactionTemplate txt = new TransactionTemplate(transactionManager);
        txt.setIsolationLevel(TransactionDefinition.ISOLATION_DEFAULT);
        return txt.execute(ts -> cb.apply(template, ts));
    }

When calling this I get the context of the tx template and the jdbc template.

    public Customer getCustomer(long id) {
        db.execute((jt, ts) -> jt.query(SELECT_CUST_BYID, rs -> CUST_MAPPER));
    }

Simples! But, the big problem arises when I use the JDBC template's RowCallbackHandler [3] overload [4].

    jdbc.execute((jt, ts) -> jt.query(SELECT_DOCUMENT, rs -> {
                                  if (rs.next()) {
                                      // do something;
                                  }
                                  return null;
    }));

(Continue reading)

Information | 22 May 21:30 2016

cancel

cancel
LuisAntonioCardosoPerez | 20 May 17:07 2016
Picon

VPN causing trouble with web services client


jhuber wrote:
> I am trying to develop a web service client in Netbeans and am running into a problem with VPN.  I connect to my
corporate network with the Cisco AnyConnect VPN client.  My system is Windows 7 64-bit with NetBeans 8.0.2.
> 
> The vendor has supplied a wsdl file, and a compiled test application written in Delphi.  His application
dynamically loads the wsdl file, and it works fine whether the VPN is connected or not, so the VPN itself
does not appear to be the problem.
> 
> I have imported the wsdl file into my Netbeans project, which created a web service reference, and have
written a simple Java client based on a code snippet from the vendor.  
> 
> When the VPN is not connected, my Java client works fine.  However, when the VPN is connected, I get the
dreaded 
> 
> 
> > HTTP transport error: java.net.ConnectException: Connection refused: connect
> 
> 
> Here is the code for accessing the client that works when VPN is disconnected, but fails when VPN is connected:
> 
> Code:
> MyWebService svc1 = new MyWebService();
> MyWebServicePort port1 = svc1.getMyWebServicePort(); 
> BindingProvider prov1 = (BindingProvider) port1; 
>         
> prov1.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, USERNAME); 
> prov1.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, PASSWORD); 
> 
> String v1 = port1.getVersion();  //<==error occurs here
> 
> 
> 
> This behavior is the same whether running in the NetBeans IDE, or whether running the app outside of
NetBeans.  
> 
> I've looked through the attributes for the web service created in the NetBeans project, but I don't
exactly see anything that would affect this. I don't seem to have any other problems with Java apps
accessing the Internet when the VPN is connected.  For example, NetBeans updates itself just fine. If the
company VPN was interfering somehow, it would seem that the vendor's test app would fail as well when the
VPN is connected, but it works just fine.
> 
> Is there something else that I need to add to the Java code?  Any other suggestions?  I've googled around but
not really found anything.  I'm new to web services programming.  
> 
> Thanks for any help!

1aglar | 20 May 22:13 2016
Picon

Netbeans tool chain is broken

I would like to ask about the same.
Thank you.

kmerr98277 | 21 May 21:20 2016
Picon

Basic Java homework help needed - errors

Create a class named Billing that includes three overloaded computeBill() methods for a photo book store.

When computeBill() recieves a single parameter, it represents the price of one photo book ordered. Add 8%
tax and return the total due.

When computeBill() recieves two parameters, they represent the price of a photo book and the quantity
ordered. Multiply the two values, add 8% tax, and return the total due.

When computeBill() recieves three parameters, they represent the price of a photo book, the quantity
ordered, and a coupon value. Multiply the quantity and price, reduce the result by the coupon value, and
then  add 8% tax and return the total due.

Write a main() method that test all three overloaded methods. Save as Billing.java

NetBeans is giving me errors:

"require double, found double, int"    System.out.println("Price with 8 % tax: " +
computeBill(photoPrice, quantity))

require double, found double, int, int     System.out.println("Price with 8 % tax: " +
computeBill(photoPrice, quantity, coupon))

semicolon expected on the last line of code, even though I have one there

Here is what I have:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package billing;

/**
 *
 *  <at> author Kyle
 */
public class Billing {

    /**
     *  <at> param args the command line arguments
     */
    public static void main(String[] args) 
    {
        double photoPrice = 100;
        int quantity = 10;
        int coupon = 10;
        System.out.println("Photo Price " + photoPrice);
        System.out.println("Price with 8 % tax: " + computeBill(photoPrice));
        System.out.println();
        System.out.println("Photo Price: " + photoPrice);
        System.out.println("Quantity: " + quantity);
        System.out.println("Price with 8 % tax: " + computeBill(photoPrice, quantity));
        System.out.println();
        System.out.println("Photo Price: " + photoPrice);
        System.out.print("Quantity: " + quantity);
        System.out.println("Coupon: " + coupon);
        System.out.println("Price with 8 % tax: " + computeBill(photoPrice, quantity, coupon));
    }
    private static double computeBill(double photoPrice)
    {
        final double TAX = 0.08;
        return photoPrice + photoPrice * TAX;
    }
    private static double computeBIll(double photoPrice, int quantity, int coupon)
    {
    final double TAX = 0.08;
    return (photoPrice * quantity - coupon) + photoPrice * quantity * TAX);
    }
}

thanks!

Attachments: 
http://forums.netbeans.org//files/billing_121.java

vordar | 21 May 14:59 2016
Picon

I Can't Connect To localhost

Hello,
I'm having trouble connecting to localhost on Windows 10. I've gone through every Windows Ten setting I
can, yet Chrome still refuses to connect.

What settings do I need to change to be able to connect to localhost?
Thanks for your time, and I'm sorry if this is in the wrong spot!

Blake D | 20 May 20:38 2016
Picon

Manual Unsubscribe Request

Please unsubscribe this email address from [nbusers]. The normal mechanisms for unsubscribing from the mailing list don't seem to be working for me. Thank you.

Rick Smith | 20 May 15:50 2016

Webkit Browser/NB Connector Not Working

I'm using  NB 8.0.2, Win 8.1 The Webkit browser has stopped working for no apparent reason, as well I can't get anything to come up in chrome either (The NB Connector is installed). In desperation I even tried IE No joy,


 Any Ideas?


jsweeney76 | 19 May 16:14 2016
Picon

Netbeans / Graphviz interface

Hi,

I'm relatively new to developing and am trying to integrate the Graphviz interface into Netbeans.  I've
confirmed through the shell that Graphviz is properly installed, but upon start up, Netbeans is still not
detecting it.  I've tried going into the Directories portion of the Preferences menu to direct it to find
Graphviz but can't seem to get the correct directory.  I'm working on a Mac.  Can anyone help?  This is what I
have right now in the directories.  Thanks.

/Application/Graphviz.app/bin/dot
/Application/Graphviz.app/bin/neato
/Application/Graphviz.app/bin/circo
/Application/Graphviz.app/bin/twopi


Gmane