File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file input... please help

 
catherine matthews
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to get superclass filename, and get the content of the super class file//


please help

[ July 12, 2006: Message edited by: catherine matthews ]
[ July 12, 2006: Message edited by: catherine matthews ]
 
Tom Sullivan
Ranch Hand
Posts: 72
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about:

 
catherine matthews
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i still cant get the ouput...
It compiles...
Is there anything wrong, do i miss any declarations.....?
 
Tom Sullivan
Ranch Hand
Posts: 72
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually write it as follows:


[ July 12, 2006: Message edited by: Tom Sullivan ]
 
catherine matthews
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is still the same....
No output.....
I just cant identify my mistake...
please help....
 
catherine matthews
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Mr.tom'

i just modified i bit...
the sup.getname() just gets me the name of the class...
i suppose we would need to give .java at the end so...
[code]
String lined = "";
Class sup = cls.getSuperclass();
if(!(sup.getName().indexOf("java.lang.Object")>-1))
{
twoSuper = (sup.getName()+".java");
File fileSuper1 = new File (twoSuper);
try {
br1 = new BufferedReader (new FileReader(fileSuper1));
while ((lined = br1.readLine()) != null)
{

System.out.println(" the new file\t"+ lined + "\n");
}

} catch (IOException e){}
[\code]
[ July 12, 2006: Message edited by: catherine matthews ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic