是否有任何可嵌入的简单 Java FTP 服务器库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1812390/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there any simple Java FTP Server libraries that is embeddable?
提问by ablmf
I've tried Apache FTP Server but it lacks document and support.
我已经尝试过 Apache FTP 服务器,但它缺少文档和支持。
And it's totally based on spring configuration framework which I don't think I could understand very quickly.
而且它完全基于 spring 配置框架,我认为我不能很快理解。
What I want is just
我想要的只是
- a simple FTP Server that could I could embed into my application
- I could handle "download" commands using my own code, sending some data from database instead of from static files.
- 一个简单的 FTP 服务器,我可以将其嵌入到我的应用程序中
- 我可以使用自己的代码处理“下载”命令,从数据库而不是静态文件发送一些数据。
Any suggestion?
有什么建议吗?
采纳答案by Carl Smotricz
The Apache folks are very good with stuff like Web servers, and that would be the first place I'd look for something like that. Their documentation looks plenty adequate to me. I'm not a big fan of Spring but if they tell me what to put in which XML file I can handle it. Thus, my first recommendation would be to ask you to reconsider your aversion against the Apache FTP server.
Apache 人员非常擅长 Web 服务器之类的东西,这将是我寻找类似东西的第一个地方。他们的文档对我来说已经足够了。我不是 Spring 的忠实粉丝,但如果他们告诉我在哪个 XML 文件中放什么,我可以处理它。因此,我的第一个建议是请您重新考虑您对 Apache FTP 服务器的厌恶。
<update>To help ablmf and provide a more authoritative answer, I downloaded Apache FTP Server and got it working almost right away without having to change anything. More info in Juha's answer and in my answer to ablmf's other question. </update>
<更新>为帮助 ablmf 并提供更权威的答案,我下载了 Apache FTP 服务器并使其几乎立即运行而无需更改任何内容。Juha 的回答和我对ablmf 的其他问题的回答中的更多信息。</更新>
That said, I stumbled across a product from 2001 called jftpdthat may satisfy your needs. It appears to be intentionally very simple-minded, so hopefully you can extend it to your needs. However, it doesn't look like documentation is its strong suit.
也就是说,我在 2001 年偶然发现了一个名为jftpd的产品,它可以满足您的需求。它似乎有意非常简单,因此希望您可以将其扩展到您的需要。但是,看起来文档并不是它的强项。
More modern is Colorado FTP, for which I find updates as late as April 2008. Looks like a very well thought out implementation. There is a manual in their wiki but it doesn't approach the quality of Apache's. They provide several builds, some ready-built and some where you have to dive in yourself to some extent.
更现代的是Colorado FTP,我在 2008 年 4 月找到了更新。看起来是一个经过深思熟虑的实现。他们的 wiki 中有一个手册,但它没有接近 Apache 的质量。他们提供了几种构建,一些是现成的,有些是你必须在一定程度上自己潜入的。
回答by user1141804
Try Simple Ftp Serve. You can download the whole project and buid it or download just the compiled output.
尝试简单的 Ftp 服务。您可以下载整个项目并构建它,也可以只下载编译后的输出。
回答by Juha Syrj?l?
Have a look at Apache FtpServer. Its documentation claims that you can embed it into Java application.
看看Apache FtpServer。它的文档声称您可以将它嵌入到 Java 应用程序中。

