Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

Error in GCJ (redhat linux 9.0)

Thread view: 
suprajapc@gmail.com - 18 Apr 2006 09:04 GMT
Hi All,
When we try to run the below program
public class fir
{
public static void main(Strings args[ ])
{
 System.out.println("Hello World");
}
}

using the following command gcj fir.java
it is giving this error....

[root@localhost root]# gcj fir.java
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18):
In functio
n `_start':../sysdeps/i386/elf/start.S:77: undefined reference to
`main'
collect2: ld returned 1 exit status

Waiting for the reply
Thank You
Gordon Beaton - 18 Apr 2006 09:36 GMT
> [root@localhost root]# gcj fir.java
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18):
[quoted text clipped - 4 lines]
>
> Waiting for the reply

Your problem is described in section 4 of the GCJ FAQ:

 http://gcc.gnu.org/java/faq.html

Why do you compile your code logged in as root?

/gordon

Signature

[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.