The main problem I am having is that I am instructed to unzip or open the software. It appears to already be open. Then I am told to add an entry to my PATH environment. I am at a lost here. All I can find is info for MAC users on this site. I am using windows 10.
Any clear advise would be much appreciated!
Welcome to CodeRanch!
While that book is excellent, a lot has changed since it was written. Like Oracle buying Sun. This page describes how to install from Windows. I'm not sure how helpful it will be to you, but at least it is a starting point.
The last time I installed on Windows, I just double clicked the .exe file and the JDK installed.
I am have windows 10 (not really any instructions for this version), I have set the PATH (I think) but at the command prompt when I type in javac_version I get the following message:
'javac_version' is not recognized as an internal or external command,
operable program or batch file.
Perhaps this is just not my thing. I truly want to learn Java but if I can't even install it....
Even if I ever get this installed how do I use it???
I need to be sure the path is setup correctly so that I can compile and run java script from the command prompt. I keep reading how I have to create a HOME_PATH and then edit the path in System variables. I cannot do this! I am running windows 10. Below is what I now have in my environment:
PATH C:\Program Files\Java|jdk1.8.0_101\bin
When I go into path under System Variables and the Edit:
Edit environment variable
Could someone please tell me what went wrong? Thanks.
If that is the PhraseOMatic class, that looks as if it were running normally. You have probably forgotten to include spaces in the print instruction.
Donna Fuga wrote:okay...I keep trying. Now I am getting the following message when I try to run the compiled file:
'What we need is a critical-pathnetworkedsolution'. . . .
I hope you didn't simply delete things; you should uninstall the old version and install the new version. As Jeanne says, simply
I went to the Oracle site and for creating the path link it says go to environmental variables and then:
a. Right click My Computer and select Properties.
b. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.
I have 2 questions about this instruction:
1. Are they talking about in user variable or system variables?
2. I don't have a JAVA_HOME to edit in either variables (user or system) so how do I edit it?
This is just an example of what I have been reading and trying to do.
That sounds disastrous. Restore the system PATH to what it was before you started. Otherwise you might find yourself with other problems with Windows.
Donna Fuga wrote:. . . I just deleted the paths in my user and system environment.
Which CLASSPATH link? I hope nobody has told you to set a CLASSPATH.
I do not know what the HOW TO SET A CLASS PATH link is talking about!
Sorry if people are confusing you. As you will find, there are ways to set the PATH with our without setting JAVA_HOME. I think you need JAVA_HOME for Netbeans and some other applications but I am not sure. I had similar difficulties when I started (in those days the books still gave misleading advice to set a CLASSPATH), but once I found out I had to set a PATH, I found the instructions reasonably easy to follow. A lot of tutorials, including the Java™ Tutorials seem to give instructions older versions of Windows, but I don't believe the changes are that great. We have an FAQ of our own which includes how to set the PATH.
All I want to do is setup the path . . . My other option is to download netbeans and use that but I really wanted to do it without the netbean assistance.
It also tells you whether to set some variables as system type or user. If you set them as user type, no other user can benefit from them.
So again I have searched for setting the path, it is of no help. When the path is set (seems impossible...) what does it do for me? Does allow me at the command prompt to just type in for example, 'java hello world' after compiling it and the file will run? Instead of having to type in the complete file path? What is the purpose of setting this path anyway?
So, the PATH on Windows 10 would look something like this: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
This tells Windows to first look in the %SystemRoot%\system32 directory, then in the %SystemRoot% directory, then in the %SystemRoot%\System32\Wbem directory, and so on when it is asked to run a program. Notice that when you installed Java, it would have installed it in a directory named jdk1.x.x or something like that. Well, the javac.exe and java.exe programs are in the bin directory under this "home" directory. That's why you'd want to set you JAVA_HOME environment variable to the "home" directory where Java was installed, then add "%JAVA_HOME%\bin" to your PATH variable, so t hat when you type the command to run javac or java, Windows knows to look in that directory for those programs.
Here's another link you might want to check out for instructions: https://www.mkyong.com/java/how-to-set-java_home-on-windows-10/
I have wasted enough of everyone's time. I can't seem to explain the issue I am having.