netbeans

Maven error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

ぐ巨炮叔叔 提交于 2021-02-08 11:08:46
问题 I'm using netbeans. I tried to reinstall it but it did not work. Following is the stack trace when I run mvn clean install -X: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 at org.neuroph.util.NeurophArrayList.get(NeurophArrayList.java:376) at org.neuroph.core.Layer.getNeuronAt(Layer.java:230) at org.neuroph.util.ConnectionFactory.forwardConnect(ConnectionFactory.java:231) at neuralNetwork.util.NeuralNetworkBuilder.customStandardNNet(NeuralNetworkBuilder.java:34) at

Netbeans 12 on Windows, Console not outputting System.out.print

十年热恋 提交于 2021-02-08 09:51:11
问题 Running the following simple program in Netbeans 12 and finding that the print statements won't display until after all data is entered - so there is no prompting before the input request. When using println, it works as expected. public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter first name: "); String firstName = in.next(); System.out.print("Enter last name: "); String lastName = in.next(); System.out.print("Enter age: "); int age = in

Netbeans 12 on Windows, Console not outputting System.out.print

老子叫甜甜 提交于 2021-02-08 09:51:08
问题 Running the following simple program in Netbeans 12 and finding that the print statements won't display until after all data is entered - so there is no prompting before the input request. When using println, it works as expected. public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter first name: "); String firstName = in.next(); System.out.print("Enter last name: "); String lastName = in.next(); System.out.print("Enter age: "); int age = in

“Starting new Thread in constructor” warning in Lambda expression (NetBeans IDE)

爷,独闯天下 提交于 2021-02-08 07:34:20
问题 When I start new thread in traditional constructor, NetBeansIDE gives no warnings: addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { (new SomeThread()).start(); } }); But if I convert it to Lambda expression, I'm getting a warning "Starting new Thread in constructor": addActionListener((ActionEvent e) -> { (new SomeThread()).start(); }); What is the problem here? What is the correct solution? EDIT 1: The same problem on NetBeans IDE 8.0.2: The

Not getting absolute file path from resources

一世执手 提交于 2021-02-08 06:29:15
问题 I have a template file under /src/main/resources and i want to get the absolute path of it, the problem is that I'm getting a relative path and not a absolute path. I need to get the absolute path of the file in my computer after loading the template inside the project. What I'm doing now is this: URL location = this.getClass().getResource("/template/template2.vm"); String fullPath = location.getPath(); This returns: (java.lang.String) vfs:/content/MyProyect-1.0.0-SNAPSHOT.war/WEB-INF/classes

Netbeans 11.1 print numbers in Windows's default language

早过忘川 提交于 2021-02-08 05:32:07
问题 I am still learning Java using Netbeans 11.1. My problem is when I try to run a program that should display numbers, I get the numbers printed in Arabic which is my Windows default language. This is what I get as a result: I added the line: -J-Duser.language=en -J-Duser.region=US to the netbeans.conf file, but that did not solve the problem. Another solution suggested using scanner.useLocale(Locale.ENGLISH); but I could not understand how and where to use it. This is my code: package lesson02

Netbeans codename one change where builds are sent

只愿长相守 提交于 2021-02-08 03:31:49
问题 I have created an account in Codename one, which had the free packet from my personal email. Eventually, the company that I work at purchased the Basic subscription packet. However, the builds are still sent to my old account email, every time I press Send Android build. How do i change where builds are sent, in order for them to be sent to the new account with the basic packet? I had an issue with space over 1200 kb. 回答1: This is there to prevent abuse where developers would switch accounts

Netbeans codename one change where builds are sent

雨燕双飞 提交于 2021-02-08 03:31:08
问题 I have created an account in Codename one, which had the free packet from my personal email. Eventually, the company that I work at purchased the Basic subscription packet. However, the builds are still sent to my old account email, every time I press Send Android build. How do i change where builds are sent, in order for them to be sent to the new account with the basic packet? I had an issue with space over 1200 kb. 回答1: This is there to prevent abuse where developers would switch accounts

Quotes in command line arguments passed to Java main()

落花浮王杯 提交于 2021-02-07 18:15:52
问题 I run a Java program with the following command line (Edit: in NetBeans 6.8 project properties) toto has:"tutu titi" args is an array of 2 Strings toto has:tutu titi I want (two arguments indeed, the second) args[1] to be has:"tutu titi" How should I do that? Edit: I have already tried escaping the quotes with backslash from "Arguments" line in Netbeans propject properties, but I get args[1] has:\tutu titi\ 回答1: I had a similar problem in NetBeans and found the solution: Edit/Add the property

Quotes in command line arguments passed to Java main()

自闭症网瘾萝莉.ら 提交于 2021-02-07 18:14:05
问题 I run a Java program with the following command line (Edit: in NetBeans 6.8 project properties) toto has:"tutu titi" args is an array of 2 Strings toto has:tutu titi I want (two arguments indeed, the second) args[1] to be has:"tutu titi" How should I do that? Edit: I have already tried escaping the quotes with backslash from "Arguments" line in Netbeans propject properties, but I get args[1] has:\tutu titi\ 回答1: I had a similar problem in NetBeans and found the solution: Edit/Add the property