and nn funziona!!!
io nel metodo non ho le stringhe scritte
tu mi hai scritto
codice:
String path = "c:\\xxxxx\\yyyy.htm";
String file = "yyyy.htm";
String nuovoPath = null;

if (path.endsWith (file))
  nuovoPath = path.substring (0, path.length()-file.length());
invece nel mio modulo io ho
codice:
public void xxx(String path, String file)
String nuovoPath = null;
if (path.endsWith (file))
  nuovoPath = path.substring (0, path.length()-file.length());
stampando la stringa nuovoPath ottengo path