Community
    • Login

    JNI in CPP plugin

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    11 Posts 3 Posters 825 Views
    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 ForshakenN
      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 singhR 1 Reply Last reply Reply Quote 0
      • rinku singhR
        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 singhR
          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 ForshakenN 1 Reply Last reply Reply Quote 1
          • rinku singhR
            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 singhR 1 Reply Last reply Reply Quote 1
            • rinku singhR
              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
              • linpengchengL
                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 ForshakenN 2 Replies Last reply Reply Quote 0
                • Narfi ForshakenN
                  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 ForshakenN
                    Narfi Forshaken @linpengcheng
                    last edited by

                    @linpengcheng I will try this and update

                    1 Reply Last reply Reply Quote 1
                    • Narfi ForshakenN
                      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.

                      linpengchengL 1 Reply Last reply Reply Quote 1
                      • linpengchengL
                        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
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors