Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Vinicius Souza

Ranch Hand
+ Follow
since May 18, 2011
Vinicius likes ...
Netbeans IDE Chrome Java
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vinicius Souza

A long time ago, Marco Cognolato published a bat script that allow you to include jar libs into your jar. I use this script since I saw it in that post. But now I need a linux version of it. I am trying to convert it myself but I got some issues in the "for" command it uses a 'dir /b' etc... Well, did you know if anyone has converted this script to linux ? Thank you all and thanks Marco for share!
Hello my friends! I am very happy to announce : I found the problem!
It was really dumb mistake.... for those who want to know the problem was that I forgot to instanciate my array of object. See:
This is the old code:

This is the new fixed code:

Guys Im sorry for this dumb error, but thank you for all support!

1 year ago
Thank you I will, and I have more information:

This is what I get:

28/07/19 08:23:52: -> Titulo      : Titulo
28/07/19 08:23:52: -> Len         : 3
28/07/19 08:23:52: -> descricao   : 3
As you can see, the last line t.descricao[0].toString() doesnt execute. Null pointer.
But the length of the array descricao is 3 !!!
I never got an error like that, this is crazy! I will edit with the stack trace, thanks!

This is the stack trace:

This line is where the error occurs:
1 year ago

Knute Snortum wrote:That image is the top of a window.  What's the window?

This is the window of running the app in debug mode, since there's no config file the app runs without error bacause no object are created.
1 year ago
Ok, "t" is not null, I checked a lot.
If "t" is not null "t.descricao[i]" should not be null because:
"t" class is "Tabela" this is the Tabela second constructor:

"codigos.length" is 3, checked :-(
1 year ago
Well I use debug->Debug project or Ctrl+F5
In the image you can see where the debug runs:

The number changes every run in debug mode.
1 year ago

Returns an "Elemento" object previously created.
This is the class:

I use public beacause I am not using any design pattern, this code just works, or well worked.
1 year ago
I changed that line too:

The "lbl" is created correctly.
The error persists in the next line...
1 year ago
This is what Netbeans says:

Product Version: NetBeans IDE 8.2 (Build 201609300101)
Updates: Updates available to version NetBeans 8.2 Patch 2
Java: 1.8.0_171; Java HotSpot(TM) 64-Bit Server VM 25.171-b11
Runtime: Java(TM) SE Runtime Environment 1.8.0_171-b11
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\user\AppData\Roaming\NetBeans\8.2
Cache directory: C:\Users\user\AppData\Local\NetBeans\Cache\8.2

1 year ago

Knute Snortum wrote:Please tell us a lot more about the project.  Did you use a wizard?  Which one?  Is this a Maven, Gradle, or ant project?  How are you running the project?  etc.

When I created this project, I have used "New JavaFX project", I think this uses Maven.
Lets me explain some things:
-This project is about create a eletronic display.
-This project were working since 2017.
Then I changed some objects yesterday and I starting get null point error. I uses java a lot to my project, but I am not an expert but not so beginner.
This project uses a lot of images that need to be read in the start, and a configuration file that configures the way that images are shown.
This project has a lot of threads, one verify if the file changed and reload the config file, another receiveis files from the network using TCP/IP, and others.
This is the why I need this files in the same place where the app runs, like I use java -jar appp.jar to run. But in the Play button doesnt work because the debugger creates another folder and put the jar inside.
In this post I want to know how to run the debugger in a Folder that I select. In another post I am questioning about the error itself.
Please, I need help because I need to put this software to work.... :-( if you dont mind I can send you the entire project if you want.
Thank you a lot!
1 year ago
Yes, null are crazy guys, but what is weird is that in the constructor of the "Tabela" class I initialize everithing.

I really dont know whats going on.

See this is Tabela constructor. This code makes the array of "Elemento" object and set it to "descricao". The split returns an array of String. Checked.
"descricao" is an array of "Elemento" class:
I already printed all values.
-"t" objectr is defined. checked
- "i" has the value 0 checked
- "produto.getDescricao()" returns the produtc name. Checked
- "lbl" is a field if "Elemento" class. In the constructor is seted with null
- new Label() should return a new instance of "Label" class.
Omg, everithing is ok, and the error still. There are some other classes too but I think not to do with this error.
Its seems that new Label() is giviing the error.

1 year ago
Hello my friends, please help me with this error, I am since yesterday tyring to figure out what is causing the error but the code was corretc and started to give null pointer error. See the code:
* The line with the error is 276

Stack trace:
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(
       at com.sun.javafx.application.LauncherImpl.launchApplication(
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
       at com.sun.javafx.application.LauncherImpl.launchApplication1(
       at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(
       at Source)
Caused by: javafx.fxml.LoadException:

       at javafx.fxml.FXMLLoader.constructLoadException(
       at javafx.fxml.FXMLLoader.loadImpl(
       at javafx.fxml.FXMLLoader.loadImpl(
       at javafx.fxml.FXMLLoader.load(
       at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(
       at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(
       at com.sun.javafx.application.PlatformImpl.lambda$null$172(
       at Method)
       at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(
       at Method)
       ... 1 more
Caused by: java.lang.NullPointerException
       at javafx.fxml.FXMLLoader.loadImpl(
       ... 12 more
Exception running application

The "conf" var is already populated. The Class "Tabela" is:

and the class "Elemento" is:

I still trying here to fix the problem but without sucess.

1 year ago

Randy Tong wrote:Can you show us how you read the file? And  where you place the file ?

My application is a JavaFX application and it uses a inifile to setup some configurations and load some image files too. These files are placed in the same place where the  applications runs. My problem is that I need to find a bug then I need to be able to run my app inside the Netbeans but the files I need to run are not there because Netbeans creates a Runxxxxx folder each time.
1 year ago
Hello friends!, When I runs my application inside Netbeans using Play button Netbeans create a folder inside dist folder with a random name. But my application need some especific files to run, so when I need to debug the app I cannot use the Netbeans debugger because I dont know what folder to put that files. Any solution for this issue ?
1 year ago
Hello my fellow friends!  I´m creating a JSF application using MySQL as DBMS and I´m troubled about char encoding. I want to use UTF-8 but there´s a lot of options. For what I want is that case insensitive searchings and international characters like ÁÇ etc.. What type of UTF8 should I use ?
2 years ago