small medium large xlarge

Generic-user-small
11 Sep 2016, 09:01
Enrik Gertel (5 posts)

Hello there, Im on Site 27 and i have done what the Book said. I downloaded the JDK and installed it. After that i put in the shell : javac -version but i was getting the error sh: javac: not found. After that i was going on this site to search if People had experienced the same problem. I saw someone said i should remove everything (that has to do with java) and reinstall it. I did that but still no success. I really need some help here.

Greets Enrik

Logo_edvauler_150x150_pragsmall
11 Sep 2016, 18:47
EDVauler (9 posts)

Hi Enrik, you really downloaded the JDK, not only the JRE?

see -> ‘Topic 14406

If you don’t get the following (version may be already _102),

xxx@antares:~$ which javac
/usr/bin/javac
xxx@antares:~$ javac -version
javac 1.8.0_101
xxx@antares:~$ 

the JDK is not or not proper installed!

I think you only succeed in the following, won’t you?:

xxx@antares:~$ which java
/usr/bin/java
xxx@antares:~$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
xxx@antares:~$ 

(The HotSpot VM is optional)

Greets

Generic-user-small
11 Sep 2016, 19:14
Enrik Gertel (5 posts)

Im sorry but i dont know what youre typing there :/ But yes i installed the jdk If i type java -version i get java version “1.8.0_102” Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode) But when i type : javac -version I just get the error

Generic-user-small
18 Sep 2016, 09:48
Enrik Gertel (5 posts)

Guys i really need some help here would be nice if someone who had this problem and has it fixed now could help me

Bphogan2016_pragsmall
19 Sep 2016, 00:57
Brian P. Hogan (172 posts)

I have to agree with the others in the thread - it sounds like you have installed a Java Runtime but not the Java compiler. Because generally the Java binary and the javac binary are in the same folder on your path.

But let’s find out. What operating system are you using on your server? Ubuntu? Debian? Cent? I’m not familiar with the host you’re using, so any details you can provide might help someone solve this. Perhaps you could look at your history and let us know what command you used to install the JDK.

Generic-user-small
19 Sep 2016, 11:51
Enrik Gertel (5 posts)

Server? You mean my PC? Im having Windows 10 64bit on it and i didnt use any command to install JDK i downloaded it from the website

Bphogan2016_pragsmall
19 Sep 2016, 14:00
Brian P. Hogan (172 posts)

I’m sorry. In your initial question, you said

Im on Site 27 and i have done what the Book said. I downloaded the JDK and installed it. After that i put in the shell : javac -version but i was getting the error sh: javac: not found.

That error lead me to believe you were on a Linux-based machine. No worries!

It still doesn’t seem like the JDK is installed.

You went to this page:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

and downloaded the one marked in this screenshot?

http://skitch.bphogan.com/2016-09-19_wotnychrv6b38yo_Java_SE_-_Downloads__Oracle_Technology_Network__Oracle.png

If you did, and it isn’t working, have you looked at the steps in the book on page 20 under If the Java Command Is Not Found

Generic-user-small
19 Sep 2016, 19:22
Enrik Gertel (5 posts)

Yes i downloaded this and yes i did looked on page 29 but had no success there either

Generic-user-small
17 Jan 2017, 19:42
Sophia Brabenec (2 posts)

I had the same problem and founded an solution. Try this link: https://www.java.com/en/download/help/path.xml

You must be logged in to comment