FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have recently upgraded to Fedora Core 3. After the install (which went flawlessly by the way). I went poking and prodding around my fresh install looking for changes and surprise, surprise! The "javac" command is now in the /bin directory! Being an novice Java coder I immediately brought out my USB drive (another surprise! GNOME 2.8 auto-mounts the drive and gives me an icon on my desktop! Hazaaah!). After recoiling from the nifty treat GNOME 2.8 gave me, I continued by opening a terminal window. Another surprise! The /mnt directory is empty. My USB drive and all other file systems are now under /media. No problem a quick fix:
Code:
rm -rf /mnt
Code:
ln -s /media mnt
Finally after these brief surprises I get to my Java directory and type:
Code:
javac SimpleGui1P.java
The above line is how I compiled my code using the J2SDK package I aquired from java.sun.com
and I was expecting that this "javac" under my /bin meant that the package came pre-installed for me. Unfortunately, it does not seem that way. This is the error I was presented with after the javac SimpleGui1P.java line above:
Code:
libgcj-javac-placeholder.sh
This script is a placeholder for the /usr/bin/javac
master link required by jpackage.org conventions. libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.
This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
SimpleGui1P.java:0: warning: source file for class `MyDrawPanel' is newer than its matching class file. Source file `./MyDrawPanel.java' used instead
I am assuming that the "javac" that comes with Fedora Core 3 is different from the one that ships with the J2SDK package. I am just wondering what these differences might be? Also would it affect anything on my system if I removed the "javac" under my /bin directory and added my J2SDK path to my PATH variable in order to use the "javac" command that comes with J2SDK package?
Ah ha! The answer reveals itself! Thanks for mentioning the gcc-java package. When I did my install I took the defaults for gcc configuration. I started an install on a separate machine and sure enough, in the Developments Tools list was gcc-java pre-selected and ready to install! Thanks a bunch, I never would have thought to look that up!
Also would it affect anything on my system if I removed the "javac" under my /bin directory and added my J2SDK path to my PATH variable in order to use the "javac" command that comes with J2SDK package?
Better thing to do - use the PATH
create an executable file in /etc/profile.d/ called j2sdk.sh
It should contain something like:
Code:
#!/bin/sh
export JAVA_HOME=/opt/blackdown/j2sdk-1.4.2
if [ `echo $PATH |grep -c "$JAVA_HOME"` -eq 0 ]; then
export PATH=$JAVA_HOME/bin:$PATH
fi
That will put your j2sdk tools before any Fedora installed tools, and you don't have to remove anything.
Originally posted by caps_phisto I have recently upgraded to Fedora Core 3. After the install (which went flawlessly by the way). I went poking and prodding around my fresh install looking for changes and surprise, surprise! The "javac" command is now in the /bin directory! Being an novice Java coder I immediately brought out my USB drive (another surprise! GNOME 2.8 auto-mounts the drive and gives me an icon on my desktop! Hazaaah!). After recoiling from the nifty treat GNOME 2.8 gave me, I continued by opening a terminal window. Another surprise! The /mnt directory is empty. My USB drive and all other file systems are now under /media. No problem a quick fix:
Code:
rm -rf /mnt
Code:
ln -s /media mnt
Finally after these brief surprises I get to my Java directory and type:
Code:
javac SimpleGui1P.java
The above line is how I compiled my code using the J2SDK package I aquired from java.sun.com
and I was expecting that this "javac" under my /bin meant that the package came pre-installed for me. Unfortunately, it does not seem that way. This is the error I was presented with after the javac SimpleGui1P.java line above:
Code:
libgcj-javac-placeholder.sh
This script is a placeholder for the /usr/bin/javac
master link required by jpackage.org conventions. libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.
This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
SimpleGui1P.java:0: warning: source file for class `MyDrawPanel' is newer than its matching class file. Source file `./MyDrawPanel.java' used instead
I am assuming that the "javac" that comes with Fedora Core 3 is different from the one that ships with the J2SDK package. I am just wondering what these differences might be? Also would it affect anything on my system if I removed the "javac" under my /bin directory and added my J2SDK path to my PATH variable in order to use the "javac" command that comes with J2SDK package?
Thanks in advance.
Man, I saw that when I tried to get my java running. If you could take the time to explaine to me what you did and how you did it to make java work for you would be great. Heck, I'll even offer my first born! Trust me, you get off easy. He's 21 now and fully house broken and even polite and pleasure to be around..... 6 years ago was not the case.. Anyway, I digress ..... I've been battling with my Fedora core 3 and java now for two weeks trying to get it working.
like I said, I actually saw that
"libgcj-javac-placeholder.sh
This script is a placeholder for the /usr/bin/javac
master link required by jpackage.org conventions. libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.
This change was necessary because the rmiregistry, rmic and jar tools
installed by previous" thing but I really didn't know what do with it.
If your trying to use SUN J2SDK instead of this one, what I suggest you to do is:
- Edit your .bash_profile (or other profile, depending on which shell you use) to include, in the beginning of PATH, the path to the bin dir of your JVM. By doing this, when you try to compile or run java stuff, the system will search first in this dir for javac and java.
e.g. PATH = /usr/local/java/bin:$PATH...
- Include (still in your profile) a variable JAVA_HOME that points to your java home dir
e.g. JAVA_HOME = /usr/local/java/
export JAVA_HOME
I believe that should be enough.
Last edited by marconegao; 01-12-2005 at 03:04 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.