初学者将开源 java 项目重新编译到我的自定义项目中
我使用名为 FLOSC.jar 的独立桥通过 OSC 端口在 Flash 和 MaxMSP 之间进行通信。 Flosc 是一个开源 Java 项目。
我的主要问题是:对于像我这样的 Java 新手(尽管我在高级语言方面有经验)使用 flosc 项目提供的类?
有人可以看一下源代码并让我知道我需要什么文件(其中的文件数量令人困惑!)并给我一个如何进行此操作的概要吗?
多谢!
I'm using a standalone bridge called FLOSC.jar to communicate between Flash and MaxMSP over OSC ports. Flosc is an open source Java project.
My main question is: how easy/difficult would it be for a Java novice like myself (tho I'm experienced in higher level languages) to write the same bridging functionality into my own java program using the classes provided by the flosc project?
Can someone please take a look at the source and let me know what files I need (there's a confusing number of them!) and give me an outline as to how to go about this?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我给你的建议是只使用 FLOSC。一方面,9 个源文件/类对于您正在做的事情来说并不算多。如果它有 50 个类/文件,并且有大量你不需要的额外功能,我想说如果你想要做的任务很小,也许你可以重写它以摆脱臃肿。但在这种情况下,我看不出重写的意义,因为您的版本可能具有接近相同级别的复杂性。你会想要一个 OscMessage 类、一个 OscPacket 类、一个 TcpServer 类等等。
重写一些有用的东西几乎从来都不是一个好主意,除非你有很多时间并且你想了解一项技术。如果 FLOSC 不能正常工作或者有错误,那就是另一回事了——有时,当您一开始就没有编写有错误的代码时,重写比调试更容易。但这又取决于您需要重写多少代码。
至于对你来说是否会困难,这个很难说——你所说的“高级语言”是什么意思?您有多少编程经验?
My advice to you is to just use FLOSC. For one thing, 9 source files/classes is not a lot for what you are doing. If it was something with 50 classes/files, with tons of extra functionality that you don't need, I'd say if the task you want to do is small, maybe you could rewrite it to get rid of the bloat. But in this case I don't see the point of a rewrite since your version of it would probably have close to the same level of complexity. You're going to want to have an OscMessage class, an OscPacket class, a TcpServer class, etc, etc.
It's almost never a good idea to rewrite something that works unless you have lots of time on your hands and you want to learn about a technology. If FLOSC doesn't work right or is buggy, that's another story -- then sometimes it's easier to rewrite than debug when you didn't write the buggy code in the first place. But again that depends on how much code you have to rewrite.
As to whether it would be difficult for you, that's hard to tell -- what do you mean by "higher-level languages"? How much programming experience do you have?