Results 1 to 5 of 5
Thread: new to Java
- 06-29-2011, 01:39 PM #1
Member
- Join Date
- Jun 2011
- Posts
- 6
- Rep Power
- 0
new to Java
Hey guys .I'm just today turned to Java.I'm using GCJ compiler , and today I wrote my first program wich isn't compiling .
This is my source code
1 public class main {
2
3 public static void main( String []args) {
4
5
6
7 }
8
9 }
and the output is following
root@linux-machine:/home/arthur/java# gcj main.java
main.java:3: warning: This method has a constructor name
public static void main( String []args) {
^^^^^^^^^^^^^^^^^^^^
1 problem (1 warning)
/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
P.S. sorry for my bad english it's not my native language :)
Any help will be greatly appreciated!
-holtaf
- 06-29-2011, 01:47 PM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
I'm not sure what gcj is but I suggest you download the sdk(or Jdk always get them mixed up) and use javac.
- 06-29-2011, 02:40 PM #3
Member
- Join Date
- Jun 2011
- Posts
- 6
- Rep Power
- 0
GCJ is GNU Compiler for Java
Now i'm downloading eclipse
- 06-29-2011, 02:41 PM #4
Member
- Join Date
- Jun 2011
- Posts
- 6
- Rep Power
- 0
GCJ is GNU Compiler for Java
Now i'm downloading eclipse
- 06-29-2011, 03:26 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,480
- Rep Power
- 16


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks