PDA

View Full Version : Come sapere se la JDK è installata?


e-commerce84
24-06-2011, 20:08
Ciao,
scusate la domanda banale ma...come posso vedere se sul mio sistema la JDK è installata e correttamente attiva?

Grazie
Andrea

wizard1993
24-06-2011, 20:57
da terminale controlli se esiste javac con
which javac
se ti da un percorso ce l'hai, altrimenti no

e-commerce84
24-06-2011, 22:45
da terminale controlli se esiste javac con
which javac
se ti da un percorso ce l'hai, altrimenti no

A me dice:


andrea@andrea-laptop:~$ javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files and annotation processors
-cp <path> Specify where to find user class files and annotation processors
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compilation is done.
-processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
-processorpath <path> Specify where to find annotation processors
-d <directory> Specify where to place generated class files
-s <directory> Specify where to place generated source files
-implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system


Se nella shell lancio java -version mi dice:


andrea@andrea-laptop:~$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
andrea@andrea-laptop:~$

*andre*
25-06-2011, 10:47
beh quindi il comando javac ce l'hai, quindi dovresti avere la jdk.
Fai un piccolo programma di prova e vedi subito :D

comunque wizard ti aveva detto di dare whitch javac, che ti stampa il percorso all'eseguibile.