odules:ty:compileJavaWARNING

modules:ty:compileJava WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/Users/---/.gradle/caches/3.0/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages() WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

What's this error " no main manifest attribute, in " means ? netbeans

When I try to run application jar using the command line on macOS, I get this error "no main manifest attribute, in ...."

I try these solutions, but no one of them seems to work :

  1. You should have been used this java -jar app.jar instead of this java -jar "app"
  2. java -cp your.jar Mainclass.
  3. Export you Java Project as an Runnable Jar file rather than Jar.
  4. A manifest is a file in the path META-INF/MANIFEST.MF within the jar which defines attributes like the classpath and the main class for running the jar file.

 had the same problem.
  1. Make sure your MANIFEST.MF is in:
    src/main/resources/META_INF/
    NOT
    src/main/java/META_INF/



the only thing that works for me by using maven as follow:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<version>3.0.2</version> <archive>
<mainClass>your class</mainClass>
<manifest> </manifest> </archive>
</plugin>

Commentaires

Posts les plus consultés de ce blog

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

java.io.IOException: Cannot run program "C:\wamp\bin\mysql\mysql5.6.17\bin": CreateProcess error=5, Access is denied

Cannot find System Java Compiler