• Welcome to Valhalla Legends Archive.
 

Adding a class file

Started by ColT, June 17, 2005, 06:46 PM

Previous topic - Next topic

ColT

How would you go on adding a class file? I would like to know this, because I need it for my program. What does it do? Well, it's just like using cin in C++. I compiled it but how would I go on using it

Code: http://math.hws.edu/javanotes/source/TextIO.java

Or is there another way that I could use? (Like using cin in C++) Or would I have to make/use a class library?

Edit: I use JCreator.

Mangix

what do you mean adding a class file? adding a class file to a .jar file?

and if you want to use it, you have to put all the classed(if multiple) in a .jar file.

and incase you dont know, a .jar file is like a zip file cept diffrent programs treat it diffrently, Java makes it run while WinRAR, t-Zip, etc... accually open the file with all the .class files.

R.a.B.B.i.T

Quote from: ColT on June 17, 2005, 06:46 PM
How would you go on adding a class file? I would like to know this, because I need it for my program. What does it do? Well, it's just like using cin in C++. I compiled it but how would I go on using it

Code: http://math.hws.edu/javanotes/source/TextIO.java

Or is there another way that I could use? (Like using cin in C++) Or would I have to make/use a class library?

Edit: I use JCreator.
Stick it in the same folder as your main class and use import (ie: import TextIO;)

ColT

Quote from: rabbit on June 18, 2005, 02:36 PM
Quote from: ColT on June 17, 2005, 06:46 PM
How would you go on adding a class file? I would like to know this, because I need it for my program. What does it do? Well, it's just like using cin in C++. I compiled it but how would I go on using it

Code: http://math.hws.edu/javanotes/source/TextIO.java

Or is there another way that I could use? (Like using cin in C++) Or would I have to make/use a class library?

Edit: I use JCreator.
Stick it in the same folder as your main class and use import (ie: import TextIO;)

That helped out more than Mangix. Would you happen to know where the main class would be rabbit?

MyndFyre

Quote from: ColT on June 18, 2005, 07:53 PM
Quote from: rabbit on June 18, 2005, 02:36 PM
Quote from: ColT on June 17, 2005, 06:46 PM
How would you go on adding a class file? I would like to know this, because I need it for my program. What does it do? Well, it's just like using cin in C++. I compiled it but how would I go on using it

Code: http://math.hws.edu/javanotes/source/TextIO.java

Or is there another way that I could use? (Like using cin in C++) Or would I have to make/use a class library?

Edit: I use JCreator.
Stick it in the same folder as your main class and use import (ie: import TextIO;)

That helped out more than Mangix. Would you happen to know where the main class would be rabbit?
Wherever the file is that you want to include the other class in!
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

ColT

Quote from: MyndFyre on June 19, 2005, 03:47 AM
Quote from: ColT on June 18, 2005, 07:53 PM
Quote from: rabbit on June 18, 2005, 02:36 PM
Quote from: ColT on June 17, 2005, 06:46 PM
How would you go on adding a class file? I would like to know this, because I need it for my program. What does it do? Well, it's just like using cin in C++. I compiled it but how would I go on using it

Code: http://math.hws.edu/javanotes/source/TextIO.java

Or is there another way that I could use? (Like using cin in C++) Or would I have to make/use a class library?

Edit: I use JCreator.
Stick it in the same folder as your main class and use import (ie: import TextIO;)

That helped out more than Mangix. Would you happen to know where the main class would be rabbit?
Wherever the file is that you want to include the other class in!

Thanks MyndFyre, sorry for this newby topic on Java, but I am still learning <3.