Answer the question
In order to leave comments, you need to log in
How to create a jar archive in Idea?
I need to create a class archive with two methods. When trying to create an archive via Project Structure → Artifacts, Idea creates an archive with a modified class: an empty constructor is created, foreach loops are replaced with iterators. How to create an archive without changing the original class?
Answer the question
In order to leave comments, you need to log in
No way. And Idea has nothing to do with it. This is the work of the Java compiler, and is fixed by the standard of the language and the virtual machine.
The jar stores the code already compiled into .class files.
And things like foreach, lambda... are called syntactic sugar, created for ease of writing, but in . Class java parses them.
For example lambda would be a nested class
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question