Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    JNI in CPP plugin

    Plugin Development
    3
    11
    345
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Narfi Forshaken
      Narfi Forshaken last edited by

      Has anyone tried to create a jvm using jni in a cpp plugin?
      I am trying to create a plugin that call java functions.
      During initialization of plugin, the createJavaVM call hangs and there seems to be no further process.
      Has anyone done this before and give some advice on this?

      1 Reply Last reply Reply Quote 1
      • Narfi Forshaken
        Narfi Forshaken last edited by

        I created a exe which calls the createJavaVM from the dll. This works.
        I created a new dll with the same code and called the function.
        Is there any difference how a plugin dll is loaded in npp?

        I use Visual Studio 2010 Professional and Visual Studio 2015 Community Edition. Tried creating plugin dll in both, and the issue in creating jvm exists.

        rinku singh 1 Reply Last reply Reply Quote 0
        • rinku singh
          rinku singh last edited by rinku singh

          issue can be resolved by accept a pull request a repository should be here

          issue :- https://github.com/larryb82/npp-regexhelper/issues/2
          pull request ;- https://github.com/larryb82/npp-regexhelper/pull/3

          1 Reply Last reply Reply Quote 1
          • rinku singh
            rinku singh last edited by

            @Narfi-Forshaken said in JNI in CPP plugin:

            Is there any difference how a plugin dll is loaded in npp?
            I use Visual Studio 2010 Professional and Visual Studio 2015 Community Edition. Tried creating plugin dll in both, and the issue in creating jvm exists.

            .net framework 4.0 should be installed for c# plugin API(x64 build)
            for c++ plugin API use latest Plugin Template

            Narfi Forshaken 1 Reply Last reply Reply Quote 1
            • rinku singh
              rinku singh @Narfi Forshaken last edited by

              @Narfi-Forshaken said in JNI in CPP plugin:

              I created a exe which calls the createJavaVM from the dll. This works.
              I created a new dll with the same code and called the function.
              Is there any difference how a plugin dll is loaded in npp?

              see both im.dll and im.exe project for npp and windows https://github.com/viper3400/RegExTractor

              im.dll for npp plugin hows it works
              https://github.com/viper3400/RegExTractor

              rinku singh 1 Reply Last reply Reply Quote 1
              • rinku singh
                rinku singh @rinku singh last edited by

                @gurikbal-singh said in JNI in CPP plugin:

                im.dll for npp plugin hows it works
                https://github.com/viper3400/RegExTractor

                https://github.com/viper3400/NppRegExTractor

                1 Reply Last reply Reply Quote 0
                • linpengcheng
                  linpengcheng last edited by

                  • if
                    • Write a script using clojure (a lisp dialect) on jvm.
                    • Write a script using clojure-clr (a lisp dialect) on .net.
                  • and
                    • JVM and .net have a very strong ecology
                    • Clojure is better than elisp
                    • Notepad++ is better than emacs
                  • Then
                    • Notepad++ will become emacs#
                  EMACS --> Notepad++
                  elisp --> Clojure / Clojure-CLR
                  
                  Narfi Forshaken 2 Replies Last reply Reply Quote 0
                  • Narfi Forshaken
                    Narfi Forshaken @rinku singh last edited by

                    @gurikbal-singh I am already using the latest plugin for development, the one provided in the link. I also have the .rc file as stated by the issue you linked above.

                    1 Reply Last reply Reply Quote 0
                    • Narfi Forshaken
                      Narfi Forshaken @linpengcheng last edited by

                      @linpengcheng I will try this and update

                      1 Reply Last reply Reply Quote 1
                      • Narfi Forshaken
                        Narfi Forshaken @linpengcheng last edited by

                        @linpengcheng While trying using Clojure, I moved the CreateJVM function from pluginInit function to plugin menu item.
                        This creates a JVM without any issue.

                        linpengcheng 1 Reply Last reply Reply Quote 1
                        • linpengcheng
                          linpengcheng @Narfi Forshaken last edited by

                          @Narfi-Forshaken You can refer to the following project on github :

                          JsFormatterJavaNppPlugin

                          A JavaScript formatter and a JSON parser implemented in Java

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright © 2014 NodeBB Forums | Contributors