NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Maven JavaFX Application

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Rallenaldo



Joined: 21 Apr 2017
Posts: 2

PostPosted: Fri Apr 21, 2017 9:59 am    Post subject: Maven JavaFX Application Reply with quote

Hi.

I have a huge problem with programming a JavaFX Maven application.

If I create a new Maven Java FX project, I get the following error message within project properties.

I expanded the whole project, so you can see, that I haven´t done anything yet. If I start to programm the application, this warning isn´t a problem but after some time (max 1-2 hours) netbeans tells me, that it cannot find the main class anymore.

I can build the application without an error. But if I choose run file or run project, I get the error that the main class cannot be found. (I removed the name of the main class to avoid confusion about the file names of the blank project and the project I am working on)

I attached 3 files to show you the problem.

Versions:

JDK: 1.8.0_121
JRE: 1.8.0_121
Maven: 3.5.0
Windows 7 64bit
Netbeans 8.2

Can somebody help me out?



netbeans2.jpg
 Description:
Error message during run project
 Filesize:  377.04 KB
 Viewed:  97 Time(s)

netbeans2.jpg



netbeans1.jpg
 Description:
Picture of the warning
 Filesize:  289.6 KB
 Viewed:  97 Time(s)

netbeans1.jpg



pom.txt
 Description:
This is the original pom.xml file as a txt file

Download
 Filename:  pom.txt
 Filesize:  4.75 KB
 Downloaded:  7 Time(s)

Back to top
brett.ryan



Joined: 25 Feb 2011
Posts: 239
Location: Melbourne, Australia

PostPosted: Fri Apr 21, 2017 10:31 am    Post subject: Maven JavaFX Application Reply with quote

Quote:
On 21 Apr 2017, at 19:59, Rallenaldo <address-removed> wrote:

Hi.

I have a huge problem with programming a JavaFX Maven application.

If I create a new Maven Java FX project, I get the following error message within project properties.

I expanded the whole project, so you can see, that I haven´t done anything yet. If I start to programm the application, this warning isn´t a problem but after some time (max 1-2 hours) netbeans tells me, that it cannot find the main class anymore.

I can build the application without an error. But if I choose run file or run project, I get the error that the main class cannot be found. (I removed the name of the main class to avoid confusion about the file names of the blank project and the project I am working on)

I attached 3 files to show you the problem.

Versions:

JDK: 1.8.0_121
JRE: 1.8.0_121
Maven: 3.5.0
Windows 7 64bit
Netbeans 8.2

Can somebody help me out?

Attachments:
http://forums.netbeans.org//files/netbeans2_150.jpg
http://forums.netbeans.org//files/pom_181.txt
http://forums.netbeans.org//files/netbeans1_234.jpg

That warning message is normal due to the JavaFX template using different execution goals (see Actions > Run project and Debug Project). The project should still run as normal.

Where do you get the main class can not be found error? The main class is set in the pom's mainClass property, which in your screenshot looks fine.=
Back to top
Rallenaldo



Joined: 21 Apr 2017
Posts: 2

PostPosted: Fri Apr 21, 2017 12:10 pm    Post subject: Reply with quote

Hi.

Thanks for the quick answer.

Like I said. The application runs just fine - for 1-2 hours. After that, the error message occurs.

It shows up, when I try to run the project (clean and build without an error). I attached the complete POM file as a txt file. The POM file was completely created by maven. I just added some dependencies and changed the name of the main class. After I changed the main class the application still worked.



app1.jpg
 Description:
AppStructure including mainClass of pom.xml
 Filesize:  403.62 KB
 Viewed:  88 Time(s)

app1.jpg



pom.txt
 Description:
POM file where the error occurs

Download
 Filename:  pom.txt
 Filesize:  5.98 KB
 Downloaded:  8 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo