Runtime.getRuntime().exec("runas /profile /user:Administrator \"cmd.exe /c Powrprof.dll,SetSuspendState\"");
Also plz see comments
More Related Contents:
- How to run TestNG from command line
- Hide input on command line
- Including all the jars in a directory within the Java classpath
- How do I parse command line arguments in Java?
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- Run a JAR file from the command line and specify classpath
- Build Eclipse Java Project from Command Line
- How to include jar files with java file and compile in command prompt
- JUnit: How to simulate System.in testing?
- Java: how to import a jar file from command line
- Running java in package from command line
- Catching Ctrl+C in Java
- Using Java ProcessBuilder to Execute a Piped Command
- changing the working-directory of command from java
- Running a JAR file without directly calling `java`
- Compiling multiple packages using the command line in Java
- How to interrupt java.util.Scanner nextLine call
- When I run the .jar, I get a “No lwjgl in java.library.path” error
- Proper usage of Java -D command-line parameters
- Differences between classpath and sourcepath options of javac
- How to run Java program in command prompt
- Java: Check if command line arguments are null
- Why do JVM arguments start with “-D”?
- “Could not find the main class” when double-clicking .jar file
- How to force a jar to use(or the jvm that jar runs in) utf-8 instead of the system’s default encoding
- How to launch JUnit 5 (Platform) from the command line (without Maven/Gradle)?
- Testing console based applications/programs – Java
- Command Line Pipe Input in Java
- What’s the difference between -cp and -classpath
- Java exec() does not return expected result of pipes’ connected commands