Java tutorial
//package com.java2s; public class Main { public static boolean isOkHttpAvailable() { try { Class cls = Class.forName("okhttp3.OkHttpClient"); return true; } catch (ClassNotFoundException e) { e.printStackTrace(); } return false; } }