Re: Java problem

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

 



Cameron Simpson wrote:
On 02Jan2008 12:53, Karl Larsen <k5di@xxxxxxxxxx> wrote:
Cameron Simpson wrote:
The other thing you should bear in mind is that "jar" is a tool like "ar",
"tar" or "zip" - it constructs, inspects or unpacks ".jar" files.

To _run_ a java program you want the "java" command.

Usually a Java app is distributed as a jar file, an archive containing the
program, and the command "java -jar foo.jar" is used to run it.

You still need "java" in your $PATH, or to invoke "java" explicitly (eg
"/usr/java/bin/java") if it is not in your $PATH. Usually it is desirable to
adjust your $PATH you include this stuff, saving painful long paths later.

Both "java" and "jar" have manual pages, quite good ones. If java in
installed out of the "vendor" area (here "vendor" means redhat/fedora
and "/usr/bin" is part of their area - that they expect a free hand
in), you will need to adjust your $MANPATH to include the "..../man"
directory of wherever the java package is installed, much as you have to
adjust $PATH to include the "..../bin" directory to run "java" without
using the full path of the command.
   OK I am finding this at /usr/java/:

[root@k5di ~]# ls /usr/java
default  jre1.6.0_03  latest

Now default
      ^^^^^^^
I am not sure what you mean at this ^^^ point.
Unless "default" is a symbolic link that points at "jre1.6.0_03".
The "ls -l /usr/java/" command will show this.

and /usr/java/jrel.6.0_03/ are identical and have this:

[root@k5di ~]# ls /usr/java/jre1.6.0_03/
bin        javaws  LICENSE  plugin  THIRDPARTYLICENSEREADME.txt
COPYRIGHT  lib     man      README  Welcome.html
[root@k5di ~]#

My experiance to date is that using $ java -jar filename.jar works but other problems crop up. Also I have no man java. So it is not in the searchpath for man packages. How do I fix that?

As mentioned, you want to update your $PATH and $MANPATH.
Looking at your output above I would suggest running these shell
commands:

  PATH=/usr/java/jre1.6.0_03/bin:$PATH
  MANPATH=/usr/java/jre1.6.0_03/man:$MANPATH
  export PATH MANPATH

The other thing that java tends to like is the $JAVA_HOME variable.
You might usefull do this instead:

  JAVA_HOME=/usr/java/jre1.6.0_03
  PATH=$JAVA_HOME/bin:$PATH
  MANPATH=$JAVA_HOME/man:$MANPATH
  export JAVA_HOME PATH MANPATH

The see if "man java" produces a manual page. (Be warning, it's a very
long manual page!) Also see if "java -jar filename.jar" now behaves
better.

Cheers,
I did your calls but I made then to /usr/java/default/man for example because default will become the latest java unpacked on your computer. All I did yeaterday makes the downloaded java work.

Karl


--

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
  PGP 4208 4D6E 595F 22B9 FF1C  ECB6 4A3C 2C54 FE23 53A7

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux