aspose file tools*
The moose likes Linux / UNIX and the fly likes Install Issues - Fedora Core 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Install Issues - Fedora Core 1" Watch "Install Issues - Fedora Core 1" New topic
Author

Install Issues - Fedora Core 1

Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
Has anybody had any luck getting Java to work on Linux (specifically Red Hat Fedora Core 1)? I have tried, but I cannot get either the j2re, j2sdk or any java editor to work... maybe Fedora is not yet supported? I assumed that it would work since Red Hat is supposed to... I'm afraid I'm a Windows user who is trying to convert to Linux to get away from the corporate machine, so installing on Linux isn't my forte... yet.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I'm going to move this to the Linux/UNIX forum, and then follow up.


[Jess in Action][AskingGoodQuestions]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

OK, here we are. You won't have any trouble installing the JDK on Fedora Core, or on any reasonably modern Linux, for that matter. Nevertheless, there are plenty of gotchas for the Linux newbie, mostly having to do with file permissions.
You can help up help you by narrowing things down a bit. Tell us what you did, what you expected to happen, and what happened instead. It also may be helpful to let us know if you did whatever you did as a normal user or as root.
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
I downloaded the j2sdk-1_4_2_04-linux-i586-rpm.bin from the Sun Java site. I opened a terminal screen, then modified the permissions with chmod a+x. Next I extracted the file, the performed rpm -iv j2sdk-1_4_2_04-linux-i586.rpm. It installed to /usr/java/j2re1.4.2_04. From this point, I assumed it worked. I know in Windows that I ensure the classpath and path are set, but I'm not so familiar with Linux yet... so I figured the install would do that for me, and I couldn't find any additional info on that for Linux. I then went to the Java website to the link "test JVM" (http://www.java.com/en/download/help/testvm.jsp). This site told me that the plug-in was not installed. I followed the instructions on that link (setup Mozilla with edit/preferences..., and also cleared the cache. I then repeated the entire process with j2re-1_4_2_04-linux-i586-rpm.bin... which leaves me here now at your mercy.
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
Sorry... I neglected to mention I did this all as root.
Nart
Ranch Hand

Joined: May 28, 2002
Posts: 95
Matt,
after installing the RPM, update your PATH to include the bin directory of the SDK install. Your PATH is specified in: /home/xxxx/.bash_profile
Check this: http://www.yolinux.com/TUTORIALS/LinuxTutorialJava.html#INSTALLSDK
or this: http://java.sun.com/j2se/1.4.2/install-linux.html
Nart
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
Thanks for the help. I am able now to get applications (from terminal) to run appropriately, but I still have troubles with applets through the browser. I read and followed the instructions for setting this up on the Sun Java site (set up symbollic link in the .mozilla and .netscape directories in my home directory.), but it still won't work. I feel (again) like I'm either illiterate, or missing something simple.
My browser is Mozilla 1.4.1
Thanks.
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
Seems to be a browser issue, I get it to work with other browsers. Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Java support for browsers is entirely dependent on what - if any - java plugins are available for the browser in question. That's regardless of the OS. For example, IE is stuck somewhere back around JDK 1.02 because Microsoft was too snitty to keep their Java support up to date if they weren't allowed to own Java.
However, under Linux it can be a real pain, since there are some major incompatibilities between C compilers (Gcc 2 vs. gcc 3). You have to get a JVM plugin that's compiled for the same C environment that your browser works in.


Customer surveys are for companies who didn't pay proper attention to begin with.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

I just recently installed Fedora Core 1, and installed Java (including the Plugin) sucessfully, so hopefully I can recall everything I did -

First, installed the RPM for the 1.4.2 JDK from Sun (as root). Sounds like you were able to do this sucessfully.

I then make a symbolic link "/usr/java/java" to the specific JDK install directory - I think this is easier if or when I want to update my Java installation than to mess with the JAVA_HOME environment variable (still as root).


Then, I updated (still as root) the /etc/profile (this provides system wide environment variables... I would rather update this here than in every user's profile) with the following -


Then I made a symbolic link (still as root) in my mozilla plugins directory to the Java Plugin in the JRE inside the JDK directory. The version that worked was the "ns610-gcc32" version. (I tried running the Java Plugin installer that the install docs that come with the JDK recommend, but it installed the plain "ns610" version, which didn't work, and it used a direct link to the JDK directory rather than the symbolic /usr/java/java link I created. )


I then logged out and logged back in and everything worked. If you run into any problems, please just post back. If I've forgotten any steps, I'll update my post...
[ April 29, 2004: Message edited by: Nathan Pruett ]

-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Acutally, that's a bit of overkill. AFAIK, the environment variables pertaining to java aren't used by Mozilla, so only the softlink to the JVM's plugin is really needed. Or at least that's all I ever did.
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
thanks. That last tip on the symbolic link got it working in my Mozilla browser as well. I had it working in konqueror...
Thanks all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Install Issues - Fedora Core 1