netbeans-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Michaely <i...@bernd-michaely.de>
Subject Re: [ Java 11 - Netbeans 9 ] Creating modular project, doesn't generate manifest file
Date Sun, 07 Oct 2018 19:46:09 GMT
Hi,

it seems NetBeans9.0 can't (yet) add a Main-Class to the MANIFEST.MF 
file to create "self-executing" jars/modules,

it can be added later with the jar tool, e.g. in the example:

jar --update --file=com.toy.anagrams.jar 
--main-class='com.toy.anagrams.ui.Anagrams'


Bernd

Am 07.10.18 um 09:06 schrieb Geertjan Wielenga:
> Take a look at these modular projects created in NetBeans, they work 
> out of the box:
>
> https://github.com/GeertjanWielenga/JigsawJavaModularProjectSamples
>
> Gj
>
> On Sat, Oct 6, 2018 at 11:42 PM Navaron Bracke 
> <brackenavaron@gmail.com <mailto:brackenavaron@gmail.com>> wrote:
>
>     Hello,
>
>     earlier today I had finished performing a software upgrade,
>     upgrading Netbeans to version 9, Java to JDK 11
>     and my JavaFX SDK to the OpenJFX 11 SDK respectively.
>
>     When this was done, I had decided to see how the new modular
>     system in Java 11 works.
>     Upon creating a new modular project and writing some sample code
>     for it,
>     I found out that the project would not in any case start when
>     requesting it to run.
>
>     FYI: I did add the OpenJFX modules to the module path, didn't have
>     any compilation/library issues and a main class is present.
>
>     After wondering why it wouldn't run, it turns out that the project
>     was never supplied a manifest.mf file by the Netbeans IDE.
>     Obviously due to the missing manifest file, the jar that gets
>     built during the build phase never properly starts.
>
>     Is this intended behaviour of such modular projects, or is this a
>     bug in version 9 of the IDE?
>
>     Specs:
>
>     *Product Version:* Apache NetBeans IDE 9.0 (Build
>     incubator-netbeans-release-334-on-20180708)
>
>     *Java:* 11; Java HotSpot(TM) 64-Bit Server VM 11+28
>
>     *Runtime:* Java(TM) SE Runtime Environment 11+28
>
>     *System:* Windows 10 version 10.0 running on amd64; Cp1252; nl_BE
>     (nb)
>
>     *User directory:* C:\Users\Navaron\AppData\Roaming\NetBeans\9.0
>
>     *Cache directory:* C:\Users\Navaron\AppData\Local\NetBeans\Cache\9.0
>
>     *OpenJFX: *Version 11(Stable, not an ea build)
>
>
>     Sincerely,
>
>     Bracke Navaron
>

Mime
View raw message