First application


I tried to fiddle around to create my first application running on this web desktop.
Although my code is litterally the same as “About OS.js” with just the difference in class’ name, it doesnt work: all it shows was only a blank window, nothing else, even the title “OS.js”.
Do you have any suggestion?


Can you share your code ?


From main.js. Litterally the same, except the name of class.

const Window = OSjs.require('core/window');
const Application = OSjs.require('core/application');

class ApplicationHelloWindow extends Window {
  constructor(app, metadata) {
    super('ApplicationHelloWindow', {
      icon: metadata.icon,
      gravity: 'center',
      allow_resize: true,
      allow_maximize: true,
      width: 500,
      height: 500,
      min_width: 320,
      min_height: 320
    }, app);

  init(wm, app) {
    const root = super.init(...arguments);

    this._render('HelloWindow', require('osjs-scheme-loader!scheme.html'));

    return root;

class ApplicationHello extends Application {
  constructor(args, metadata) {
    super('ApplicationHello', args, metadata);

  init(settings, metadata) {
    this._addWindow(new ApplicationHelloWindow(this, metadata));

OSjs.Applications.ApplicationHello = ApplicationHello;


Perhaps i figured out the reason: the data-id of application-window is still “AboutWindow”, which probably make the content not showing.


Did you update the metadata.json file ?