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

Re: Java problem



Karl Larsen wrote:
Cameron Simpson wrote:
On 01Jan2008 09:10, Karl Larsen <k5di zianet com> wrote:
If you are doing a default x86 Sun JDK install, you will find the
distributables in /usr/java/jdk.../bin directory. If you are using Java
6 then you should also see /usr/java/default and /usr/java/latest
symlinks pointing to the Java6 directory.

You could add /usr/java/default/bin to your path (either by modifying
/etc/profile file, or in any other file that you use to setup your
environment)

Now, you should be able to run whatever command that you wanted to run:
    java -jar XYZ.jar

Rogue
Hi Rogue, I would never guessed the above. Turns out you need to be using a root login.

No, you should _not_ have to be root. In fact, you should try quite hard
to avoid being root when not doing system administration.

| But I have the jEdit installed but now reading the man page to
see how to do it :-)

Always a good start.

Thank you so much. I was sure that having no /usr/bin/jar meant I did something wrong. But the new stuff takes new ways. Thanks a lot!

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.

Cheers,
   OK I am finding this at /usr/java/:

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

Now default 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?

Karl


Well I tried to get an earlier version of jedit to run and sure enough a NEW JAVA problem. From the error notice that says this:

[karl k5di ~]$ jedit
GC Warning: Out of Memory!  Returning NIL!
Exception in thread "main" GC Warning: Out of Memory!  Returning NIL!
java.lang.NoClassDefFoundError: org.gjt.sp.jedit.jEdit
*** Got java.lang.OutOfMemoryError while trying to print stack trace.
[karl k5di ~]$

I can't tell if it is a problem with jedit or my version 6 java. I don't know what GC is and org.gjt.sp.jedit.jedit is greek to me.

Karl


--

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


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