Valhalla Legends Forums Archive | Java Programming | Adding a class file

AuthorMessageTime
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.
June 17, 2005, 11:46 PM
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.
June 18, 2005, 1:12 AM
R.a.B.B.i.T
[quote author=ColT link=topic=11876.msg116259#msg116259 date=1119051986]
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.
[/quote]Stick it in the same folder as your main class and use import (ie: [color=purple]import[/color] [color=green]TextIO[/color][color=white];[/color])
June 18, 2005, 7:36 PM
ColT
[quote author=rabbit link=topic=11876.msg116394#msg116394 date=1119123395]
[quote author=ColT link=topic=11876.msg116259#msg116259 date=1119051986]
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.
[/quote]Stick it in the same folder as your main class and use import (ie: [color=purple]import[/color] [color=green]TextIO[/color][color=white];[/color])
[/quote]

That helped out more than Mangix. Would you happen to know where the main class would be rabbit?
June 19, 2005, 12:53 AM
Myndfyr
[quote author=ColT link=topic=11876.msg116437#msg116437 date=1119142406]
[quote author=rabbit link=topic=11876.msg116394#msg116394 date=1119123395]
[quote author=ColT link=topic=11876.msg116259#msg116259 date=1119051986]
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.
[/quote]Stick it in the same folder as your main class and use import (ie: [color=purple]import[/color] [color=green]TextIO[/color][color=white];[/color])
[/quote]

That helped out more than Mangix. Would you happen to know where the main class would be rabbit?
[/quote]
Wherever the file is that you want to include the other class in!
June 19, 2005, 8:47 AM
ColT
[quote author=MyndFyre link=topic=11876.msg116481#msg116481 date=1119170832]
[quote author=ColT link=topic=11876.msg116437#msg116437 date=1119142406]
[quote author=rabbit link=topic=11876.msg116394#msg116394 date=1119123395]
[quote author=ColT link=topic=11876.msg116259#msg116259 date=1119051986]
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.
[/quote]Stick it in the same folder as your main class and use import (ie: [color=purple]import[/color] [color=green]TextIO[/color][color=white];[/color])
[/quote]

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

Thanks MyndFyre, sorry for this newby topic on Java, but I am still learning <3.
June 19, 2005, 1:58 PM

Search