Re: Java on fc4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mlists wrote:
On Thu, 2005-07-14 at 09:56 -0400, Temlakos wrote:

Mlists wrote:

Has anyone got java to work with either javaws or firefox on fc4 yet ?


Java, definitely yes. I used Michael Peters' "nosrc.rpm" packages, in a "secure rpmbuild environment" (basically a user account dedicated to rpm building), to build several rpm packages from Sun's binary self-extracting source package. I then installed the JRE and J-SDK on my system. I then installed a handy Java-based text editor--couldn't be happier with it. And compiling with Java is so simple that I don't yet see a need for an Integrated Development Environment. (If anyone can tell me how to use Eclipse for that purpose, or show me where I can get some tutorial and other help, please share.) I am now using the J-SDK to develop a major Java application--or rather, "port" it from native C++ and wxWidgets. Already I find Java, Swing, and JDBC to be /far/ more powerful than their C++ equivalents.

But Java Web Start is a hopeless case. Every time I try to start anything with Java Web Start, it just starts opening window after window on Firefox until I forcibly stop it.

Java Web Start is /supposed/ to be installed with the JRE. But on my system, using Firefox, it is not working. (Then again, I can't use JavaWS on Windows XP SP2, either--I suspect that this is a security issue, and therefore I'm not even sure that having JavaWS on your system is very smart!)

Temlakos

> Could you possibly send me a copy of your java rpms as the ones on the
> sun site appear to be the ones causing all the trouble.
>
> Thanks
>

Rather than that, I will send you some links to some instructions on how to build them. If I sent you my rpm packages directly, I would be violating a license.

First, /do not/ use Sun's pre-built rpm package. It is /not/ Fedora compatible. Michael Peters will also vouch for that.

Instead, go to this link:

http://www.jpackage.org/rpm.php?id=2663

That will get you started.

How do you build RPM's? If you're like most people, you probably build them as root, using the default rpmbuild environment in the /usr filesystem. Michael Peters doesn't advise that--and neither do I, because it's an administrative nightmare and could break your system if you use an improperly written SPEC file. (Go to rpm.org for a definition of that little technical gem.) I set up a special environment just for rpm building. Read the instructions for that here:

http://mpeters.us/linux/rpmbuild.php

Once you have that in place: go back to the first link I showed you. Get the "nosrc.rpm" file, put it anywhere on your special rpmbuild user account (even the desktop will fit). Also follow the link to Sun's site

Here is a link for detailed and up-to-date rpm rebuilding instructions:

http://www.jpackage.org/rebuilding.php

Basically, the commands you need to issue are, in this order:

$ rpm -i java-1.5.0-sun-1.5.0.04-1jpp.nosrc.rpm

At this point, open a file named, I believe, java-1.5.0-sun.spec (the filename might be slightly different), which you will find in the SPECS directory of your RPM build tree (which you will have set up according to the instructions above). That will tell you what source files you need, including the binary I mentioned. Make sure all of those appear in your SOURCES directory.

Now execute:

$ rpmbuild -ba rpm/SPECS/java-1.5.0-sun.spec

(or however that spec file is named).

This will construct about eight rpm files in one of the directories named for different system architectures. You will /even/ get your very own source RPM files in case you have to rebuild for any reason.

You can install whatever you need using conventional rpm installation tools. Obviously "rpm -Uvh java..." will serve. I created my own yum-style repo on my disk, and configured a channel to the "smart" package manager. Some of the links I mentioned talk about building a yum-style repo--you'll need a command called "createrepo" to do it.

Or, "smart" (and maybe yum as well) can install "local" rpm packages for you, even if they're not in a repository.

That's my poor man's effort at a tutorial. Your best bet, of course, is to go to the source--namely the links I mentioned.

Temlakos


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux