java apps error

greetings,
i am trying to open a java web apps with a browser. the apps starts normally, but quits at the final step, generating a error msg. stating the apps cannot be launched because of an unexpected exception:

java.lang.NullPointerException

Apollo:~ # update alternatives --config java
If ‘update’ is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf update
Apollo:~ # alternatives --config java
If ‘alternatives’ is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf alternatives

any suggestion would be greatly appreciated.
thanks,
theo

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The commands you’re trying to run are failing because you’re not
specifying a valid comment. This may have nothing to do with your
NullPointerException but it’s what you showed so I’ll focus on it instead:

sudo /usr/sbin/update-alternatives --config java

Once you know you have Java setup properly (you probably do… not sure
what you’re really trying to do with the update-alternatives command at
this time) you may want to see if you can runt he Java application outside
of a web browser startup. Is this an applet? Something using WebStart?

Good luck.

On 02/09/2011 08:06 AM, topitz wrote:
>
> greetings,
> i am trying to open a java web apps with a browser. the apps starts
> normally, but quits at the final step, generating a error msg. stating
> the apps cannot be launched because of an unexpected exception:
>
> java.lang.NullPointerException
>
> Apollo:~ # update alternatives --config java
> If ‘update’ is not a typo you can use command-not-found to lookup the
> package that contains it, like this:
> cnf update
> Apollo:~ # alternatives --config java
> If ‘alternatives’ is not a typo you can use command-not-found to lookup
> the package that contains it, like this:
> cnf alternatives
>
> any suggestion would be greatly appreciated.
> thanks,
> theo
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNUq/GAAoJEF+XTK08PnB5sVwQAI6lQcaYEBmtXULBRU7liZ6n
qSjpgYTt7C7b42/65BkWeGqfYMfVk563QKNpomUJphzuIGRNrbirxtVXfQZ/kYHo
kaW3AUuwDvQ3RGlvr3tsSDzv0VP7P4y375AJucP3qMnYh/dxH+KCjgU2BjUXzXa6
mTf1y/sY2+xtlEk5rVSRI7L5wpclY97KzniVOCJ473tpxCKWTqtH0VtWt/2RLyHX
ruq2wkCCVWfUDWI8EixX1i9RWVDk5pg5IeDWRX1j2gjqbkQsn7xaTAjxQ+kYkL2n
G1JK4rgEFmZlt47F3TfVZiTBlozi+GpKj8JXSZ1gFRQidYvFuxMduZvsqoBIrr8q
3OjO+UWB7m+2mK4xAApTa3YxkW/+qpUotEXuRvlTqBvukiA/lB7qzrj+JnSUFYfU
YfBlS/Y/oZZHJaU1ManxtDA+asSt7Ru2OgeqanHE/ZjhcK+aLy5EBxBpr2Ni2g8z
sov8vsLjitd5U/CTzEzSlB0EC7Iw5TanlTzaI938Oe0uc7WoGCx4Z4tFjIPrCkQj
oYmeehl2bs7Tz8qXLkQlhoB5mgft38bz7wkEvEZpfQdBNfU8X6j4ZHKsHLL/w/xd
iimWS26vJlubdU05pPAQyH2mBdMmLDwJbuOdQHEyzcOmZfMMFsx90OBiGVGrKQ/U
xImilNUefW5HpjPwiZF6
=j9Gp
-----END PGP SIGNATURE-----

sudo /usr/sbin/update-alternatives --config java
generates:
update-alternatives: internal error: /var/lib/rpm/alternatives/java corrupt: priority /usr/lib64/jvm/jre-1.5.0-gcj

theo

First,
If I were to guess, you installed your Java from source, possibly from a Sun repository. I ran into this same issue in two old threads ab was so very helpful a few years ago on this same exact topic. Solution is to either install from the SuSE repositories or add the path to your java.

How to point environ var to JDK?
Problem: Sun JDK, not JRE

Tony

For reference, this is how your output should look, I have both a JRE and JDE installed

tony@SUSEBOX:~> sudo /usr/sbin/update-alternatives --config java
root's password:

There are 2 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
*+        1    /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
          2    /usr/lib/jvm/jre-1.6.0-sun/bin/java

Press enter to keep the default[li], or type selection number: ^C
[/li]tony@SuSEBOX:~>