Jar File - Prevent Access to Source Code

前端 未结 10 1374
别那么骄傲
别那么骄傲 2021-01-19 16:40

I want to hand over a small Java app as a runnable jar but I do not want anybody to have access to my source code. Am I right in presuming that there is no source code (.jav

10条回答
  •  死守一世寂寞
    2021-01-19 17:16

    Jar files usually only include .class files, which are java bytecode files, as well as resources. However, to be a little more secure about your code, you'll want to turn off debugging information and if you really want to be secure, run it through an obfuscator.

    Edit: berry120's comment is right - they can contain source files, but usually they do not. I just want to clarify for any future readers of this. It depends on the settings of the tool you use to generate the jar.

提交回复
热议问题