package com.frostwire.jlibtorrent.demo; import com.frostwire.jlibtorrent.LibTorrent; import com.frostwire.jlibtorrent.TorrentInfo; import java.io.File; /** * @author gubatron * @author aldenml */ public final class ReadTorrent { public static void main(String[] args) throws Throwable { // comment this line for a real application args = new String[]{"/Users/aldenml/Downloads/Kellee_Maize_The_5th_Element_FrostClick_FrostWire_MP3_April_14_2014.torrent"}; File torrentFile = new File(args[0]); System.out.println("Using libtorrent version: " + LibTorrent.version()); TorrentInfo ti = new TorrentInfo(torrentFile); System.out.println("Name: " + ti.getName()); } }