LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-30-2004, 03:45 PM   #1
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Rep: Reputation: 30
problem with gcj


hi

i installed gcj (compile java file, when to try it)
when i try to compile a little HelloWord i get:


collinm@linux:~> gcj --main=HelloWord -o HelloWord HelloWord.java
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/ld: can't find -lz

any idea?

thanks
 
Old 07-31-2004, 04:33 PM   #2
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
collinm@linux:~> locate libz
/lib/libz.so.1
/lib/libz.so.1.2.1
/usr/lib/libz.so.1
/usr/lib/libzvbi.so.0
/usr/lib/libzvbi.so.0.2.0
/usr/lib/SunJava2-1.4.2/jre/lib/i386/libzip.so

collinm@linux:~> echo $PATH
/home/collinm/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin


no idea?
 
Old 07-31-2004, 04:41 PM   #3
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Try creating a symlink libz.so to libz.so.1 in the same directory as it, then run ldconfig. All as root, of course.
 
Old 07-31-2004, 05:44 PM   #4
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
work fine, thanks a lot


i tried with a very simple gui program.... a program who display a number in a panel..... work fine with javac...

gcj compile it without problem but when i run it i get:

Code:
collinm@linux:~/Documents> ./Securiter
Exception in thread "main" java.lang.Error: not implemented
   at javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object) (/usr/lib/l
ibgcj.so.4.0.0)
   at javax.swing.plaf.basic.BasicDefaults.BasicDefaults() (/usr/lib/libgcj.so.4
.0.0)
   at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults() (/usr/lib/libgcj.so.                                           4.0.0)
   at javax.swing.UIManager.getDefaults() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.UIManager.getUI(javax.swing.JComponent) (/usr/lib/libgcj.so.4.                                           0.0)
   at javax.swing.JPanel.updateUI() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JPanel.JPanel(java.awt.LayoutManager, boolean) (/usr/lib/libgc                                           j.so.4.0.0)
   at javax.swing.JPanel.JPanel() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JRootPane.createGlassPane() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JRootPane.getGlassPane() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JRootPane.JRootPane() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JFrame.createRootPane() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JFrame.getRootPane() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JFrame.frameInit() (/usr/lib/libgcj.so.4.0.0)
   at javax.swing.JFrame.JFrame() (/usr/lib/libgcj.so.4.0.0)
   at Securiter.Securiter() (Unknown Source)
   at Securiter.main(java.lang.String[]) (Unknown Source)
i have this library

Code:
collinm@linux:~/Documents> ls /usr/lib/libgcj.
libgcj.a         libgcj.so        libgcj.so.4.0.0
libgcj.la        libgcj.so.4      libgcj.spec
 
Old 09-14-2004, 01:04 PM   #5
Phyrexicaid
Member
 
Registered: Aug 2004
Location: JHB - South Africa
Distribution: Kubuntu 7.04; openSUSE 10.1
Posts: 176

Rep: Reputation: 30
I've tried using the swing package with gcj but with no luck, also a simple hello world program using JOptionPane. Good to hear it works with javac though, keen to give it a try.

I had the same problem as your previous question, seems everything went awry when I deleted suse 8.2 and went to 9.1. Going to try the symbolic link thing when I get home. Thanks!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse and gcj as JDK foucault Linux - Software 0 10-23-2005 11:56 AM
Compile gettext with GCJ Prop_idze Linux - Software 2 09-26-2005 10:16 AM
need help with gcj max_rsr Programming 1 05-24-2005 03:07 AM
gcj and Gl4Java (can i get them to work together ?) qwijibow Programming 0 08-30-2004 08:22 AM
gcj jdbc verigoth Programming 1 06-02-2003 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration