In Eclipse I am using JavaFX, Maven with jre 1.8.0_45.
Normally, when I try to compile with Maven this way (Run As -> Maven compile) it will throw an error for not using the jdk.
When I change it to jdk (everywhere like in configuration, window - properties, maven configuration) and try to run/build/compile/whatever I get the error
Error: Could not find or load main class
Without giving me any class up there. Just this.
I kind o' fixed this by adding to my pom the path to javac and staying with the jre package
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler.version}</version>
<configuration>
<!-- With JRE: -->
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe</executable>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
This works.
But still I wish to know - why is this error happening? What am I doing wrong?
I've used Project -> Clean and Maven -> Update. Restarted Eclipse many times. Closed and opened the project. My Main class is given in my Run Configuration (application.Main).
EDIT:
Resolved. Answered my (own) question below.