简体   繁体   中英

Java - Export Project to Open Source

I'm using eclipse to develop my Java program, and I was wondering if their is a way to export it as open source software. For example, KeePass developed using C#, allows you to download a zip file. When you unzip it, you can double click the icon and start using the software, and still open and see the code. Is it possible to do that in Java with eclipse?

Yes, you can do that. Click File --> Export... --> Java, JAR File or Runnable JAR file --> Next and then select option "Export Java source files and resources". This will create a JAR file that can be executed, but people interested can also browse the source code which will be included within.

You could take a look at websites such as SourceForge . Through it you should be able to upload your source and make it available to thrid parties. Others include Google Code and GitHub .

EDIT: As per your comment, you would need to turn your JAR file into an executable JAR. Please check this eclipse page to see how this can be achieved.

There's no such thing like "export as open source". Publish you source code (look for a fitting license though), use a version control system like git , publish it to public repositories like github . You can also ship your compiled binaries as a download through these public sites then.

If you're just looking for an executable version of your program, your question is a bit off. It strongly depends on the technology you're working with and of course the language. For a standard Java project you can find that option under File --> Export --> Java --> Runnable JAR File . I'm sure there's a way to include the sources in the wizard, but the preferable way to open source your software is what I wrote first, since then you can socialize your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM