Why is 'javac' -version not being recognised cmd

Community Forums/General Help/Why is 'javac' -version not being recognised cmd

Blitzplotter(Posted 2016) [#1]
Hello,

I've downloaded and installed Android Studio. Despite this javac -version returns ‘javac’ is not recognized as an internal or external command, operable program or batch file.

I've set an environment variable for JAVA_HOME to C:\Program Files\Java\jdk1.8.0_101 - still no joy.

I've opened the Android SDK manager and am installing 22 packages (one of which is the 4.4.2 API 19 - this may allow Monkey to see Android as a Target build)

My tablet is set to developer mode, I've enabled USB debugging mode to ON... Awaiting result of the SDK Path to be populated.

I did receive notification that my CPU does not support required features (VT-x or SVM). However, I presume this will not be an issue if I can get my PC to 'see' my Android tablet as a build target. I've previously had some success compiling and then uploading ADB's to the google store to subsequently download onto an old android phone - but have yet to see any android device as a target on my PC.

Any suggestions appreciated.


Derron(Posted 2016) [#2]
environment variable: this is only useful for applications using this variable

@ "javac not recognized"
You might append the "PATH" variable with the URI to the javac-binary-directory. "PATH"-directories are checked if you type in a binary name and try to execute that.


bye
Ron


Blitzplotter(Posted 2016) [#3]
Thanks Ron, I've just realised I don't have ANT installed. For some reason I read the ANT requirement as simply a MAC OS thing, whoops.

I'll also try your suggestion for
You might append the "PATH" variable with the URI to the javac-binary-directory. "PATH"-directories are checked if you type in a binary name and try to execute that.


Also located the following thread:

http://www.monkey-x.com/Community/posts.php?topic=8007


Blitzplotter(Posted 2016) [#4]
Hmmm, don't know where I got the advice to attempt javac -version, java -version returns a version number. Is javac a separate entity or was that simply a typo in a set of instructions I was using ?

Anyhow, finally got Android as a build option, one minor hurdle to overcome, ant is not being recognised as a command, despite having the following in my path var:

%ANT_HOME%C:\Ant\apache-ant-1.9.7\bin;%JAVA_HOME%C:\Program Files\Java\jre1.8.0_101\bin

Any suggestions ?


Derron(Posted 2016) [#5]
@ PATH

And this does work?


%BLA% are like variables ... so you might have
myvariableC:\Ant\...;anothervariableC:\...

So if %ANT_HOME% already contains "C:\Ant\apache-ant-1.9.7"
you would have to have this in path:

%ANT_HOME%\bin

The delimeter of the entries is ";"


@ ant
http://ant.apache.org/manual/install.html


bye
Ron


Blitzplotter(Posted 2016) [#6]
aaah, thankyou Ron ;) I'd to truncate the /bin of the end of my ANT_HOME.


steve_ancell(Posted 2016) [#7]
Google "Java Programming for Kids, Parents and Grandparents", somewhere in that ebook it shows how to set the environment variables.


Blitzplotter(Posted 2016) [#8]
Kool and the gang, I'm just a big kid at heart and a Parent as well. Thanks again Ron for your help - Android target compiling a treat ;)