Reputation: 7216
I'm very new to java and feel very confused. I'm trying to create a VERY basic plugin for the OpenFire server, but have no idea how to get started. I read the Developer Guide, but it doesn't explain how to set everything up in eclipse. Do you have any good tutorials on how to create plugins for other applications in java? Like, how do I import all the openfire classes for instance? I get errors for all these lines of code:
package org.jivesoftware.openfire.plugin; //error is: The declared package "org.jivesoftware.openfire.plugin" does not match the expected package ""
import org.jivesoftware.admin.AuthCheckFilter; //errors are: The import org.jivesoftware cannot be resolved
import org.jivesoftware.openfire.MessageRouter;
import org.jivesoftware.openfire.XMPPServer;
My background is in C# so the syntax all looks nearly identical, but I have no idea how to use eclipse or how java works for plugins (seems very different than DLLs).
Thank you so much!
Upvotes: 3
Views: 8462
Reputation: 459
Hi you can follow my steps
Upvotes: 5
Reputation: 7216
Realized I needed to use Ant to compile as opposed to Eclipse, now everything is working without a hitch. Hopefully the plugin will be done in a few days =)
Upvotes: 0
Reputation: 586
From what you've written above, I would strongly suggest getting a better general understanding of Java first, before going straight in to develop an Openfire plugin.
The first line suggests a misunderstanding about packages. I would suggest looking at a tutorial such as Java Package Tutorial but essentially the package statement should match the folder structure you have where you have placed this source file.
The import errors suggest you don't understand the concept of the classpath. Google is your friend here but one source of information would be this
As I said, I really think you should get a handle on the basics of Java first, by writing simple and small programs, and then work your way up to an Openfire plugin - where you have to interact with 3rd party code.
Upvotes: 0