PDA

View Full Version : problemi java e debian...


Miky Mouse
24-08-2008, 14:43
salve a tutti,
non capisco che è successo con java, praticamente non funzionano più i programmi scritti in questo linguaggio... da shell scrivendo "java" questo è l'output....

# java
Usage: gij [OPTION] ... CLASS [ARGS] ...
to invoke CLASS.main, or
gij -jar [OPTION] ... JARFILE [ARGS] ...
to execute a jar file
Try `gij --help' for more information.


mentre mi ricordo che prima era una cosa tipo

$ java
Usage: java [-options] class [args...]
...


ho anche provato a riscaricare dal sito sun questo: "jdk-6u7-linux-i586.bin" e l'ho installato correttamente...

come faccio a riportarlo a come stava prima, visto che penso che il problema sia quello?

Gimli[2BV!2B]
24-08-2008, 15:17
Da amministratore usa il comando
update-alternatives --config java

Alcune volte, dopo alcuni aggiornamenti, l'impostazione finisce persa (soprattutto se non si usa il Java dei repository).

ho anche provato a riscaricare dal sito sun
Scaricato da Sun?
Come ho già accennato, è nei repository, sezione non free:root@altarf:/home/gloin# apt-cache search --names-only sun-java6
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)
sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples
sun-java6-doc - Sun JDK(TM) Documention -- integration installer
sun-java6-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java6-javadb - Java(TM) DB, Sun Microsystems' distribution of Apache Derby
sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)
sun-java6-plugin - The Java(TM) Plug-in, Java SE 6
sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files
Per avere a disposizione anche i contrib ed i non-free (e quindi Java) edita /etc/apt/sources.list assicurandoti che le righe dei repository Debian terminino con le tre parole magiche main contrib non-free.
Esempio:
deb http://ftp.it.debian.org/debian/ experimental main contrib non-free

Miky Mouse
24-08-2008, 16:20
grazie risolto con update-alternatives --config java