Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About unholyx

  • Rank
  1. unholyx

    Java runtime help.

    Hi, I'm trying to use Java to call a .exe. There's 3 in total, 2 of them calls correctly but one does not. Same code for all 3 except the directory. public void actionPerformed(ActionEvent ae){ if(ae.getSource()==nuConn){ System.out.println("Calling nuConnector1.3..."); try{ Runtime rt = Runtime.getRuntime() ; Process p = rt.exec("C:\\Users\\Phantom\\Desktop\\nuConnector1.3.exe"); } catch(Exception e){ } } At first I thought it was because the .exe name has a . in it so I changed it to nuConnector13 instead but still doesn't work. Now the other 2 exe files are actual exe, they open up a client and an actual ui window with options. The nuConnector1.3 is a dos window. I tried called nuConnector1.3.dos, nuConnector1.3.bat, and nuConnector1.3.cmd (probably not all real extensions but was just my guess). Whenever opening nuConnector1.3, it has to open up a port which then my OS prompts me to allow it. Called normally, it would prompt and then open the .exe. When called through Java, it just prompts and then doesn't open the .exe. I'm thinking the problem is that it's in a dos window so maybe calling .exe doesn't work :/ Thanks in advance.
  2. unholyx

    Java excel static/non static help

    Oh ok, so you can't tell just by looking at it. You always have to check the API accordingly to find out if something is static or not. Ok thanks a lot!
  3. unholyx

    Java excel static/non static help

    Ok alright I understand it a bit better now. Non static methods needs to be called from an instance of the class, whereas static methods can be called using the class itself. So how do you tell the difference between a static and a non static method? .getSheet and .getWorkbook I would assume comes from the same class and in my eyes I can see no difference as to how you can tell what is static and non static. Thanks.
  4. unholyx

    Java excel static/non static help

    Thanks, this cleared up some things but lead me to more questions at the same time. So after reading your post, I would assume that all the methods in the program, the .getWorkbook(), .getSheet(), .getContents(), .getCell() would all be non static since they're all not ClassName.method(arg) but instead they're all methods from another class somewhere in the jxl.api. But then you said by this you mean the "Excel testEX = new Excel();" ? [font="Arial"] [/font]
  5. Sorry if this is a really nub/stupid question but I'm trying to simply read in an excel file with Java. This is my code: import java.io.File; import java.util.Date; import jxl.*; public class EXCEL{ public static void main(String args[]){ EXCEL testEX = new EXCEL(); } Workbook test1; Sheet sheet1; Cell a5; String stringa5; public EXCEL(){ try{ test1 = Workbook.getWorkbook(new File("EXCEL.xls")); sheet1 = Workbook.getSheet(0); //line that's giving me the error }catch (Exception e){ System.out.println("Not working"); } a5 = sheet1.getCell(0,5); stringa5 = a5.getContents(); } } This is the error I get: "non-static method getSheet(int) cannot be referenced from a static context" error. I tried reading several mini sites where people asked the same question but redundantly they all say something along the lines of not being able to call non static from static and I have to either make everything static or make non static methods. Very confusing as I don't know what is what. So if anyone could explain with simple examples so I can understand better it'd be really helpful thanks.
  6. unholyx

    Nub question about srand/rand

    Could you explain a bit more about lock-step? I didn't really get what it means when I searched on other sites.
  7. unholyx

    Nub question about srand/rand

    Ah ok thanks thanks, that definitely made the picture clearer.
  8. I'm working on a simple blackjack program and I got stuck at a point in generating random numbers. First I did something like this: num = rand() % 10 + 1; only problem was every time i re-executed, it gave me the same number. So I did some more googling on why it did that, and it was because I wasn't putting srand(time(NULL)); anywhere in my code. Now I'm confused as to what srand does. The description on most sites was that it generated a "seed" value which I don't know what that means, and I also moved srand(time(NULL)); from function to function and eventually to main and whenever rand() was called, it generated a different number every time. So it seems that as long as I call srand(time(NULL)); -- doesn't matter where -- in my program the number will still generate randomly from rand()? My program is working, I just need some more clarification on srand and rand and whether if I understood it right. Thanks.
  9. Thanks a lot. Some great tips. I've learned about inheritance in school but never got to e and p. I decided for my first project I'm going to make a basic blackjack program in c++ just to get back into the syntax and relearn the basics. Is it ok if I post here for help or do I have to go to a different section or forums for simple help (that is if I cannot find it with google).
  10. Thanks guys for the advice. I made this thread with a half and half attitude about jumping right into the engine. But now I am 100% informed that I should learn how to code and how networking works before I even download the engine. Much discouragement :[ but at least you've led me in the right direction
  11. If I start from something simple like making an RPG, then making something like Diablo 2, in the end would I still have to learn C++, OOP, Directx/OpenGL and all that? This was my plan. I was going to learn how to use the engine and make a simple field with a simple character and just learn how to do the features for the game like shops, skills, the ui, stuff like that and pay people for graphics like armor, maps, items, npcs, etc. People constantly say it takes millions to make a mmorpg, but if I'm only paying for graphics and do everything else myself, I think it would be much cheaper. I saw on a site called 3dbud (just an example) they had a male 3d model of a character for only $27. A set of armor is probably going to cost $100. In the end I'll only be spending about 10k-20k for all the graphics while learning how everything else works as I'm experimenting with the engine. I know this is a long term project, I don't plan to be done until about a decade or more. In that time frame I was just planning on saving and paying freelancers to do stuff while doing stuff myself as well. Would that be a better plan or should I stick to making something simple first. *Thanks for the info, last few sentences was what I was looking for. Needed a basic guideline on what to learn.
  12. Thanks a lot! That was a ton of useful info. Much appreciated.
  13. Hi all, I'm trying to take my first steps into developing my own mmorpg. When coming up with my idea, all I thought about was "Ok I'm going to download this engine, draw a bunch of crap and get my game on it's way." But after doing some more in-depth reading I realized that's not the best way to start. I currently dabble in C++ and Java and feel comfortable with programming--though I'm not too confident on OOP like using implement or extend as my coding is pretty sloppy, so my algorithmic talent is crappy. I'm just wondering--for mmorpg purposes--what language should I learn? I understand that different engines have different languages I believe? Or maybe they have their own language I'm not sure. Mainly I want to accomplish two things: be able to model 3d objects - which I will use the Esenthel engine (if it has that capability) or autodesk/blender. <- which do you think is better for beginners? and I also want to become a strong programmer. As I said above my programming is very weak, I know there is a lot of tutorials out there but I'm just not sure what to do. Should I learn any and all tutorials and eventually make a simple program and then develop it into a complex program so I can get a better understanding of how things work? In doing the programming I want to learn things that will help me in mmorpg development so any pointers towards that would be appreciated. Or should I just forget all that I just wrote and make my game on RPGMAKER so I can develop the storyline and add in all the items/armor/quest that will in the future give the real game a backbone to start on? Or should I try to make my game in c++/java so I can learn more of the language as I make my game? Thanks in advance. EDIT: if you guys can please write a vague description on what these languages are geared towards and if they can help me with anything in terms of mmorpg development. Python XNA VB Assembly Btw I just saw the "For Beginners" Forum FAQ on top so I'm reading that now
  14. unholyx

    autodesk free software

    Is autodesk solely used for 3d modeling? If so, which would be better, blender or autodesk? I've heard great things about both. Or should I just stick to using an engine for 3d modeling? Currently looking at Esenthel engine (if it offers 3d modeling idk).
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!