Reading java package directory for java source using notepad/nppexec script?
-
Hello,
Using nppexec I found a way to compile a java file and put it in a specific (package) directory using javac -d <destination> options. For this I have now a plugin command option in Macro menu which I called “Java Compile”. The code:
cd $(CURRENT_DIRECTORY)
javac -d C:\Users\ruijtpie\Documents\Java\rocbook\bin $(FILE_NAME)What I am still trying though is to run the compiled file with an other menu option “Java Run”. For that I need to be able to read the package name as a directory and put it in a code like:
java <dir> <filename>
I looked in much places to find any tutorial on either npp scripting or nppexec scripting, but there is not much that could help me.
Thanks.
-
This is my NppExec java-run script:
NPP_SAVE cd "$(CURRENT_DIRECTORY)" "C:\Program Files (x86)\Java\jdk1.8.0_51\bin\java" -classpath "$(CURRENT_DIRECTORY)" $(NAME_PART)(I rarely code in java, but the couple times I have (while trying to do tutorials), that seemed to work for me)
-
When there’s a feeling of not enough help on NppExec, type the following in NppExec’s Console:
help all -
…and also:
manual
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login