How does the compilation/linking process work?

The compilation of a C++ program involves three steps: Preprocessing: the preprocessor takes a C++ source code file and deals with the #includes, #defines and other preprocessor directives. The output of this step is a “pure” C++ file without pre-processor directives. Compilation: the compiler takes the pre-processor’s output and produces an object file from it. … Read more

How to compile Java Code got from editText in android studio

How about saving user’s code somewhere in the device as .java file and then running shell command for compiling file and processing user’s code. refere below code try{ Process su = Runtime.getRuntime().exec(“su”); DataOutputStream outputStream = new DataOutputStream(su.getOutputStream()); outputStream.writeBytes(“screenrecord –time-limit 10 /sdcard/MyVideo.mp4\n”); outputStream.flush(); outputStream.writeBytes(“exit\n”); outputStream.flush(); su.waitFor(); }catch(IOException e){ throw new Exception(e); }catch(InterruptedException e){ throw new Exception(e); … Read more