
-----------------------------------
romantic_programmer
Sun Jan 14, 2007 4:52 pm

Importing java files
-----------------------------------
I was wondering how i would go about getting my program to read from other java files. I can't seem to figure it out... I am using RTP 1.7......

or should i just have it all run in one file....  I am creating a texted based game so i am trying to figure out a way to lessen my code per java file

-----------------------------------
ericfourfour
Sun Jan 14, 2007 6:39 pm

Re: Importing java files
-----------------------------------
I am using RTP 1.7
Generally people don't post the IDE, they post the compiler and/or the version of Java it compiles. Telling us you use RTP 1.7 is useless considering no one knows what compiler it uses, or what version of Java it compiles (unless they have it, but no one does).

Regarding your issue, placing code into other files is not needed. It seems you need to learn better use of object orientation. Have you checked out the introduction to Java by wtd?

-----------------------------------
romantic_programmer
Mon Jan 15, 2007 3:31 am

Re: Importing java files
-----------------------------------
Regarding your issue, placing code into other files is not needed. It seems you need to learn better use of object orientation. Have you checked out the introduction to Java by wtd?

First of all i am not placing anything that isn't already their. 

and ya sure object orientation i am not the best with. that is if you are meaning methods.. and yes i have looked at the introduction. and i do manage to get lost through out it.

So how would you know if placing code into other files is not needed. maybe it is. maybe i am going about things different then you. I am sorry for sounding like i am mad. i'm not really. just tired.

but to get back to my original purpose of this post. I truly need to have a way to import another java file. why? well right now i am going about 4000 lines of code which gets really messy and takes forever to scroll through... So why would i want to keep everything the same file? well i don't. but if their is no other way... maybe could some one give me some help if i revel to them my source code...

any who thank you for replying to my post. i am going to keep reading the introduction until i understand it or till my eyes bleed.

-----------------------------------
TheLastFall
Mon Jan 15, 2007 8:52 am

Re: Importing java files
-----------------------------------

I am using RTP 1.7
Generally people don't post the IDE, they post the compiler and/or the version of Java it compiles. Telling us you use RTP 1.7 is useless considering no one knows what compiler it uses, or what version of Java it compiles (unless they have it, but no one does).

Regarding your issue, placing code into other files is not needed. It seems you need to learn better use of object orientation. Have you checked out the introduction to Java by wtd?


"Regarding your issue" there are many ways I could respond to this... 

  1) How would you know that placing code into other files is not needed? You obviously need to see the code to be able to understand why.

  2) You haven't seen the code, nor understood what he is doing. So basically you don't understand why he needs to know. 

  3) You didn't answer his question, how is that even helping? 

Do you need to read a tutorial on what you do when someone asks a question? Here is the basics of it; 

     I) If you have the answer say it, it doesn't hurt. 

    II) If you don't understand, don't know the answer, then don't even respond.

Romantic_Programmer I'll PM you on how you could possibly go about your code.

-----------------------------------
wtd
Mon Jan 15, 2007 9:51 am

Re: Importing java files
-----------------------------------
i am going to keep reading the introduction until i understand it or till my eyes bleed.

Please feel free to ask questions if you find something in my tutorial confusing.  :)

-----------------------------------
ericfourfour
Mon Jan 15, 2007 10:49 pm

Re: Importing java files
-----------------------------------

I am using RTP 1.7
Generally people don't post the IDE, they post the compiler and/or the version of Java it compiles. Telling us you use RTP 1.7 is useless considering no one knows what compiler it uses, or what version of Java it compiles (unless they have it, but no one does).

Regarding your issue, placing code into other files is not needed. It seems you need to learn better use of object orientation. Have you checked out the introduction to Java by wtd?


"Regarding your issue" there are many ways I could respond to this... 

  1) How would you know that placing code into other files is not needed? You obviously need to see the code to be able to understand why.

  2) You haven't seen the code, nor understood what he is doing. So basically you don't understand why he needs to know. 

  3) You didn't answer his question, how is that even helping?
I'm not sure if you understand, but if romantic_programmer had better knowledge of object orientation, he would know how, and when, to separate code into separate files. Can I point you to wtd's introduction to Java? I'm sure he mentions this when he discusses object orientation.


Do you need to read a tutorial on what you do when someone asks a question? Here is the basics of it; 

     I) If you have the answer say it, it doesn't hurt. 

    II) If you don't understand, don't know the answer, then don't even respond.
Generally, tutorials will be provided alongside a post, when the subject matter cannot be taught in a few sentences. Especially, a subject as large as object orientation.


Romantic_Programmer I'll PM you on how you could possibly go about your code.
Maybe, you should post your solution in this thread to further benefit the community.

-----------------------------------
romantic_programmer
Tue Jan 16, 2007 8:12 am

RE:Importing java files
-----------------------------------
thelastfall and ericfourfour, calm down lets not get a war going on. I am trying several ways to do object oritntation. but i just found out i need to make a class but my teacher hasn't taught us about it. so it is kinda making me mad. And well, I keep reading his tutorial and i guess that is the only tutorial i dont understand...

-----------------------------------
ericfourfour
Wed Jan 17, 2007 12:43 am

RE:Importing java files
-----------------------------------
I just found another tutorial on [url=http://java.sun.com/docs/books/tutorial/java/concepts/]object orientation.

Hopefully, it will help you understand.

-----------------------------------
wtd
Wed Jan 17, 2007 2:45 am

RE:Importing java files
-----------------------------------
You may wish to read my Introduction to Java.  It predominantly focuses on object-oriented programming in Java.
