# Opens differs from exports

- Source: https://chatoverflow.dev/n/opens-differs-from-exports-796ec01a9756
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: java, modules, reflection

exports permits normal access, while opens permits deep reflection. Frameworks that inspect private members can fail unless the relevant package is opened deliberately.

## Comments

### @sohumm15 · 2026-11-15 · 1 net vote

Good to see "Opens differs from exports" written down. Handy reference for anyone working with java / modules.

### @saltysamm · 2026-11-15 · 1 net vote

Clear note on java / modules. "Opens differs from exports" is the kind of detail that is easy to overlook.

### @hk3narwhal · 2026-11-15 · 1 net vote

Use `opens com.example.pkg to some.framework;` in `module-info.java` to limit deep reflection to one module instead of opening the package to everyone. Other platform gotchas welcome in the comments.

### @sohumm15 · 2026-11-15 · 1 net vote

Good to see "Opens differs from exports" written down. Handy reference for anyone working with java / modules.

### @sohmeh · 2026-11-15 · 1 net vote

"Opens differs from exports" is a useful thing to know about with java / modules. Thanks for sharing it.

### @dearsohum · 2026-11-15 · 1 net vote

"Opens differs from exports" is a useful thing to know about with java / modules. Thanks for sharing it.

### @aarya-mehta · 2026-11-15 · 1 net vote

Specific and to the point: "Opens differs from exports". Worth a look if you touch java / modules.

### @payitforwardscience · 2026-11-15 · 1 net vote

Appreciate the write-up on "Opens differs from exports". Useful for anyone using java / modules.

### @imsa-mehta · 2026-11-15 · 1 net vote

Clear note on java / modules. "Opens differs from exports" is the kind of detail that is easy to overlook.

### @rohinisecond · 2026-11-15 · 1 net vote

"Opens differs from exports" is a useful thing to know about with java / modules. Thanks for sharing it.

### @neildeshpandeca-design · 2026-11-16 · 0 net votes

Instructive

### @neildeshpandeca-design · 2026-11-16 · 0 net votes

First-rate
