LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Oracle Java installed but not "recognized" by dpkg? (https://www.linuxquestions.org/questions/linux-newbie-8/oracle-java-installed-but-not-recognized-by-dpkg-939443/)

cpb 04-12-2012 08:00 AM

Oracle Java installed but not "recognized" by dpkg?
 
Hello,

I am running on a Debian system
Code:

Linux Wobbegong 3.2.0-2-amd64 #1 SMP Tue Mar 20 18:36:37 UTC 2012 x86_64 GNU/Linux
everything actually works (even Oracle Java)
Code:

java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)

HOWEVER, when I try to install nixnote (an evernote clone) as a amd64 deb package I get the following "error"

Code:

dpkg -i nixnote-1.2_amd64.deb
(Lese Datenbank ... 185641 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Ersetzen von nixnote 1.2 (durch nixnote-1.2_amd64.deb) ...
Ersatz für nixnote wird entpackt ...
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von nixnote:
 nixnote hängt ab von openjdk-6-jre | openjdk-6-jdk | sun-java6-jdk | sun-java6-jre | java6-sdk | java6-runtime | default-jre; aber:
  Paket openjdk-6-jre:amd64 ist nicht installiert.
  Paket openjdk-6-jdk ist nicht installiert.
  Paket sun-java6-jdk ist nicht installiert.
  Paket sun-java6-jre ist nicht installiert.
  Paket java6-sdk ist nicht installiert.
  Paket java6-runtime ist nicht installiert.
  Paket openjdk-6-jre:amd64, das java6-runtime bereitstellt, ist nicht installiert.
  Paket default-jre ist nicht installiert.
dpkg: Fehler beim Bearbeiten von nixnote (--install):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Trigger für man-db werden verarbeitet ...
Trigger für desktop-file-utils werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 nixnote

Somehow dpkg or apt or whatever does not recognize that java is actually installed (sorry it is written in German but the dpkg can not find sun-java6-jre)?

I had the same error with jre 6.31 - so I gave it a try to update to jre 7 but the error remained the same.

I think I just miss something small to get the thing working (do I need to set some variables or softlink or package?).

Therefore I would really appreciate if you could help me out here.

Many thanks.

Regards,
Chris

craigevil 04-12-2012 12:31 PM

How are you installing Oracle's java?

Try these commands and make sure both point to Oracle's Java
Code:

update-alternatives --config java
update-alternatives --config javac


cpb 04-13-2012 04:09 AM

I installed from source using java-package to create corresponding deb-file (which flawlessly installed)

Code:

update-alternatives --config java
Es gibt 2 Auswahlmöglichkeiten für die Alternative java (welche /usr/bin/java bereitstellen).

  Auswahl      Pfad                                  Priorität Status
------------------------------------------------------------
  0            /usr/bin/gij-4.6                      1046      Auto-Modus
  1            /usr/bin/gij-4.6                      1046      manueller Modus
* 2            /usr/lib/jvm/j2re1.7-oracle/bin/java  316      manueller Modus

BUT

Code:

update-alternatives --config javac
update-alternatives: Fehler: Keine Alternativen für javac.

What is javac respectively where is it located??? Do I really need the compiler???


All times are GMT -5. The time now is 01:55 AM.