N
N
Nikolay Baranenko2018-10-15 22:59:39
Java
Nikolay Baranenko, 2018-10-15 22:59:39

Why does the 'e' flag and manifest with the 'Main-Class' attribute cannot be specified together! error occur?

hello.
Probably I will ask a simple question, BUT still:
folder structure
-src
- Prometheus
First.class
Manifest.txt
wrote sh

javac Prometheus/First.java
java -cp . Prometheus.First
#jar cvfm first.jar Manifest.txt -C Prometheus/ .
jar cfme First.jar Manifest.txt Prometheus.First Prometheus/First.class
java -jar First.jar

building First.jar returns error
@worker01:~/IntelliJIDEAProjects/prometheus_example_node_exporter/src$ ./compile.sh 
Hello World New!!!
'e' flag and manifest with the 'Main-Class' attribute cannot be specified 
together!

link to repository
How to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Iloveski, 2018-10-16
@Iloveski

You have a class in your manifest where main. And jar cfme attribute e specifies main class. Gotta leave one thing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question