All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.SimpleCommand Maven / Gradle / Ivy

There is a newer version: 3.0.8
Show newest version
package examples;

import me.legrange.mikrotik.MikrotikApiException;

/**
 * Example 1: A very simple command: Reboot the remote router
 * @author gideon
 */
public class SimpleCommand extends Example {
    
        public static void main(String...args) throws Exception {
            SimpleCommand ex = new SimpleCommand();
            ex.connect();
            ex.test();
            ex.disconnect();
        }
        
        private void test() throws MikrotikApiException {
            con.execute("/system/reboot");
        }

   
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy