How To Update And Upgrade Java In Kali Linux

Upgrade java in kali linux


root@kali:/var/www# java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)
OpenJDK Server VM (build 20.0-b12, mixed mode)
root@kali:/var/www# apt-get install java
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package java
root@kali:/var/www# javac
Usage: javac
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 Specify where to find user class files and annotation processors
-cp Specify where to find user class files and annotation processors
-sourcepath Specify where to find input source files
-bootclasspath Override location of bootstrap class files
-extdirs Override location of installed extensions
-endorseddirs Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compilation is done.
-processor [,,...]Names of the annotation processors to run; bypasses default discovery process
-processorpath Specify where to find annotation processors
-d Specify where to place generated class files
-s Specify where to place generated source files
-implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
-encoding Specify character encoding used by source files
-source Provide source compatibility with specified release
-target 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 Pass directly to the runtime system
-Werror Terminate compilation if warnings occur

root@kali:/var/www# java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-client to select the "client" VM
-server to select the "server" VM
-jamvm to select the "jamvm" VM
-cacao to select the "cacao" VM
-zero to select the "zero" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is server,
because you are running on a server-class machine.


-cp
-classpath
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:...|:]
-enableassertions[:...|:]
enable assertions with specified granularity
-da[:...|:]
-disableassertions[:...|:]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:[=]
load native agent library , e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:[=]
load native agent library by full pathname
-javaagent:[=]
load Java programming language agent, see java.lang.instrument
-splash:
show splash screen with specified image
See http://java.sun.com/javase/reference for more details.
root@kali:/var/www# cd
root@kali:~# cd Desktop/
root@kali:~/Desktop# mv jdk1.7.0_51/ /opt/
root@kali:~/Desktop# cd /opt/jdk1.7.0_51/
root@kali:/opt/jdk1.7.0_51# update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_51/bin/java 1
root@kali:/opt/jdk1.7.0_51# update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_51/bin/javac 1
root@kali:/opt/jdk1.7.0_51# update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_51/lib/i386/libnpjp2.so 1
update-alternatives: error: alternative path /opt/jdk1.7.0_51/lib/i386/libnpjp2.so doesn't exist
root@kali:/opt/jdk1.7.0_51# update-alternatives --set java /opt/jdk1.7.0_51/bin/java
update-alternatives: using /opt/jdk1.7.0_51/bin/java to provide /usr/bin/java (java) in manual mode
root@kali:/opt/jdk1.7.0_51# update-alternatives --set javac /opt/jdk1.7.0_51/bin/javac
update-alternatives: using /opt/jdk1.7.0_51/bin/javac to provide /usr/bin/javac (javac) in manual mode
root@kali:/opt/jdk1.7.0_51# cd
root@kali:~# java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Server VM (build 24.51-b03, mixed mode)
root@kali:~#



thank you :0

Postingan terkait:

Belum ada tanggapan untuk "How To Update And Upgrade Java In Kali Linux"

Post a Comment