• 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

how a java program compiles and runs?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
on what platform does the java program compiles. is it msdos or other. i tried to compile a program but error message comes.
and where the code runs.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can compile a java program on any platform. I use MSDOS. The placement of the files and the setting of the CLASSPATH and PATH statements depend on what operating system that you are using.
What message did you get?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cindy, could you please let me know the classpath for win 95 and if i am using ie5.5
thanks and regards
venkat
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is how mine is set.
PATH c:\jdk1.2.1\bin;c:\jdk1.2.1\WHEREYOURCODEIS;c:\ora8;%PATH%;
set CLASSPATH=c:\jdk1.2.1\WHEREYOURCODEIS;c:\jdk1.2.1\bin;
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks cindy & venkatesan.
i used msdos in win95 also in win98. path is same as you send cindy. program compiles, class creates but when i run the program error message occures. as : cannot read main() :something like this. program is alright, every things included.
what to do. i used three different computers but same message occures.

------------------
raj
 
Ranch Hand
Posts: 3143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
raj let's see your code so we can see what the problem might be!
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi raj,
make sure u r having main method in your class. if it' there then
check the signature of your main method it should be like
public static void main(String a[])

regards
deekasha
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure the public class matches the name of the .java file. If it is not public, and is spelled differently (capitalization counts) the system will not look for the main there.
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi there;
actually itzzz not the DOS in which u'r program get's compiled but actually itzzz the virtual DOS shell provided by the windows98 or 2000 so use the right term in future!!thatz what i think!!
ankush!!
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
picky, picky.
 
reply
    Bookmark Topic Watch Topic
  • New Topic