writing an extension for thunderbird in java - Mozilla

This is a discussion on writing an extension for thunderbird in java - Mozilla ; I am trying to write a learning algorithm for spam filtering for thunderbird extension. Is it possible to code the extension for thunderbird in Java?...

+ Reply to Thread
Results 1 to 8 of 8

Thread: writing an extension for thunderbird in java

  1. writing an extension for thunderbird in java

    I am trying to write a learning algorithm for spam filtering for
    thunderbird extension. Is it possible to code the extension for
    thunderbird in Java?


  2. Re: writing an extension for thunderbird in java

    you have javaxpcom and xulrunner for embedding firefox/thunderbird
    in a java aplication. Note that this is not "doing a firefox extension
    in java" but "embedding firefox in a java application.

    Another related project is jrex. simply Google this names for more
    information.

    good look

    On Tue, 14 Aug 2007 04:26:47 -0700
    panther wrote:

    > I am trying to write a learning algorithm for spam filtering for
    > thunderbird extension. Is it possible to code the extension for
    > thunderbird in Java?
    >
    > _______________________________________________
    > dev-extensions mailing list
    > dev-extensions@lists.mozilla.org
    > https://lists.mozilla.org/listinfo/dev-extensions


  3. Re: writing an extension for thunderbird in java

    Hi,

    I'm also interested in writing an extension with Java. Is there a way to
    do this?

    Inside Firefox, there seems to be no problem to do this (var test = new
    java.lang.String("test") does the trick, for example), but I've found no
    informations regarding Thunderbird and programming extensions in Java.

    Thanks in advance for replies!

    panther schrieb:
    > I am trying to write a learning algorithm for spam filtering for
    > thunderbird extension. Is it possible to code the extension for
    > thunderbird in Java?
    >


  4. Re: writing an extension for thunderbird in java

    Hi,

    you didn't find any information because thunderbird has no built-in java
    support. If you want to write a "java-extension" anyway, you can have a look
    at the spamato spam filter extension, which uses a socket connection to a
    java application.

    Regards,
    Christian


    On Tuesday 14 August 2007 19:00:27 Florian Stoffel wrote:
    > Hi,
    >
    > I'm also interested in writing an extension with Java. Is there a way to
    > do this?
    >
    > Inside Firefox, there seems to be no problem to do this (var test = new
    > java.lang.String("test") does the trick, for example), but I've found no
    > informations regarding Thunderbird and programming extensions in Java.
    >
    > Thanks in advance for replies!
    >
    > panther schrieb:
    > > I am trying to write a learning algorithm for spam filtering for
    > > thunderbird extension. Is it possible to code the extension for
    > > thunderbird in Java?

    >
    > _______________________________________________
    > dev-extensions mailing list
    > dev-extensions@lists.mozilla.org
    > https://lists.mozilla.org/listinfo/dev-extensions




  5. Re: writing an extension for thunderbird in java

    Hi,

    I'll have a look at this extension - thank you!

    Christian Metzler schrieb:
    > Hi,
    >
    > you didn't find any information because thunderbird has no built-in java
    > support. If you want to write a "java-extension" anyway, you can have a look
    > at the spamato spam filter extension, which uses a socket connection to a
    > java application.
    >
    > Regards,
    > Christian
    >
    >
    > On Tuesday 14 August 2007 19:00:27 Florian Stoffel wrote:
    >> Hi,
    >>
    >> I'm also interested in writing an extension with Java. Is there a way to
    >> do this?
    >>
    >> Inside Firefox, there seems to be no problem to do this (var test = new
    >> java.lang.String("test") does the trick, for example), but I've found no
    >> informations regarding Thunderbird and programming extensions in Java.
    >>
    >> Thanks in advance for replies!
    >>
    >> panther schrieb:
    >>> I am trying to write a learning algorithm for spam filtering for
    >>> thunderbird extension. Is it possible to code the extension for
    >>> thunderbird in Java?

    >> _______________________________________________
    >> dev-extensions mailing list
    >> dev-extensions@lists.mozilla.org
    >> https://lists.mozilla.org/listinfo/dev-extensions

    >
    >


  6. Re: writing an extension for thunderbird in java

    your code seems to be right. My expierience shows me that is better to
    surround filenames arguments with '"'. Perhaps you can execute from
    mozilla something like java your..arguments > file.txt and send us
    file.txt so we have more information...


    On Thu, 16 Aug 2007 21:25:05 +0200
    Florian Stoffel wrote:

    > Hi,
    >
    > for now I've written the extension to start a local java runtime with
    > the jar file of the application as parameter ("java -jar ..."), but
    > there is a problem.
    > When I call my function to start the java program, I always get the
    > following message: "Could not create the Java virtual machine".
    > Searching around, it seems to be a memory problem. In some cases, the
    > virtual machine can not allocate enough memory to start.
    > Could this be a problem of Thunderbird, or am I doing something wrong
    > (the path to the java interpreter and of the jar file are correct)?
    >
    > Thanks in advance for any replies!
    >
    >
    > So, here are the relevant parts of the source code:
    >
    > var jar = MailExplorer.Preferences
    > .getValue(MAILEX_PREFS_HOMEDIRECTORY) + MAILEX_JAR_FILE;
    >
    > var java = Components.classes["@mozilla.org/file/local;1"]
    > .createInstance(Components.interfaces.nsILocalFile );
    >
    > java.initWithPath(MailExplorer.Preferences
    > .getValue(MAILEX_PREFS_JAVAEXECUTABLE));
    >
    > var arguments = new Array();
    > arguments.push("-jar " + jar);
    >
    > var mailexplorerProcess = Components.classes['@mozilla.org/process/util;1']
    > .getService(Components.interfaces.nsIProcess);
    >
    > mailexplorerProcess.init(java);
    > mailexplorerProcess.run(false, arguments, arguments.length);
    >
    > Florian Stoffel schrieb:
    > > Hi,
    > >
    > > I'll have a look at this extension - thank you!
    > >
    > > Christian Metzler schrieb:
    > >> Hi,
    > >>
    > >> you didn't find any information because thunderbird has no built-in java
    > >> support. If you want to write a "java-extension" anyway, you can have a look
    > >> at the spamato spam filter extension, which uses a socket connection to a
    > >> java application.
    > >>
    > >> Regards,
    > >> Christian
    > >>
    > >>
    > >> On Tuesday 14 August 2007 19:00:27 Florian Stoffel wrote:
    > >>> Hi,
    > >>>
    > >>> I'm also interested in writing an extension with Java. Is there a way to
    > >>> do this?
    > >>>
    > >>> Inside Firefox, there seems to be no problem to do this (var test = new
    > >>> java.lang.String("test") does the trick, for example), but I've found no
    > >>> informations regarding Thunderbird and programming extensions in Java.
    > >>>
    > >>> Thanks in advance for replies!
    > >>>
    > >>> panther schrieb:
    > >>>> I am trying to write a learning algorithm for spam filtering for
    > >>>> thunderbird extension. Is it possible to code the extension for
    > >>>> thunderbird in Java?
    > >>> _______________________________________________
    > >>> dev-extensions mailing list
    > >>> dev-extensions@lists.mozilla.org
    > >>> https://lists.mozilla.org/listinfo/dev-extensions
    > >>

    > _______________________________________________
    > dev-extensions mailing list
    > dev-extensions@lists.mozilla.org
    > https://lists.mozilla.org/listinfo/dev-extensions


  7. Re: writing an extension for thunderbird in java

    Hi,

    for now I've written the extension to start a local java runtime with
    the jar file of the application as parameter ("java -jar ..."), but
    there is a problem.
    When I call my function to start the java program, I always get the
    following message: "Could not create the Java virtual machine".
    Searching around, it seems to be a memory problem. In some cases, the
    virtual machine can not allocate enough memory to start.
    Could this be a problem of Thunderbird, or am I doing something wrong
    (the path to the java interpreter and of the jar file are correct)?

    Thanks in advance for any replies!


    So, here are the relevant parts of the source code:

    var jar = MailExplorer.Preferences
    .getValue(MAILEX_PREFS_HOMEDIRECTORY) + MAILEX_JAR_FILE;

    var java = Components.classes["@mozilla.org/file/local;1"]
    ..createInstance(Components.interfaces.nsILocalFil e);

    java.initWithPath(MailExplorer.Preferences
    ..getValue(MAILEX_PREFS_JAVAEXECUTABLE));

    var arguments = new Array();
    arguments.push("-jar " + jar);

    var mailexplorerProcess = Components.classes['@mozilla.org/process/util;1']
    ..getService(Components.interfaces.nsIProcess);

    mailexplorerProcess.init(java);
    mailexplorerProcess.run(false, arguments, arguments.length);

    Florian Stoffel schrieb:
    > Hi,
    >
    > I'll have a look at this extension - thank you!
    >
    > Christian Metzler schrieb:
    >> Hi,
    >>
    >> you didn't find any information because thunderbird has no built-in java
    >> support. If you want to write a "java-extension" anyway, you can have a look
    >> at the spamato spam filter extension, which uses a socket connection to a
    >> java application.
    >>
    >> Regards,
    >> Christian
    >>
    >>
    >> On Tuesday 14 August 2007 19:00:27 Florian Stoffel wrote:
    >>> Hi,
    >>>
    >>> I'm also interested in writing an extension with Java. Is there a way to
    >>> do this?
    >>>
    >>> Inside Firefox, there seems to be no problem to do this (var test = new
    >>> java.lang.String("test") does the trick, for example), but I've found no
    >>> informations regarding Thunderbird and programming extensions in Java.
    >>>
    >>> Thanks in advance for replies!
    >>>
    >>> panther schrieb:
    >>>> I am trying to write a learning algorithm for spam filtering for
    >>>> thunderbird extension. Is it possible to code the extension for
    >>>> thunderbird in Java?
    >>> _______________________________________________
    >>> dev-extensions mailing list
    >>> dev-extensions@lists.mozilla.org
    >>> https://lists.mozilla.org/listinfo/dev-extensions

    >>


  8. Re: writing an extension for thunderbird in java

    Hi,

    thanks for your reply - I've found *my* mistake. Instead of

    arguments.push("-jar " + jar);

    you've to write

    arguments.push("-jar");
    arguments.push(jar);

    Thats all.

    Sebastian Gurin schrieb:
    > your code seems to be right. My expierience shows me that is better to
    > surround filenames arguments with '"'. Perhaps you can execute from
    > mozilla something like java your..arguments > file.txt and send us
    > file.txt so we have more information...


+ Reply to Thread