1

I want to export a java project to send it to a friend (AS JAR FILE). He should be able to open the jar file via writing .zip right after the .jar file extension and should see the .java and the .class files. I managed to export a jar-File as described here

BUT: if I try to get the .java files by writing .zip right after the .jar file extension, there are .class files in the jar-archive only.

My question: how to automatically create the jar file in intelliJ with .class AND .java files in it?

1 Answers1

0

You can't export source and compiled project into one file. But you can just export the project to *.jar and then go to <drive>:/Users/<user>/IdeaProjects/<project>/src and add all those files into archive and also add that exported jar file into that archive.

Matrx007
  • 25
  • 7