A simple hack to make gEdit a Java IDE
Add "External Tools" plugin from Edit -> Preferences (Plugins tab).
Select Tools -> Manage External Tools

1. Name it whatever you can identify it with. I named it "Compile & Run - Java"
2. Paste the below code into the text area
4. Change appicability to Java and Close.
So, now run a program either by going to "Tools -> External Tools -> Compile & Run - Java" or just press F5 and don't forget to have fun! ;)
Add "External Tools" plugin from Edit -> Preferences (Plugins tab).
Select Tools -> Manage External Tools

1. Name it whatever you can identify it with. I named it "Compile & Run - Java"
2. Paste the below code into the text area
cd $GEDIT_CURRENT_DOCUMENT_DIR3. Assign a shortcut key. (e.g. F5)
if javac $GEDIT_CURRENT_DOCUMENT_NAME;
then
java ${GEDIT_CURRENT_DOCUMENT_NAME%\.java}
else
echo "Failed to compile"
fi
4. Change appicability to Java and Close.
So, now run a program either by going to "Tools -> External Tools -> Compile & Run - Java" or just press F5 and don't forget to have fun! ;)


No comments:
Post a Comment