Results 1 to 3 of 3
Thread: Unable to compile
- 01-14-2008, 09:54 AM #1
Member
- Join Date
- Jan 2008
- Posts
- 17
- Rep Power
- 0
Unable to compile
Hello everyone,
I am new to Java and just started coding. I wrote first class which failed to compile :(
I tried to compilie it using javac command from the console but got this error message:Java Code:public class MainClass { public static void main(String[] args) { System.out.println("Hello World"); } }
I hope I have provided sufficient information. Kindly look into this.Java Code:Test.java:5: class MainClass is public, should be declared in a file named MainClass.java
- Gapper
- 01-14-2008, 11:07 AM #2
Member
- Join Date
- Jan 2008
- Posts
- 2
- Rep Power
- 0
have u saved the application as "MainClass.java"??????????
- 01-14-2008, 04:31 PM #3
Welcome to the Java Forums gapper. Error messages provide excellent clues for you to solve your compilation problems.
See you around!Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
Similar Threads
-
Unable to get a XAConnection from the DataSource.
By Eric in forum Enterprise JavaBeans (EJB)Replies: 3Last Post: 05-16-2008, 11:17 AM -
unable to exceute stored procedures
By geeta_ravikanti in forum JDBCReplies: 1Last Post: 04-22-2008, 02:39 AM -
Unable to view applets on a web browser
By thejdev in forum Java AppletsReplies: 2Last Post: 03-04-2008, 06:26 PM -
Unable to start WEbSphere server using RAD IDE
By uppaluru in forum Other IDEsReplies: 1Last Post: 02-13-2008, 07:51 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks