Orientdb-studio in the embedded server

I am using an embeded server and want my users to use orientdb-studio. The only option I found is to put an orientdb-studio jar file in the application resource directory (jar inside
jar!) and copy it from the application resource to the server /plugins directory before the embedded server starts. It works but looks ugly.
Are there any other approaches?

Hi @arch7tect

currently there is no other way. Studio is a plugin which contains only static files.

The plugins in OrientDB server are stored inside ${ORIENTDB_ HOME}/plugins and loaded at server boot time


1 Like

I managed to make it work with classpath:

public void registerWwwAsStudio() {
    OCallable oCallable = new OCallable<Object, String>() {
        public Object call(final String iArgument) {
            String fileName = "www/" + iArgument;
            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            final URL url = classLoader.getResource(fileName);

            if (url != null) {
                final OServerCommandGetStaticContent.OStaticContent content = new OServerCommandGetStaticContent.OStaticContent();
                content.is = new BufferedInputStream(classLoader.getResourceAsStream(fileName));
                content.contentSize = -1;
                content.type = OServerCommandGetStaticContent.getContentType(url.getFile());
                return content;
            return null;
    final OServerNetworkListener httpListener = server.getListenerByProtocol(ONetworkProtocolHttpAbstract.class);
    final OServerCommandGetStaticContent command = (OServerCommandGetStaticContent) httpListener
    command.registerVirtualFolder("studio", oCallable);
1 Like