• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Direcectory structute in jar

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in my program i am creating jar file through java code, when my input is a folder , it contains two files, the files r not recognised,

vat i have written is

JarEntry jarAdd = new JarEntry(tobeJared[i].getName());
System.out.println("The JarAdded file name is"+jarAdd);
System.out.println("The statement reaches here");
jarAdd.setTime(tobeJared[i].lastModified());
out.putNextEntry(jarAdd);

here tobeJared[i] is my input, it contain the folder,with 2 files i want the whole folder to be copied.the files r not copied

JarEntry jarAdd = new JarEntry(tobeJared[i].getName());
here i use getName() method , anything wronh here, plx hepl me

kalai
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic