JavaFX Run Issues with NppExec

  • Anonymous - 2012-11-11

    Slight issue, with work around…

    I use Notepad++ as a Java IDE.  It works great for most anything I've thrown at it (standard java code, Swing, graphics packages, etc.).  For the first time, I had a problem, and it involved JavaFX.

    I put the JavaFX jar file on the CLASSPATH, and it compiled perfectly.  However, when it came time to RUN, the JavaFX GUI window would not come up.  After a few hours of research and trying diferent things, I came to the conclusion that it was the Notepad++ Console Window, since I could run JavaFX well using the Windows console Window.

    Does anybody know a way to get JavaFX to work with the built in Notepad++ Console?

    I was able to work around this by having a standard DOS Command prompt come up as an External Process in Notepad++.  This works well, except for having the DOS Command Window running behind the JavaFX program.   Here is the workaround code I used.  Taken from the npes_saved.txt config file used by Notepad++

    ::JavaFX Run
    NPP_RUN "$(NPP_DIRECTORY)\Java\bin\java" -classpath ".;$(NPP_DIRECTORY)\JavaStuff\JavaFX\jfxrt.jar;" "$(NAME_PART)"

    Basically, all I had to do was add NPP_RUN to the command so it would pop out as an external process.  Ideally, I would like it to work without the DOS window.


  • DV

    DV - 2012-11-12

    Did you try 
    cmd /c "$(NPP_DIRECTORY)\Java\bin\java" -classpath ".;$(NPP_DIRECTORY)\JavaStuff\JavaFX\jfxrt.jar;" "$(NAME_PART)" 
    instead of "NPP_RUN" in the last string? 
    As NppExec Manual says, "you may encounter different behaviour of some applications under NppExec's Console and a regular console (…) Though you can always invoke cmd.exe explicitly" (refer to chapter 3.1 for more details). 

  • Anonymous - 2012-11-13

    >>Did you try cmd /c "$(NPP_DIRECTORY)\Java\bin\java"…

    Yea, I tried that first.  Putting CMD as part of the statement didn't help.  It was only when I ran it in a "true DOS window" that it finally worked.

  • Anonymous - 2012-11-13

    I'd also like to point out that the paths used in my original post are specific to my computer, and I should have cleaned them up better.  So more appropriately…

    ::JavaFX Run
    NPP_RUN "$\bin\java" -classpath ".;\jre\lib\jfxrt.jar;" "$(NAME_PART)"

  • DV

    DV - 2012-11-14

    Did you have any error messages while trying to execute the last command without NPP_RUN? Could it be that NppExec was unable to locate java.exe? You should specify full path to java.exe e.g. "C:\Program Files\Java\jre6\bin\java.exe". Going further, probably you should specify full paths also for the -classpath parameter. Or, instead, set some environment variable such as JAVA_HOME - I don't know, it could be specific to version of Java you use. Finally, is there some file extension of the input file specified as $(NAME_PART) ? Probably it might be "$(NAME_PART).class"... or "$(NAME_PART).java"

    Last edit: DV 2012-11-14

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks