CARVIEW |
Select Language
HTTP/2 301
server: AkamaiGHost
content-length: 0
location: https://mail.openjdk.org/pipermail/jigsaw-dev/2015-October/004915.html
date: Sat, 09 Aug 2025 06:30:08 GMT
HTTP/2 200
content-type: text/html
last-modified: Mon, 19 Oct 2015 23:55:10 GMT
etag: "129c-5227de01ff380"
accept-ranges: bytes
x-akamai-transformed: 0 - 0 -
vary: Accept-Encoding
content-encoding: gzip
date: Sat, 09 Aug 2025 06:30:08 GMT
content-length: 1920
set-cookie: _abck=DA3B89E1584DED7A24844D36B2E15192~-1~YAAQNAHARaY5CoaYAQAAxLyFjQ7EYoSw7vw/eJXGbQNSKnPsNnOpbFEg5Je0BKSf3CridutyhXZoqX+MrG9A7UPVdTKuF8qg6SJ7VWmKJAxWcqiAOKiodG5dtw+e53y2cBLyihanZcYF2Ii6H8De7TaFRNXBGixUvwOiPGohECGf9zp/JN657Xx2b0iDJzyLDcwchh8roRsdP+Bus124SdJZwZrYrEybCv+9A2iGrgGhPLzsxq0iCNBJr3HRC66ZNFOR963ijqcgqPz18/5u/z/zjJTe7Cr377mnaW1FVkB6hncMyeo2DVXcQwtkW1lXXbl3mLDEA2fGnGk53Henotm4ptK5ABu6qh3lVpGv5la6GCAbhemjD155fseT6qLZzB+4SkQKrguyEc5wmXNpuh4eRPH8UF8L9klq5TpgFQY+qv77CA8JiWycDYge5G7gpKtVcE8=~-1~-1~-1; Domain=.openjdk.org; Path=/; Expires=Sun, 09 Aug 2026 06:30:08 GMT; Max-Age=31536000; Secure
set-cookie: bm_sz=009A6446D7D1D4FA15A1A86106B07540~YAAQNAHARac5CoaYAQAAxLyFjRxUc0KqU7StQG2m6mNlsCC4ZRCAXqMab9tOGGZL/apONOU4lz3MJNafi8iYVW3GMbkS1fww3tpIkWZgS2y/bzLmYNc8aFrkOEBnrUL2EFOTc/txomVxS7Jaq1FZuzICBieRwLSYNWemeGM5Y04KX2kMW9CoWBTFw1nldbNLbUwbY3q+PbqNoQYrHK/RrenxI3IYBZa4drd+D09hXWELX7h9lOmAsT5eFsAqD7dgrriH132vDzel+xhcafcCuiY3veTPEKfXBWtCmEVXaoVW3EjpmBnToUCXGooce9a5qDvjNwvCyC63WG3r7coVuAViEFJpHeqIvpMZ1u5zPQgrYsrzmO6ErG4=~4338497~3289649; Domain=.openjdk.org; Path=/; Expires=Sat, 09 Aug 2025 10:30:08 GMT; Max-Age=14400
Up to date syntax documentation?
Thu Oct 15 11:52:38 UTC 2015
More information about the jigsaw-dev mailing list
Up to date syntax documentation?
Philippe Marschall pm at netcetera.chThu Oct 15 11:52:38 UTC 2015
- Previous message: Up to date syntax documentation?
- Next message: Up to date syntax documentation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 14.10.15 18:48, Alan Bateman wrote: > On 14/10/2015 17:14, Philippe Marschall wrote: >> Hi >> >> I'm looking for an up to date syntax documentation for the >> module-info.java. Specifically I'm looking for the syntax for optional >> dependencies and specifying the main class. The most up to date >> information I could find was [1] but this doesn't cover optional >> dependencies. Googling suggests the following syntax >> >> require optional module-name; >> >> But this doesn't seem to work. Googling also suggests there is/was >> syntax for specifying the main class but none of the example seem to >> work anymore. > > The main project page [1] has links to all the current documents, > including the draft "Modules in the Java Language and JVM" page. > > I suspect it may be a surprise but there isn't any support for optional > dependences in the proposed design or prototype. At least for the JDK > modularization effort then we've been able to mostly eliminate the > original needs for this by moving to services. Most of my needs for optional dependencies come from annotations. Three examples come to mind: 1. Lifecycle annotations like (javax.annotation): If code runs within some container often methods with such annotations are detected and automatically invoked at the right time. But if the same code runs outside a container the annotations are not needed and the methods can simply be invoked explicitly. 2. Additional type check annotations (eg. JSR-305): These annotations are not needed at runtime but still need to be in the class files for tools to perform static analysis. Generally all annotations with a retention policy of class are candidates for optional dependencies. 3. Mapping annotations: Sometimes classes have annotations for specific mapping technologies. But if they are used without these mapping technologies then the annotations are not needed at runtime. > The module main class is not in the module declaration. If you are > building a modular JAR then you can specify it to the jar command with > --main-class $MAINCLASS. If the initial module is exploded on the file > system then you can specify the main class to the java launcher with -m > $MODULE/$MAINCLASS. Where in the JAR does this information end up? Cheers Philippe
- Previous message: Up to date syntax documentation?
- Next message: Up to date syntax documentation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the jigsaw-dev mailing list