Jim's
Tutorials

Spring 2018
course
site

Yesterday, for a change, I spent the entre day learning about Java because I want to incorporate some of it into a final project. I downloaded it from here:

https://java.com/en/download/mac_download.jsp.

I read a few sections of this:

https://www.tutorialspoint.com/java/java_basic_syntax.htm

then, "myfirstjava.java" and "myfirstjava.class" are the file and compiler for a tester "hello world" thing that I did get to work before trying to make a game. However I'll need to remove those if I run the whole folder for the game! Anyway...

I just jumped in and followed a tutorial that created a game. Got most of the way through- I have several questions I'd like to ask, I'd like to try and get the thing running even though I'm not using Eclipes, the preferred editor for Java. I'm using atom. I have three major questions about it- if these questions can be answered I think the thing will work, with some review.

  1. I know (from my brief time in the C tutorial) that in C you need to create a header file, link it to each individual file, then compile them all together. It seems like java is halfway between C and higher level languages. I don't know if I need to run the entire folder and all of its objects, to get individual objects to work, or not, and not sure how to try that yet. will keep messing around with it.

  2. The guy in this tutorial is doing things at the head of each file that I just don't understand, although there is definitely a pattern that is easy enough to see. I'm not sure what information is being put in on the spot and what is being imported, and how that works. So I'm not grabbing the info I need to make this work. I've tried looking up what "public, private, public-private" class stuff means but its a bit over my head.

  3. Finally, there are several moments in the tutorial where he is creating an object and he hovers over a variable name and he creates something called a "private static final long serialversionid" with his editor and I don't know how to do that outside of eclipes or what that does exactly. I tried following the link below to figure it out, but did not particularly understand the explanations, will keep trying;

https://www.mkyong.com/java/how-to-generate-serialversionuid/

I wrote notes about it in the window.java file, like indicated specifically what the problem is if you wanted to see it. Otherwise I understand what is happening here, a window is being created sort of like in python, the dimensions set etc- so its a matter of making the thing appear.

and here are the links to the two game tutorials I followed:

all of part one:

https://www.youtube.com/watch?v=1gir2R7G9ws

and half of part 2:

https://www.youtube.com/watch?v=0T1U0kbu1Sk

https://cs.marlboro.college /cours /spring2018 /jims_tutorials /web_tech /java_mar9
last modified Fri April 26 2024 12:53 pm

attachments [paper clip]

  last modified size
TXT Game.java Fri Apr 26 2024 12:53 pm 2.7K
TXT GameObject.java Fri Apr 26 2024 12:53 pm 594B
TXT Handler.java Fri Apr 26 2024 12:53 pm 281B
TXT ID.java Fri Apr 26 2024 12:53 pm 240B
TXT Window.java Fri Apr 26 2024 12:53 pm 839B
TXT myFirstJava.class Fri Apr 26 2024 12:53 pm 476B
TXT myFirstJava.java Fri Apr 26 2024 12:53 pm 228B