hi!!
my problem is im not able to start java in my pc. i am installing jdk1.5 in my pc n wenever i try to run my program by command
javac example.java
the program compiles bt when i try to intrepet by
java example it shows an error [no main class found]
i m really irritated i changed mu envoirnment variables n tried to do everythng i coud. so plz help!!!!!!!!!!!!!!!!!
sonidhanni
0
Newbie Poster
Recommended Answers
Jump to PostI might be mis-interpreting what your saying, but did you implement a main method in the program you are trying to run?
Jump to PostWhat command are you using to execute it?
Try with
java -cp . tree
Jump to Postcheck that you have semicolom after java home directory in path variable
c:\program files\java\jdk1.5.0_0.6\bin;
I had problem with that once, on some pc's will run it whitout this semicolom , but other refuse
ps:
notpubllic static void main(String a[])
but
All 11 Replies
TylerSBreton
13
Junior Poster in Training
sonidhanni
0
Newbie Poster
aniseed
38
Posting Whiz
sonidhanni
0
Newbie Poster
sonidhanni
0
Newbie Poster
sonidhanni
0
Newbie Poster
sonidhanni
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
sonidhanni
0
Newbie Poster
jetyan
0
Newbie Poster
p.bondam
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.