+ 1
How to run linux command by java
Hello everyone, I want to make an app that can extract the linux command that need to be executed from the html to java. I am a newbie just getting started, I donât know anything about java, I want to ask a lot, if I write as I am now Whether the program can be successfully executed, and if it is successfully executed, can the Linux command be successfully issued in the Android phone? I want to make an html page linked to java and made linux command to installing youtube-dl , at the begin I want to read the whole project on github but it's too much information for me àČ„âżàČ„ https://www.sololearn.com/post/259229/?ref=app https://www.sololearn.com/post/259230/?ref=app https://www.sololearn.com/post/259228/?ref=app
8 Answers
+ 3
é«äșé Is there a reason you need the Java app to call a linux command?
Based on what you are describing, you should be able to do what you need in Java directly.
Here is a link with code that might help you see how to approach this.
https://stackoverflow.com/questions/4032766/how-to-download-videos-from-youtube-on-java
+ 2
Bartas Dausynas Yes, of course, I want to make a Youtube downloader without making itđ
Is it possibleđ
+ 2
Bartas Dausynas Not fishy things, just download youtube videos
+ 2
Bartas Dausynas So if it's a server side program it can access terminal? Actually if I could I'd like to access youtube servers to download videosđđ
0
I've had use cases for this at work, except I'm using C# with .NET Core.
Not sure if this applies to Java as well, but try searching "execute scp command with Java".
Here's my use case:
Admin using a very restrictive desktop app with ssh connection to server needs to run a serverside script.
For your use case however, it sounds like you only need to run a small script on the command line, or build out a small app in Java to do what you need. I dont think you need both.