0

I am Android developer.

I have created a .jar file from Java project with below steps

  1. Right Click on project and select export option.
  2. Selected jar file from Java folder
  3. Clicked on finish. Then mysdk.jar is created on desktop.

When I pasted this jar in lib folder of Android Project. When I selected(ctrl + left click from mouse) any method presented in jar from AndroidProject/src/demo.java , It is showing source code of .jar file.

My requirement is to give this jar to Third Party Company who should not read my code.

So, I want to hide my source code of jar. but how ? Please some one help me.

I am using Android Studio.

Thank you in advance.

Gangadhar Nimballi
  • 1,534
  • 3
  • 18
  • 46

1 Answers1

0

Extract the created jar file and check if only contain the class files or source file. Actually it shouldn't contain source files in jar files. If it contains , make use of jar command in shell/command line to create jar file and deliver it. Also check the new project is linked the previous project because both exists in the eclipse.

jar -cvf <jar file name> files to be archived
Shriram
  • 4,343
  • 8
  • 37
  • 64