why can't I run java in ubuntu even with these commands? -


i entered command this.

stillily@ubuntu:~$ cd desktop/ stillily@ubuntu:~/desktop$ cd jdk1.8.0_51/ stillily@ubuntu:~/desktop/jdk1.8.0_51$ cd bin/ stillily@ubuntu:~/desktop/jdk1.8.0_51/bin$ ls appletviewer  jar        javadoc         javapackager  jconsole  jhat  jmc         jsadebugd  jvisualvm     pack200     rmiregistry  tnameserv  xjc controlpanel  jarsigner  javafxpackager  java-rmi.cgi  jcontrol  jinfo  jmc.ini     jstack     keytool       policytool  schemagen    unpack200 extcheck      java       javah           javaws        jdb       jjs    jps         jstat      native2ascii  rmic        serialver    wsgen idlj          javac      javap           jcmd          jdeps     jmap   jrunscript  jstatd     orbd          rmid        servertool   wsimport stillily@ubuntu:~/desktop/jdk1.8.0_51/bin$ java program 'java' can found in following packages: 

and confused me lot morning can run java correctly.

you trying use downloaded version of java, not system wide install. means need prefix command path:

$ ./java # when you're in bin directory $ ~/desktop/jdk1.8.0_51/bin/java # anywhere else 

i recommend installing openjdk apt-get though.


Comments