• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

running multiple java files

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

HI all,
Is there any option in java to compile and run multiple files.
My proble is I have file say a.java which uses x,y,z classes. These classes are generated by compiling x.java,y.java,z.java...
Do i need to compile each of those(x,y,z) seperately ans then sompile a.java or is there any other solutioon for this ??
One more problem in compiling these files one by one is some of tehm are interlinked ( x needs y and y needs z) And i have amny such files.
I would appreciate any kind of help...
thanks in advance
Kavya
 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should just be able to compile a.java. The compiler will find the required classes and recompile. It even checks to see if the .java file is newer than the .class file and will recompile.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Kavya
This is Praveen u can any no of class files in different files for instance in yor case u have 3 x,y,z, and ur main file a.java wher ur importing all ur classes x,y,z so if u compile a.java will do to make it easier if u compile x,y,z seperately if at all if u have any errors in ur main program a.java u would find it easier to debug ur mailn program., Ihope this explaination would do
Thanking You
PRAVEEN
 
kavya krushi
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for the help.... It worked.
kavya
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!