CARVIEW |
Select Language
HTTP/2 301
server: AkamaiGHost
content-length: 0
location: https://mail.openjdk.org/pipermail/jigsaw-dev/2015-October/004915.html
date: Sun, 24 Aug 2025 05:40: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: Sun, 24 Aug 2025 05:40:09 GMT
content-length: 1907
set-cookie: _abck=FAFE42308F4D231904F6A3CEF7382520~-1~YAAQja1NaEPVQ76YAQAAVVyX2g7q+2rPzlLQyywyc2iuyQ18wfWRmzKEcTvwDuguvRpa0/2WIFxcIpVDt5XgB2hFJBMZiuHmq9E7fu3NhP2oj9N/mg3+BdvgKqgKBmmX8bvFOtNaC+awq4fJOPgkyLDkDBuKgp2tB9bTXYM8RnitSrbv7jIAJyxwi9eSVJOtm2Ea1dNaO8DT5ek7uiO3ZWKm32aHFOE9J8RMmmyn+kBqm9OpxBRkDxYt3nfETHFKCWfB4OqO6HtpOUAaPHeu/M9IrYrAM4A1tSEITg7wXL8m+Z1YkoFNnSNFIwMiUTfWhhp3lrRdbiR47BqhfnGo2lEanZZHJReKiazu8rliXXKSdXqYiwD+B1TYdg7wyYHabbvKst5zx+9WcDLOXKggJ6z6P2Y+aNaS8mRha/RPI5Sx10yaGnuvWPhmql5vXz52lSXuqzj3Y1Yt~-1~-1~-1~~; Domain=.openjdk.org; Path=/; Expires=Mon, 24 Aug 2026 05:40:09 GMT; Max-Age=31536000; Secure
set-cookie: bm_sz=F45DE4202F335632F0EEBAD281E72B52~YAAQja1NaETVQ76YAQAAVVyX2hwBTJyrC3TIhASp/erRU6BzA7uu/DkcpmLJ5+AdafLL23fyM4JA5OcpjmV8tcfMhAnF6Z85yZvDYWgxrFgTXRmahQNFU+1o7jFOUlQTF3+22L9f1aPC7cCGyHNrpbdpRFwdTbIO9TRv3+2Hi1JmJLTvJ/tcIq6Q6KJEHZygqRErVzI2keWLqU3I9EO7kMnHoGbDqCB9Hwp16fjPvpM/QEa6S81IjK892HCykRmMMO8t8JOUVd2CLMNIvNxFq+E0PuRnyTqAI+7njU+aEp0KTPJnJ5IWotqu2Wx0WA4Vj3+aTEE7XeXjjtgz0iS7rN342K8sZCle1QRfE51VqsJUgDnGqiTAnh4=~3491120~4601412; Domain=.openjdk.org; Path=/; Expires=Sun, 24 Aug 2025 09:40:08 GMT; Max-Age=14399
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