Java API Tutorial - Java JarURLConnection .getEntryName ()








Syntax

JarURLConnection.getEntryName() has the following syntax.

public String getEntryName()

Example

In the following code shows how to use JarURLConnection.getEntryName() method.

import java.net.JarURLConnection;
import java.net.URL;
/*  w  w w  . j  av  a  2  s  .c o  m*/
public class Main {
  public static void main(String[] argv) throws Exception {
    URL url = new URL("jar:file:/c://my.jar!/");
    JarURLConnection conn = (JarURLConnection) url.openConnection();

    String entryName = conn.getEntryName();
  }
}