You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The -classpath was redundant because -jar ignores the classpath anyway
76
81
```
77
82
78
-
The new approach uses the executable JAR's manifest:
83
+
The new approach removes the redundant classpath:
79
84
```bash
85
+
# New wrapper scripts
80
86
java -jar gradle-wrapper.jar [args...]
81
87
```
82
88
83
-
The `gradle-wrapper.jar` manifest now contains:
89
+
**Important**: When you use `java -jar`, Java ignores any `-classpath` or `-cp` argument. The classpath is determined solely by the JAR's manifest `Class-Path` entry and the JAR itself. The old wrapper scripts were passing an empty classpath that was being ignored anyway.
90
+
91
+
The `gradle-wrapper.jar` manifest contains:
84
92
```
85
93
Main-Class: org.gradle.wrapper.GradleWrapperMain
86
94
```
87
95
96
+
This is why the simplification works - the classpath was never actually being used.
0 commit comments