Search code examples
javajakarta-eerestlet

How to I detrmine Which Version of Restlet API I am using?


I am using a java restlet client server based architecture.

How to I detrmine Which Version of Restlet API I am using ?


Solution

  • You can simply use the following code:

    import org.restlet.engine.Engine;
    (...)
    System.out.println("version = "+Engine.VERSION);
    

    If you have access to the source code, you can have a look within the class Engine:

    public class Engine {
        (...)
    
        /** Major version number. */
        public static final String MAJOR_NUMBER = "2";
    
        /** Minor version number. */
        public static final String MINOR_NUMBER = "3";
    
        /** Release number. */
        public static final String RELEASE_NUMBER = ".1";
    
        (...)
    }
    

    Hope it helps you, Thierry