C:\java\hello\src\hello\Hello.java
Beginner
Beginner
Fergal Crawley wrote:Thanks for your help Walter. I have the JDK installed and have verified that it is configured correctly, using the command prompt.
When I type "cd C:\java\hello\src\hello\" into the command line, it outputs "C:\java\hello\src\hello\" on the command line. When I type "javac Hello.java" on that command line, it just outputs ""C:\java\hello\src\hello\" again, without running the program.
The program is the simple "Hello World!" one below, and at least I don't think it is being run from the command line.
Am I doing something wrong?
Thanks!
Walter Ho wrote:...Aha. You're using a package.
Type in "cd C:\java\hello\src\" into the command line, it should output "C:\java\hello\src\" on the command line.
You then compile the code with "javac hello\Hello.java" on that command line, it just outputs ""C:\java\hello\src\" again, providing there are no compiler errors.
Now to run your code, you have use "java hello.Hello" to run the code....
Beginner
luck, db
There are no new questions, but there may be new answers.
Always look on the bright side of life. At least this ad is really tiny:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|