+ 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

5th Mar 2020, 9:23 PM
高äșŽéˆž
高äșŽéˆž - avatar
8 Respostas
+ 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
6th Mar 2020, 5:52 AM
David Carroll
David Carroll - avatar
+ 2
Bartas Dausynas Yes, of course, I want to make a Youtube downloader without making it😂 Is it possible😂
5th Mar 2020, 10:10 PM
高äșŽéˆž
高äșŽéˆž - avatar
+ 2
Bartas Dausynas Not fishy things, just download youtube videos
5th Mar 2020, 10:13 PM
高äșŽéˆž
高äșŽéˆž - avatar
+ 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😂😂
5th Mar 2020, 10:26 PM
高äșŽéˆž
高äșŽéˆž - avatar
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.
12th Mar 2020, 10:56 AM
Mike
Mike - avatar