The springboot project needs to execute linux commands to execute dataX programs
the initial code is:
String[] cmdArr = {"cd","/home/datax/bin/"};
The correct should be:
String[] cmdArr = {"/bin/sh", "-c", "cd","/home/datax/bin/"};
Read More:
- Several methods of executing multiple commands in Linux shell
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux
- Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on
- [solution] Python flash database migrate error type error: option values must be strings
- QInotifyFileSystemWatcherEngine::addPaths: inotify_add_Watch failed: there is no space on the device
- Solution to the problem of keyword not supported data source
- Configuring common environment variables in Windows
- Error: importerror: DLL load failed: the page file is too small to complete the operation.
- Solve cannot execute binary file: exec format error under Linux
- Error in `./a.out‘: free(): invalid next size (fast): 0x0000000001da8010
- Shell script execution error: “syntax error near unexpected token”
- Error starting peacock in manjaro [How to Solve]
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- The command Du – h — max depth = 1 in Linux
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded
- 解决Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- How to Fix Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- Gradlew compilation error: mips64el Linux Android strip
- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:11 (project):
- Solution to the problem of multiple parameters when using pipeline under Linux