Last active
December 10, 2015 16:56
-
-
Save fogartyp/581e2ebc35a0c77b2cb1 to your computer and use it in GitHub Desktop.
Creating a custom Java Runner on C9 IDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a custom Cloud9 build system - similar to the Sublime build system | |
// For more information see https://docs.c9.io/custom_runners.html | |
{ | |
"cmd": [ | |
"bash", | |
"-c", | |
"mkdir -p $(echo $file | sed -r \"s_/src/.*_/_g\")bin; find $(echo $file | sed -r \"s_/src/.*_/_g\")src -name '*.java' -print | xargs javac -sourcepath $(echo $file | sed -r \"s_/src/.*_/_g\")src -d \"$(echo $file | sed -r \"s_/src/.*_/_g\")bin\"" | |
], | |
"info": "\\033[01;34mBuilding\\033[00m \\033[01;31m$project_name\\033[00m", | |
"selector": "source.java", | |
"working_dir": "$file_path" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a custom Cloud9 runner - similar to the Sublime build system | |
// For more information see https://docs.c9.io/custom_runners.html | |
{ | |
"cmd": [ | |
"bash", | |
"-c", | |
"java -cp $(echo $file | sed -r \"s_/src/.*_/bin_g\") $(echo $file | sed -r \"s_.*/src/__g\" | sed -r \"s_\\.java__g\" | sed -r \"s_/_._g\")" | |
], | |
"info": "\\033[01;34mRunning\\033[00m \\033[01;31m$file_name\\033[00m\n", | |
"selector": "source.java", | |
"working_dir": "$file_path" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment