[
https://issues.apache.org/jira/browse/NETBEANS-4306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100017#comment-17100017
]
Geertjan Wielenga commented on NETBEANS-4306:
---------------------------------------------
With respect, the internet is full of explanations of how to run JAR files,
e.g.:
java -cp jarFileName.jar full.package.className
Here are some more:
https://stackoverflow.com/questions/12266735/no-main-manifest-attribute-in-jar-netbeans
> Maven Project does not create manifest for running outside of Netbeans
> ----------------------------------------------------------------------
>
> Key: NETBEANS-4306
> URL: https://issues.apache.org/jira/browse/NETBEANS-4306
> Project: NetBeans
> Issue Type: Bug
> Affects Versions: 11.2
> Environment: Win 10 Pro on 64bit HP laptop (intel), OpenJDK 8, 11
> (Zulu) using 11 as platform targeting 8 to run
> Reporter: Jack Copper
> Priority: Major
> Labels: build, clean, maven
>
> The jar file created by clean build (right-click on project, select clean
> build) does not create a proper jar file with manifest that can be run
> outside of the IDE.
> This seems to me to be a fundamental element of developing applications. How
> can it not work out of the box?
> Create a simple HelloWorld as a Maven Project. Add a Main class. Add
> System.out.println("Hello World"); to the main class.
> Clean and Build.
> Copy the resulting jar from ../target folder to any other folder.
> Open a command window, CD to folder, type the usual java ...
> (I can't type the command because this bizarre editor starts striking through
> characters).
> Java complains there is no manifest in the jar file.
> With respect, I use an IDE precisely to avoid having to deal with maven for
> basic things like a deployable jar file. I have used NetBeans for years, with
> default Ant builds, I did not expect this aggravation starting a new simple
> maven project.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists