Problem z instalacją javy i eclipse


(Artur520) #1

Witam, zainstalowałem sobie świeżutki system ubuntu 14.04.

 

No i zacząłem walczyć z instalacją wszystkiego

 

Za pomocą komend

 

add-apt-respository ppa:webupd8team/java
apt-get update
apt-get install oracle-java7-installer

 

Zainstalowałem jave. Potem zgodnie z tym poradnikiem: http://tutorialforlinux.com/2014/04/13/how-to-install-eclipse-4-4-luna-for-java-developers-on-ubuntu-14-04-trusty-lts-32-64bit-easy-visual-guide/

 

Niestety uruchomienie kończy się czymś takim:

root@artur-Aspire-5820TG:/home/artur/Pobrane/eclipse# eclipse
find: `/root/.eclipse': Nie ma takiego pliku ani katalogu
find: `/root/.eclipse': Nie ma takiego pliku ani katalogu
W: Cannot inject update-sites, cannot find the correct config.

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Eclipse:10968): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

 

Widzę, że brakuje "find: `/root/.eclipse':" lecz nie wiem jak to naprawić :confused: Docelowo chce mieć jave 8 i eclipse z możliwością programowania w C/C++ (będe potrzebował CDT wiem) oraz w javie. Jak sobie z tym poradzić.

 


(marcin82) #2

Zwróć uwagę z jakiego konta są wykonywane polecenia w poradniku - nie mam siły teraz tego sprawdzać :smiley:


(Artur520) #3

Wszystko robilem spod roota…


(Frankfurterium) #4

Eclipse powinien działać sam z siebie i bez żadnej magii. Co się dzieje, kiedy bez zabawy w ikonki menu zwyczajnie wejdziesz do katalogu i wystartujesz program?


(Artur520) #5

Okno wisi. Jeśli robię to spod terminala to okno nadal wisi i sypie tymi samymi błędami… 


(marcin82) #6

Co pokazuje polecenia wykonane z konta użytkownika?

 

which eclipse-luna

eclipse-luna

ls -al /etc/alternatives | grep java

update-alternatives --display java

(Artur520) #7
artur@artur-Aspire-5820TG:~$ su
Hasło:
root@artur-Aspire-5820TG:/home/artur# which eclipse-luna
/usr/local/bin/eclipse-luna
root@artur-Aspire-5820TG:/home/artur# eclipse-luna

(java:12403): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(java:12403): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(java:12403): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
^C
root@artur-Aspire-5820TG:/home/artur# ls -al /etc/alternatives | grep java
lrwxrwxrwx   1 root root    43 lip  5 21:56 appletviewer -> /usr/lib/jvm/java-7-oracle/bin/appletviewer
lrwxrwxrwx   1 root root    53 lip  5 21:56 appletviewer.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/appletviewer.1.gz
lrwxrwxrwx   1 root root    47 lip  5 21:55 ControlPanel -> /usr/lib/jvm/java-7-oracle/jre/bin/ControlPanel
lrwxrwxrwx   1 root root    39 lip  5 21:56 extcheck -> /usr/lib/jvm/java-7-oracle/bin/extcheck
lrwxrwxrwx   1 root root    49 lip  5 21:56 extcheck.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/extcheck.1.gz
lrwxrwxrwx   1 root root    35 lip  5 21:56 idlj -> /usr/lib/jvm/java-7-oracle/bin/idlj
lrwxrwxrwx   1 root root    45 lip  5 21:56 idlj.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/idlj.1.gz
lrwxrwxrwx   1 root root    34 lip  5 21:56 jar -> /usr/lib/jvm/java-7-oracle/bin/jar
lrwxrwxrwx   1 root root    44 lip  5 21:56 jar.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jar.1.gz
lrwxrwxrwx   1 root root    40 lip  5 21:56 jarsigner -> /usr/lib/jvm/java-7-oracle/bin/jarsigner
lrwxrwxrwx   1 root root    50 lip  5 21:56 jarsigner.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jarsigner.1.gz
lrwxrwxrwx   1 root root    39 lip  5 21:55 java -> /usr/lib/jvm/java-7-oracle/jre/bin/java
lrwxrwxrwx   1 root root    45 lip  5 21:55 java.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/java.1.gz
lrwxrwxrwx   1 root root    36 lip  5 21:56 javac -> /usr/lib/jvm/java-7-oracle/bin/javac
lrwxrwxrwx   1 root root    46 lip  5 21:56 javac.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/javac.1.gz
lrwxrwxrwx   1 root root    38 lip  5 21:56 javadoc -> /usr/lib/jvm/java-7-oracle/bin/javadoc
lrwxrwxrwx   1 root root    48 lip  5 21:56 javadoc.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/javadoc.1.gz
lrwxrwxrwx   1 root root    45 lip  5 21:56 javafxpackager -> /usr/lib/jvm/java-7-oracle/bin/javafxpackager
lrwxrwxrwx   1 root root    55 lip  5 21:56 javafxpackager.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/javafxpackager.1.gz
lrwxrwxrwx   1 root root    36 lip  5 21:56 javah -> /usr/lib/jvm/java-7-oracle/bin/javah
lrwxrwxrwx   1 root root    46 lip  5 21:56 javah.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/javah.1.gz
lrwxrwxrwx   1 root root    36 lip  5 21:56 javap -> /usr/lib/jvm/java-7-oracle/bin/javap
lrwxrwxrwx   1 root root    46 lip  5 21:56 javap.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/javap.1.gz
lrwxrwxrwx   1 root root    42 lip  5 21:55 java_vm -> /usr/lib/jvm/java-7-oracle/jre/bin/java_vm
lrwxrwxrwx   1 root root    41 lip  5 21:55 javaws -> /usr/lib/jvm/java-7-oracle/jre/bin/javaws
lrwxrwxrwx   1 root root    47 lip  5 21:55 javaws.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/javaws.1.gz
lrwxrwxrwx   1 root root    35 lip  5 21:56 jcmd -> /usr/lib/jvm/java-7-oracle/bin/jcmd
lrwxrwxrwx   1 root root    45 lip  5 21:56 jcmd.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jcmd.1.gz
lrwxrwxrwx   1 root root    39 lip  5 21:56 jconsole -> /usr/lib/jvm/java-7-oracle/bin/jconsole
lrwxrwxrwx   1 root root    49 lip  5 21:56 jconsole.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jconsole.1.gz
lrwxrwxrwx   1 root root    43 lip  5 21:56 jcontrol -> /usr/lib/jvm/java-7-oracle/jre/bin/jcontrol
lrwxrwxrwx   1 root root    34 lip  5 21:56 jdb -> /usr/lib/jvm/java-7-oracle/bin/jdb
lrwxrwxrwx   1 root root    44 lip  5 21:56 jdb.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jdb.1.gz
lrwxrwxrwx   1 root root    36 lip  5 18:50 jdeps -> /usr/lib/jvm/java-8-oracle/bin/jdeps
lrwxrwxrwx   1 root root    46 lip  5 18:50 jdeps.1.gz -> /usr/lib/jvm/java-8-oracle/man/man1/jdeps.1.gz
lrwxrwxrwx   1 root root    40 lip  5 21:56 jexec -> /usr/lib/jvm/java-7-oracle/jre/lib/jexec
lrwxrwxrwx   1 root root    45 lip  5 21:56 jexec-binfmt -> /usr/lib/jvm/java-7-oracle/jre/lib/jar.binfmt
lrwxrwxrwx   1 root root    35 lip  5 21:56 jhat -> /usr/lib/jvm/java-7-oracle/bin/jhat
lrwxrwxrwx   1 root root    45 lip  5 21:56 jhat.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jhat.1.gz
lrwxrwxrwx   1 root root    36 lip  5 21:56 jinfo -> /usr/lib/jvm/java-7-oracle/bin/jinfo
lrwxrwxrwx   1 root root    46 lip  5 21:56 jinfo.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jinfo.1.gz
lrwxrwxrwx   1 root root    38 lip  5 18:50 jjs -> /usr/lib/jvm/java-8-oracle/jre/bin/jjs
lrwxrwxrwx   1 root root    44 lip  5 18:50 jjs.1.gz -> /usr/lib/jvm/java-8-oracle/man/man1/jjs.1.gz
lrwxrwxrwx   1 root root    35 lip  5 21:56 jmap -> /usr/lib/jvm/java-7-oracle/bin/jmap
lrwxrwxrwx   1 root root    45 lip  5 21:56 jmap.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jmap.1.gz
lrwxrwxrwx   1 root root    34 lip  5 21:56 jmc -> /usr/lib/jvm/java-7-oracle/bin/jmc
lrwxrwxrwx   1 root root    44 lip  5 21:56 jmc.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jmc.1.gz
lrwxrwxrwx   1 root root    34 lip  5 21:56 jps -> /usr/lib/jvm/java-7-oracle/bin/jps
lrwxrwxrwx   1 root root    44 lip  5 21:56 jps.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jps.1.gz
lrwxrwxrwx   1 root root    41 lip  5 21:56 jrunscript -> /usr/lib/jvm/java-7-oracle/bin/jrunscript
lrwxrwxrwx   1 root root    51 lip  5 21:56 jrunscript.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jrunscript.1.gz
lrwxrwxrwx   1 root root    40 lip  5 21:56 jsadebugd -> /usr/lib/jvm/java-7-oracle/bin/jsadebugd
lrwxrwxrwx   1 root root    50 lip  5 21:56 jsadebugd.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jsadebugd.1.gz
lrwxrwxrwx   1 root root    37 lip  5 21:56 jstack -> /usr/lib/jvm/java-7-oracle/bin/jstack
lrwxrwxrwx   1 root root    47 lip  5 21:56 jstack.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jstack.1.gz
lrwxrwxrwx   1 root root    36 lip  5 21:56 jstat -> /usr/lib/jvm/java-7-oracle/bin/jstat
lrwxrwxrwx   1 root root    46 lip  5 21:56 jstat.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jstat.1.gz
lrwxrwxrwx   1 root root    37 lip  5 21:56 jstatd -> /usr/lib/jvm/java-7-oracle/bin/jstatd
lrwxrwxrwx   1 root root    47 lip  5 21:56 jstatd.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jstatd.1.gz
lrwxrwxrwx   1 root root    40 lip  5 21:56 jvisualvm -> /usr/lib/jvm/java-7-oracle/bin/jvisualvm
lrwxrwxrwx   1 root root    50 lip  5 21:56 jvisualvm.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/jvisualvm.1.gz
lrwxrwxrwx   1 root root    42 lip  5 21:56 keytool -> /usr/lib/jvm/java-7-oracle/jre/bin/keytool
lrwxrwxrwx   1 root root    48 lip  5 21:56 keytool.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/keytool.1.gz
lrwxrwxrwx   1 root root    30 lip  5 21:39 lucli -> /usr/lib/liblucene2-java/lucli
lrwxrwxrwx   1 root root    35 lip  5 21:39 lucli.1.gz -> /usr/lib/liblucene2-java/lucli.1.gz
lrwxrwxrwx   1 root root    52 lip  5 21:56 mozilla-javaplugin.so -> /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so
lrwxrwxrwx   1 root root    43 lip  5 21:56 native2ascii -> /usr/lib/jvm/java-7-oracle/bin/native2ascii
lrwxrwxrwx   1 root root    53 lip  5 21:56 native2ascii.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/native2ascii.1.gz
lrwxrwxrwx   1 root root    39 lip  5 21:56 orbd -> /usr/lib/jvm/java-7-oracle/jre/bin/orbd
lrwxrwxrwx   1 root root    45 lip  5 21:56 orbd.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/orbd.1.gz
lrwxrwxrwx   1 root root    42 lip  5 21:56 pack200 -> /usr/lib/jvm/java-7-oracle/jre/bin/pack200
lrwxrwxrwx   1 root root    48 lip  5 21:56 pack200.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/pack200.1.gz
lrwxrwxrwx   1 root root    45 lip  5 21:56 policytool -> /usr/lib/jvm/java-7-oracle/jre/bin/policytool
lrwxrwxrwx   1 root root    51 lip  5 21:56 policytool.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/policytool.1.gz
lrwxrwxrwx   1 root root    35 lip  5 21:56 rmic -> /usr/lib/jvm/java-7-oracle/bin/rmic
lrwxrwxrwx   1 root root    45 lip  5 21:56 rmic.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/rmic.1.gz
lrwxrwxrwx   1 root root    39 lip  5 21:56 rmid -> /usr/lib/jvm/java-7-oracle/jre/bin/rmid
lrwxrwxrwx   1 root root    45 lip  5 21:56 rmid.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/rmid.1.gz
lrwxrwxrwx   1 root root    46 lip  5 21:56 rmiregistry -> /usr/lib/jvm/java-7-oracle/jre/bin/rmiregistry
lrwxrwxrwx   1 root root    52 lip  5 21:56 rmiregistry.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/rmiregistry.1.gz
lrwxrwxrwx   1 root root    40 lip  5 21:56 schemagen -> /usr/lib/jvm/java-7-oracle/bin/schemagen
lrwxrwxrwx   1 root root    50 lip  5 21:56 schemagen.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/schemagen.1.gz
lrwxrwxrwx   1 root root    40 lip  5 21:56 serialver -> /usr/lib/jvm/java-7-oracle/bin/serialver
lrwxrwxrwx   1 root root    50 lip  5 21:56 serialver.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/serialver.1.gz
lrwxrwxrwx   1 root root    45 lip  5 21:56 servertool -> /usr/lib/jvm/java-7-oracle/jre/bin/servertool
lrwxrwxrwx   1 root root    51 lip  5 21:56 servertool.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/servertool.1.gz
lrwxrwxrwx   1 root root    44 lip  5 21:56 tnameserv -> /usr/lib/jvm/java-7-oracle/jre/bin/tnameserv
lrwxrwxrwx   1 root root    50 lip  5 21:56 tnameserv.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/tnameserv.1.gz
lrwxrwxrwx   1 root root    44 lip  5 21:56 unpack200 -> /usr/lib/jvm/java-7-oracle/jre/bin/unpack200
lrwxrwxrwx   1 root root    50 lip  5 21:56 unpack200.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/unpack200.1.gz
lrwxrwxrwx   1 root root    36 lip  5 21:56 wsgen -> /usr/lib/jvm/java-7-oracle/bin/wsgen
lrwxrwxrwx   1 root root    46 lip  5 21:56 wsgen.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/wsgen.1.gz
lrwxrwxrwx   1 root root    39 lip  5 21:56 wsimport -> /usr/lib/jvm/java-7-oracle/bin/wsimport
lrwxrwxrwx   1 root root    49 lip  5 21:56 wsimport.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/wsimport.1.gz
lrwxrwxrwx   1 root root    34 lip  5 21:56 xjc -> /usr/lib/jvm/java-7-oracle/bin/xjc
lrwxrwxrwx   1 root root    44 lip  5 21:56 xjc.1.gz -> /usr/lib/jvm/java-7-oracle/man/man1/xjc.1.gz
root@artur-Aspire-5820TG:/home/artur# update-alternatives --display java
java - tryb ręczny
  dowiązanie obecnie wskazuje na /usr/lib/jvm/java-7-oracle/jre/bin/java
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java - priorytet 1071
 podrzędne java.1.gz: /usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/java.1.gz
/usr/lib/jvm/java-7-oracle/jre/bin/java - priorytet 1072
 podrzędne java.1.gz: /usr/lib/jvm/java-7-oracle/man/man1/java.1.gz
/usr/lib/jvm/java-8-oracle/jre/bin/java - priorytet 1
 podrzędne java.1.gz: /usr/lib/jvm/java-8-oracle/man/man1/java.1.gz
Obecnie "najlepszą" wersją jest "/usr/lib/jvm/java-7-oracle/jre/bin/java".
root@artur-Aspire-5820TG:/home/artur#

(marcin82) #8

Z konta zwykłego użytkownika uruchom:

eclipse-luna

Znak zachęty użytkownika wygląda na przykład tak:


(Artur520) #9
artur@artur-Aspire-5820TG:~$ eclipse-luna

(java:12729): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Brak dostępu.  dconf will not work properly.

(java:12729): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Brak dostępu.  dconf will not work properly.

(java:12729): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Brak dostępu.  dconf will not work properly.

(Jusko) #10
(java:12729): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Brak dostępu. dconf will not work properly.

Wygląda to mniej więcej tak, że nie masz do tego dostępu. Dlaczego wykonywałeś czynności z roota? Być może źle pamiętam, ale czy Eclipse nie był czasem w formie zwykłego tar.gz do rozpakowania i po prostu uruchomienia?

 

Dawno jednakże Eclipse nie widziałem, więc coś może się zdezaktualizowało :slight_smile:

 

Zamiast walczyć też specjalnie z tym, żeby wpakować Javę od Oracle, mogłeś po prostu zainstalować na szybko openJDK. Być może jednak potrzebujesz stricte Oraclowskiego wydania, wtedy rozumiem.

 

EDIT:

 

Sprawdziłem u siebie - mam w systemie openJDK 7. Ściągnąłem tar.gz z Eclipse, rozpakowałem, klik i działa. Bez roota, bez kombinacji. Niestety nie wiem co pisze w podanym tutorialu, gdyż strona po prostu nie chce mi się wczytać, jednak generalnie u mnie bez problemów, bez kombinacji - zwykłe openJDK z repo, Eclipse z jego www i tyle.


(Artur520) #11

Wiem o tym, że w ten sposób można było zrobić. Chciałem jednak od razu dograć sobie CDT chociażby… Jest mi ktoś w stanie powiedzieć co teraz zrobić, aby działało to normalnie? Ewentualnie moge zrobić szybki reinstall bo na tą chwile jest czysty system… :stuck_out_tongue:


(enedil) #12

Postaw nowy system, a następnie starczy

sudo apt-get install eclipse{,-cdt}


(Artur520) #13

Tak też wczoraj uczyniłem :slight_smile: