Good all the time of day! There is a little problem. I create an appframework application under maven. I write a plugin for building in the jar:

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <mainClass>com.international.mainclass</mainClass> </manifest> </archive> </configuration> </plugin> 

then I start frying and I write an error: can't find main-class com.international.mainclass. what am I doing wrong?

  • added <classpathPrefix> lib / </ classpathPrefix>? - Alexander Smirnov

1 answer 1

You forgot to write the main class, that's all.

You either did not write it at all, or you did not indicate it here instead of com.international.mainclass.

UPD

Who cares? As a result, you have a class-form and you create it and show it in the usual way. Or you have main right inside the class-form.

  • I watch you, cy6ergnom, like to joke. Why write something out of business ??? - Gautama Buddha
  • My class is written, and everything is indicated correctly. - Gautama Buddha
  • So look inside the JAR: what is there, are there any classes at all? Is there a manifesto with the correct class specified? - cy6erGn0m
  • If I write the application from scratch, then everything works. The problem arises when forms are created through a graphical interface in a netbins. - Gautama Buddha
  • one
    Miracles do not happen. If the class is not found, it means that you either incorrectly entered it, or the class does not lie where it should be. List the jar directory structure and the contents of the manifest file. - cy6erGn0m