Writing a Java application that supports plugins

I've done a bit of googling, but I haven't been able to find any information on how to make an application (from scratch) that supports plugins to be developed by other users that don't have access to the source code of the main application. A good example is Pidgin. It lets the client apply plugins to it to do various tasks. I'd like to add this kind of plugin capability to an application I am developing, however don't know how to. Does anyone know of any resources that could help me with this?

Another good mechanism is OSGI. The most popular Application build with OSGI is eclipse. For eclipse exists a lot of plugins to extends eclipse. With OSGI you can define interfaces, which have to use by other developers.
[Little OSGI Tutorial|http://www.vogella.de/articles/OSGi/article.html]
Regards
Sascha
Link added

Similar Messages

  • Rich-client Java application that is client to WLS6.1 but behind corporate proxy server

    We have a rich-client Java application that is a client to WLS6.1 that can't
    connect to the WLS6.1 server when the client is behind a corporate proxy
    server. What is a remedy for this?
    Thanks,
    Jim Weavere

    Found solution. Followed Part 2 of the solution as explained in http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wlw/S-19283.htm
    What surprises me is that this solution to a common problem is hidden and hard
    to find. If I am correct, no part of WLS 8.1 documentation suggests this. Rather
    the doc says, set the system properties for the standard JDK 1.4 network properties
    and it should work fine. If it is actually supposed to work like this, is it a
    bug then?
    "Naveen Kumar" <[email protected]> wrote:
    >
    Hi,
    I have a web application deployed on WebLogic server 8.1 sp1. And my
    server is
    behind a http proxy server. Now one of the components in the application
    makes
    a web service call to a service located external to the system, and it
    always
    throws "java.net.UnknownHostException". I have set the Java system properties
    http.proxyHost = my proxy server, http.proxySet = true and http.proxyPort
    = 80
    and it still does not help.
    If I try to evaluate the web service component as a stand alone client
    using WebLogic's
    webserviceclient.jar, everything works fine. I can't figure what I have
    to do
    to get this component working from within the WebLogic server. Can anybody
    provide
    me with inputs, comments or suggestions.
    Naveen.

  • Standalone java application that calls Db2

    Hi,
    I am trying to use coherence in my standalone java
    application that makes JDBC calls to Db2.
    The sql statemet is like below:
    select lastName,firstName from employee where empNo=2224;
    In the application,I would read from the flat file say
    200 account numbers and query the database.
    If I have queried the database already with the given
    account,I want to retreive from the cache.
    I am having real trouble in getting this work with
    coherence software.
    Any psudo code in this regard will help me a lot.
    Thanks
    DJon

    Hi Jon,
    Thanks for the mail.I am struck in
    implementing the coherence in the sample program.
    any help in this regard is appreciated.
    Thanks
    DJon
    Below is the sample program that works without coherence.go to db2 and get the information.
    import java.sql.*;
    import java.util.*;
    public class DB2Client
    static void printColumn(String in)
    System.out.print(in);
    System.out.print(" | ");
    public static void main(String[] args)
    Driver myDriver = null;
    Connection myConnection = null;
    try
    myDriver =
    (Driver)Class.forName("com.ibm.db2.jcc.DB2Driver").newInstance();
    myConnection =
    DriverManager.getConnection("jdbc:db2:sample","dujon","jeff");
    PreparedStatement myStatement
    = myConnection.prepareStatement("SELECT
    empno,firstnme,lastname FROM employee where empno > ?");
    myStatement.setString(1,"00");
    ResultSet
    myResults=myStatement.executeQuery();
    while (myResults.next())
    printColumn(myResults.getString("empno") + "");
    printColumn(myResults.getString("firstnme") + "");
    printColumn(myResults.getString("lastname"));
    System.out.println();
    } catch (Exception e)
    e.printStackTrace();
    } finally
    try
    if (myConnection != null)
    myConnection.close();
    } catch (Exception e)
    Now,to implement the above sample with
    coherence I have written 2 programs.
    1. TangosolDB2Cache.java
    2. TestDB2Cache.java
    import com.tangosol.net.cache.CacheStore;
    import com.tangosol.util.Base;
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.Map;
    * An example implementation of CacheStore
    * interface.
    * @author erm 2003.05.01
    public class TangosolDB2Cache extends
    Base implements CacheStore
    // ----- constructors
    * Constructs DBCacheStore for a given
    database table.
    * @param sTableName the db table name
    public TangosolJDBCCache(String
    sTableName)
    m_sTableName = sTableName;
    configureConnection();
         * Set up the DB connection.
         protected void configureConnection()
              try
    Class.forName("com.ibm.db2.jcc.DB2Driver");
                   m_con =
    DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD);
                   m_con.setAutoCommit(true);
              catch (Exception e)
                   throw ensureRuntimeException(e,
    "Connection failed");
         // ---- accessors
    * Obtain the name of the table this
    CacheStore is persisting to.
    * @return the name of the table this
    CacheStore is persisting to
    public String getTableName()
    return m_sTableName;
    * Obtain the connection being used to
    connect to the database.
    * @return the connection used to
    connect to the database
    public Connection getConnection()
    return m_con;
    // ----- CacheStore Interface
    * Return the value associated with the
    specified key, or null if the
    * key does not have an associated
    value in the underlying store.
    * @param oKey key whose associated
    value is to be returned
    * @return the value associated with
    the specified key, or
    * <tt>null</tt> if no value is
    available for that key
    public Object load(Object oKey)
    Integer iKey = (Integer)key;
         return query("select
    lastName,firstName from employee where empNo = " + iKey);
    * Store the specified value under the
    specific key in the underlying
    * store. This method is intended to
    support both key/value creation
    * and value update for a specific key.
    * @param oKey key to store the
    value under
    * @param oValue value to be stored
    * @throws
    UnsupportedOperationException if this implementation or the
    * underlying store is
    read-only
    public void store(Object oKey, Object
    oValue)
              mycacheTable(oKey,oValue);
    public void erase(Object oKey)
         public void eraseAll(Collection
    colKeys)
              throw new
    UnsupportedOperationException();
         public Map loadAll(Collection colKeys)
              throw new
    UnsupportedOperationException();
         public void storeAll(Map mapEntries)
              throw new
    UnsupportedOperationException();
         // ----- data members
         Hashtable mycacheTable = new Hashtable(1000);
         * The connection.
         protected Connection m_con;
         * The db table name.
         protected String m_sTableName;
         * Driver class name.
         private static final String DB_DRIVER =
    "org.gjt.mm.mysql.Driver";
         * Connection URL.
         private static final String DB_URL =
    "jdbc:db2:sample";
         * User name.
         private static final String DB_USERNAME =
    "dujon";
         * Password.
         private static final String DB_PASSWORD =
    "jeff";
    TESTING THE ABOVE PROGRAM
    import com.tangosol.net.cache.CacheStore;
    import com.tangosol.util.Base;
    import
    com.tangosol.net.cache.MapCacheStore;
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.Map;
    public class TestDB2Cache {
         public static void main(String args[]){
                        TangosolJDBCCache mycache = new
    TangosolDB2Cache("employee");
                        Connection
    con=mycache.configureConnection();
                        MapCacheStore cacheStuff = new
    MapCacheStore(HashMap hmap);
                        String[] employeeNumbers =
    {"000010","000020","000030","000040","000050"};
                                  // find whether it has been cached already
                                       for(int
    i=0;i<employeeNumbers.length();i++){
                                       oCurValue =
    cacheStuff.load(employeeNumbers);
                                       if(oCurValue == null){
                                            // execute SQL statement
                                            con.executeQuery(oCurKey);
                                       else
                                            //get from cache the values and return
                                            cacheStuff.load(oCurKey);

  • How to make a Java application that will change the client box's IP address

    HI how to make a Java application( that application would be run on the client ) that will change the client box's IP address ( IP address of itself )

    If you can do that through the command line, then use Runtime.getRuntime().exec(...) to execute your command.

  • In my 3G iphone why animated picture will not play any free application that support animated?

    In my 3G iphone why animated picture will not play any free application that support animated?

    If the animation is based on Flash. it will not work. iPhones have never had Flash capability, as Adobe has never provided it. Search the forums for "Flash" to see at least 5000 explanations.

  • Integrate an Application That Supports Native AD Authentication

    I am currently evaluating a 3rd party web application that supports SSO via native AD Authentication. Is it possible to integrate this application with Azure Active Directory in the same way that this would be done with On-Prem AD? It has typical options
    for a domain controller hostname and port, a Base DN, a service account to bind to AD and a domain name. If this is possible, what values can I use for server address and port? Thanks!

    Hi,
    Azure Active Directory (Azure AD) simplifies authentication for developers by providing identity as a service, with support for industry-standard protocols such as OAuth 2.0 and OpenID Connect, as well as open source libraries for different platforms to
    help you start coding quickly.
    Please refer to this article to learn about the common authentication scenarios that are supported by Azure AD and how you can use them in your applications.
    https://msdn.microsoft.com/en-us/library/azure/dn499820.aspx
    Regards.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Is there a list of applications that support 'versions' in Lion?

    Has anyone found or compiled a list of applications that support versions in Lion? It'd be helpful to know before purchasing new software and having to wait for replies from each software developer. I've seen the roaring apps list, but it doesn't get detailed enough.

    I'm a developer for an app sold on the Mac App store, so I can assure you that supporting Versions is not that big of a deal. The biggest problem for me was making my app play nice inside the Browse Versions interface.
    The real issue is testing the app under Lion AND back on Snow Leopard to make sure you dont break something on Snow Leopard. There is also an app upgrade review and approval cycle done by Apple for products sold on the App Store. My gut feel is that the review staff is being flooded right now with application updates for Lion by virtually all of the products on the App store.
    I do remember that Snow Leopard broke things too when it went live. (But then Apple has done at least 8 updates to Snow Leopard after it was released.)
    By the way, the old way of saving works just fine for apps that dont yet support Versions.
    Versions does take a bit to get used to. It is a paradigm shift from the way apps are saved over the last several
    decades.
    Apps that require custome hardware and custom device drivers will most likely be the last to convert to Lion. Years ago I was a ProTools user and they took over 6 months after Tiger was released to release a compatible upgrade (and they charged a lot of money for it too).
    The vast majority of apps dont fall into that category. They just have to do a ton of testing, which takes time.

  • Which is Adobe product to be used for developing iPAD(IOS) applications that support PDF edit on the

    Question:
    We would like to know if LiveCycle ES 8.0 supports development of applications for IOS devices like iPAD,...
    Our requirement is to build applications that opens PDF on an iPAD, let the user edit and save the PDF.
    If not, which other Adobe product does?
    Thanks,
    Murali

    If you want to add text as comments, then a form created in Acrobat (Acroform) will work in Adobe Reader for iOS. It does not support forms created in LiveCycle Designer (XFA). There are also other PDF viewers that support Acroforms and commenting. So you don't need to create an application, just documents (PDF forms) that can be opened in an existing application (PDF viewer) that supports forms and commenting.
    If you want to edit/add text that is part of the regular page contents of an existing PDF, I'm not aware of anything on iOS that does that and I don't think Adobe has anything that will help you develop an app that will.

  • How to make an standalone java application that uses mysql driver

    Hi,
    I have an application that makes connection to a mysql database, on my computer, I set on classpath the driver address, so everithing works fine.
    The problem is that I want to execute my application from other computers, where the classpath does not have the drivers.
    So my question is how can I package the driver? so, everybody can run my application from a Jar, for example.
    thanks in advance,
    - Susana

    Nobody answered me, but I post the solution I found, that maybe can help somebody else with this problem:
    I packed all my application sources (.class) and the drivers sources (.jar) with the tool: FAT JAR. It is an Eclipse plug-in. And now I can run mi application from the resulting Jar in other machines without installing the conector.
    Bye,
    - Susana

  • Word processing applications that supports java

    We need word processing applications (shareware)that has java API so that we can call from within our internet based application.any help..
    Thanks in advance.

    I'm pretty sure that OpenOffice (and Sun's StarOffice) supports Java.
    Take a look and see if that doesn't work for you.
    - K

  • How can I Launch a Java application that I have written using an icon

    I have just finished writing a Messaging system like Ms Outlook written completey in Java. To run my application , I would normaly type: java and then the class containing the main method eg java LogonFrame.
    How can I launch my application by just clicking on an icon ?.
    How can I also package and install this application the way most conventional application are packaged and installed. Do we have a sort of "java Installer" ?.
    Thank you.

    Just make a .bat file. Open notepad, type something like
    @echo off
    javaw -classpath %~d0%~p0 Package.MainClass %1
    Now make a shortcut to this file. Rightclick the shortcut and select start in "minimized". Thats it...
    Nille

  • Writing a java application which can work in different network protocols

    Hi,
    i am working in an environment where we have different type of system. some systems work on tcp/ip and some systems works on some specific protocols like x.25 etc.,
    so i want to know is it possible to write a protocol independant application in java for solving this problem.( not specifically for x.25 and tcp/ip)
    its urgent!
    regards

    write something independant of its implementation is one of the core principes of Java, simply write to an interface (or abstract interface).
    Then build for each protocol a concrete class which will execute the calls for that specific protocol
    Does this help?

  • Does MVC application that support membership require SQL Server installation when deploy on hosting server?

    Hi all,
    This is my scenario:
    I created a new MVC project using VS 2012, and this project supports membership registration through SqlProvider which store membership information into a built-in database that created by VS2012. The connection string that VS2012 set is to point to the
    file name (.mdf) directly within the project's App_Data folder. The project runs without problem on my local under the VS 2012 environment with Sql Server 2008 installed (however the database file can't open with SQL 2008 because it is created to work with
    SQL 2012 through VS 2012). My questions are:
    1. If I don't have Sql 2008 or Sql 2012 installed, will the project still work under VS 2012 environment?
    2. If I deploy the project to a new hosting server without Sql 2012 install, will the project still work under IIS environment?
    3. If I don't want to use Sql 2012 database, can I tell VS 2012 to create Sql 2008 database instead?
    Thanks,
    Sam

    Hello Sam,
    1. Only "particular", as soon as function tries to access the SQL Server database (file), the web site will fail
    2. See 1.
    3. Install an additional SQL Server 2008 instance and use that one
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Hello, i just downloaded my digital copy of UP--i uploaded it to DropBox to then, Download to my Ipad--there is no application that supports the protected M4V--how can i get the movie on my Ipad as it said i could have it on any Apple Device, Thanks, Davi

    need some help on my ipad transferring digital copy from dropbox or from my pc.  cant do it from dropbox because the file is protected.
    my digital copy say i can put it on any Apple device.
    can someone advise me?
    David          thanks!
    <Email Edited by Host>

    you can import that file in itunes, verify it plays, then attempt to sync to ipad with itunes. I have had limited success, cause some of the versions will not transfer.

  • Access denied error for Java application on 2630

    Hello!
    I have bought a 2630 recently. Now I have installed a small Java application that tries to store some data in the phones memory. However, each time the application tries to do so, I get a "java.lang.SecurityException Access denied" message and the application states that it could no save its data. I have set the security settings for that particular application so that the phone should ask before each access to the file system. In fact, before I get the error message, the phone asks whether the application may write data to the file system. But still answering that question with "yes" I get the Access denied error message. Now I am puzzled. By the way, the application uses JSR-75 which the 2630 should support.
    Anybody any ideas?
    Regards,
    Volker

    RESOLVED!
    I was able to create file from java application on Nokia 2630. Here is how:
    1. root C:/ is mapped to folder "Downloads"
    2. The folders does not show with their names
    3. there are 2 folders in C:/ predefgallery and predefjava
    4. in predefgallery there are several predefined folders e.g. predefrecordings is one of them
    5. I am able to create file inside predefrecordings, creating file in upper folders is denied
    6. user created folders aro NOT shown at all
    7. I had to manualy confirm reading of data many times and writing data once.
    I hope this can help to other Nokia users since I did not find this anywhere.
    Luke

Maybe you are looking for