java - 可运行的 jar (通过 Eclipse)是否包含跟踪信息?

标签 java eclipse anonymity

假设我在 Eclipse 中编写 Java 代码,然后将其保存为可运行的 .jar 文件。代码是 100% 自己编写的,因此没有从其他来源导入。

.jar 文件(文件头,..)中是否包含有关我的 PC 或 Eclipse 版本的私有(private)数据?

最佳答案

是的,可能有一个自动生成的 list 文件 (jar:META-INF/MANIFEST.MF)

这是插件的默认输出

Manifest-Version: 1.0
Built-By: borisov andrey
Build-Jdk: 1.7.0_05
Created-By: Apache Maven
Archiver-Version: Plexus Archiver

如您所见, list 文件中至少添加了用户名

更新:如果您正在使用 maven,您可能需要配置 maven jar 插件

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>${maven-jar-plugin-version}</version>
      <inherited>true</inherited>
      <executions>
        <execution>
          <goals>
            <goal>test-jar</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <archive>
          <manifestEntries>
            <Created-By>${java.version} (${java.vendor})</Created-By>
            <Built-By>ME</Built-By>
            <Implementation-Title>${project.name}</Implementation-Title>
            <Implementation-URL>SOME URL if you want</Implementation-URL>
            <Implementation-Version>${project.version}</Implementation-Version>
            <Implementation-Vendor>your company</Implementation-Vendor>
            <Implementation-Vendor-Id>your vendore id</Implementation-Vendor-Id>
          </manifestEntries>
        </archive>
      </configuration>
    </plugin>

关于java - 可运行的 jar (通过 Eclipse)是否包含跟踪信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11669081/

相关文章:

java - 使用 RSA 的加密套接字连接 java(IllegalArgumentException : Illegal base64 character 10)

java - 设置和获取 NdefRecord ID

java - 希望使用 thread.sleep 暂停线程

android - 在 Eclipse 上调试时无法使用 F5 步入功能

python - 如何用每个唯一值的随机数(随机分类)替换 Pandas 列中的值?

java - 如何编写一个程序来判断输入的单词是否等于A?

java - 如何将 OSGI 包添加到 Eclipse RCP 项目

java - Android 6 上的布局问题。充气机问题?在 Android 5 及更早版本上运行良好

php - 如何支持网站匿名?

python - 如何用星号 ("*") 替换 csv 文件列中的非重复值?