Chad Dunlosky

Greenhorn
+ Follow
since Sep 13, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chad Dunlosky

Knute Snortum wrote:Have you read this? How to create your first program



Just took a look at it, I did not but I wish I had!
1 month ago

Carey Brown wrote:

Chad Dunlosky wrote:Everything worked like it should, but I think I'll use Eclipse to better practice java, even though there's nothing wrong with the command prompt, all guides I read have Eclipse as recommended.

Eclipse is an excellent tool but I caution against it for the short term. If you are just starting out with HelloWorld, using the command line will help you understand how the organization of a Java project works. Eclipse, of course, helps with this, but you may have trouble understanding errors in Eclipse without some of this background knowledge. Eclipse also has its own learning curve.



Ah okay, that's sort of what kept me from starting with it, I'd like to learn the bare bones of coding first before allowing programs to cut the edges off for me.
1 month ago

Campbell Ritchie wrote:Please indent your code correctly. You don't need the empty lines, and lines 33 and 5 should be farther to the right. It might not make much difference now, but once you get into longer classes, you can cause yourself no end of confusion if you haven't got the code indented properly.
What do you mean by a “new commend line”? Do you mean a new window opens, or simply that the display goes back to the prompt. If it means going back to the prompt, that is normal. That is what you get after invoking javac: stony silence if there aren't any error messages. That is good, but it is only half the procedure. You need to invoke the main method, which you do with the java tool. The instruction is
java HelloWorld
Note there is no extension: that bit often confuses beginners.



Thanks for the detailed post! I indeed got it working from another reply, I realize now the difference between javac and just java in cmd prompt. Everything worked like it should, but I think I'll use Eclipse to better practice java, even though there's nothing wrong with the command prompt, all guides I read have Eclipse as recommended.
2 months ago
I have HelloWorld written and I am trying to run it in command prompt to test it out, but when I javac HelloWorld.java (in the correct directory) it runs for a second, and then a new command line pops up, without the "Hello World" text being displayed. I have JDK 10 installed.

My code:

2 months ago

Norm Radder wrote:What is the .exe  filename?  Where did you get it?



"jdk-10.0.2_windows-x64_bin.exe"

From Oracle.com> https://www.oracle.com/technetwork/java/javase/downloads/index.html
2 months ago
Hello, I am looking to set up Java so that I can start coding in the Windows 7 command prompt.

I tried installing the latest SDK from Oracle, but when I click the 64-bit installation it doesn't respond...

I have Java SE Development Kit 8 Updates 161 and 152 installed on my computer, do I need both of them? Can I uninstall the lower-numbered version?

It's been quite a while that I've picked up learning Java again, can anyone get me started on setting up?

Thanks!
2 months ago