Click here to Skip to main content
15,921,531 members
Home / Discussions / Java
   

Java

 
AnswerRe: Windows Calc Pin
Nagy Vilmos17-Nov-09 5:29
professionalNagy Vilmos17-Nov-09 5:29 
Questiondecryption with AES Pin
mesho15-Nov-09 8:51
mesho15-Nov-09 8:51 
AnswerRe: decryption with AES Pin
Richard MacCutchan15-Nov-09 21:56
mveRichard MacCutchan15-Nov-09 21:56 
GeneralRe: decryption with AES Pin
mesho16-Nov-09 1:18
mesho16-Nov-09 1:18 
GeneralRe: decryption with AES Pin
Richard MacCutchan16-Nov-09 1:44
mveRichard MacCutchan16-Nov-09 1:44 
GeneralRe: decryption with AES Pin
mesho16-Nov-09 2:21
mesho16-Nov-09 2:21 
GeneralRe: decryption with AES Pin
Richard MacCutchan16-Nov-09 2:56
mveRichard MacCutchan16-Nov-09 2:56 
QuestionLoading different implementations of a class Pin
Klazen14-Nov-09 15:38
Klazen14-Nov-09 15:38 
Hey all,
let me start off by saying that I'm not totally sure of whether or not I'm phrasing my question right, but here goes. I'm trying to make a trading card game, and I want to make it expandable (not to mention I don't want to hard code the cards into the game). I was brainstorming the best way to have different cards (represented as objects) and let them have different actions in their methods (for example, onPlay() and onDiscard() will have different implementations for different cards). What I want to be able to do is, on initiation, have the program load these cards into an array of AbstractCard (which all card objects will implement), from which the game can use as its database of cards. At first, I thought of storing the actions in a text file, and then having the card determine its action based on what was saved in the text file. However, I quickly realized how messy that would be, and had a different idea. Perhaps I could create a different class for each card, and compile them all separately and put them in a location on the hard drive. The program would then check that directory and load all the compiled classes it finds there, declare objects from them, and put them in the AbstractCard array (to me, this sounds similar to what a plug-in system does).

So, my question(s) is(are), is this a good way of going about this? If so, how should I implement it? With regards to the implementation, this sounds kind of like reflection, but I have no experience in that area and so am not sure how to go about doing that.

Thanks,
Chuck Murphy
AnswerRe: Loading different implementations of a class Pin
Nagy Vilmos15-Nov-09 22:29
professionalNagy Vilmos15-Nov-09 22:29 
GeneralRe: Loading different implementations of a class Pin
Klazen16-Nov-09 7:30
Klazen16-Nov-09 7:30 
Questionsharing a directory/folder in Java Pin
VontinaAlexa13-Nov-09 5:52
VontinaAlexa13-Nov-09 5:52 
AnswerRe: sharing a directory/folder in Java Pin
David Skelly13-Nov-09 6:23
David Skelly13-Nov-09 6:23 
GeneralRe: sharing a directory/folder in Java Pin
VontinaAlexa13-Nov-09 6:33
VontinaAlexa13-Nov-09 6:33 
Questionjava servlet - error HTTP 500 - java.lang.nullpointer exception Pin
golisarmi11-Nov-09 1:01
golisarmi11-Nov-09 1:01 
AnswerRe: java servlet - error HTTP 500 - java.lang.nullpointer exception Pin
David Skelly11-Nov-09 2:32
David Skelly11-Nov-09 2:32 
GeneralRe: java servlet - error HTTP 500 - java.lang.nullpointer exception [modified] Pin
golisarmi11-Nov-09 2:43
golisarmi11-Nov-09 2:43 
GeneralRe: java servlet - error HTTP 500 - java.lang.nullpointer exception Pin
sparlay_pk16-Nov-09 7:49
sparlay_pk16-Nov-09 7:49 
QuestionSaving Forms to an XML file or .txt file Pin
Clement Tientcheu10-Nov-09 18:20
Clement Tientcheu10-Nov-09 18:20 
AnswerRe: Saving Forms to an XML file or .txt file Pin
sparlay_pk16-Nov-09 7:56
sparlay_pk16-Nov-09 7:56 
Questiondeploying java database application Pin
Muhammad Adeel Zahid9-Nov-09 8:08
Muhammad Adeel Zahid9-Nov-09 8:08 
QuestionHow to Validate XML against XSD v1.1 Pin
Skippums9-Nov-09 7:08
Skippums9-Nov-09 7:08 
QuestionTable locked and session was invalidated Pin
tarek.mostafa8-Nov-09 23:11
tarek.mostafa8-Nov-09 23:11 
QuestionNeed help with building a compiler that takes regular expressions in Java Pin
Jesus877-Nov-09 20:44
Jesus877-Nov-09 20:44 
AnswerRe: Need help with building a compiler that takes regular expressions in Java Pin
Nagy Vilmos8-Nov-09 22:16
professionalNagy Vilmos8-Nov-09 22:16 
GeneralRe: Need help with building a compiler that takes regular expressions in Java [modified] Pin
Jesus8710-Nov-09 9:29
Jesus8710-Nov-09 9:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.