I was wondering if it is possible to export a project in eclipse as a jar file but that doesnt include the .java source code files.
For example, say i wanted to distribute my program to others but didnt want them to be able to alter my .java source codes.

How would i go about doing this?

Thanks to anyone who replys

Recommended Answers

Step 5 - uncheck the check box for "Export Java source files"

Jump to Post

All 5 Replies

i have read the article and all my jar files are still containing the java source codes. what could i be doing wrong?

Step 5 - uncheck the check box for "Export Java source files"

yes sorry i had forgot to do that but once i did it worked.

after exporting the jar file, what would be the best way to obfuscate it to reduce the chances of decompilation of my program?

There are obfuscation products out there, but I have no experience of them, sorry.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.