| |
| |
| |
|
Page: 1 2 3
Comments:
<0> is there already any cl*** in the java library to get the CPU speed and type of processor and stuff ? <1> Has anyone here successfully made SQL database queries from a java applet? <1> If so, I'd like to talk to you <0> i have from java cl***...not with an applet though <0> basic console based <1> hmmm <1> would there be much of a difference? <2> you can't make SQL queries from an applet. <1> Zenethian: why not <0> i dunno applets <2> Well for one, you don't want to architect your software that way <2> You'll want to create a web service to do your database layer for you <2> and only have the applet make calls to that web service <1> such as...? <2> what do you mean such as? <1> an example of this web service
<2> well, you have to write it <2> so whatever you think you need to accomplish with a SQL call. <2> like you could have one called AddThreePies <2> or something <2> or AddPies and take a parameter, count. <1> it's going to be for a game... <2> doing SQL through an applet exposes a ton of ways to totally hack your server <2> Plus I don't even think you can do it with the security manager that applets have to run in. <2> So you need to build yourself an exposed API of things that you need your applet to be able to do <1> so there will be units on screen, each unit will have x and y coordinates that will have to be checked/updated with the SQL server <2> ok, so make a web service to do that instead <2> CheckUnitXYCoords <2> and in that web service, then you do the SQL interactions. <2> web services run on your server, not in the client <1> yeah <1> I don't have physical access to run programs on my server though <2> Um, web services don't run as programs, they run in your web server <2> Really, so many things on the web ARE web services and you don't really even realize it <2> except yours won't be returning html, it'll return some other data format. plaintext, xml, whatever you choose. <1> so wait <1> would I make like... a php page that the java program checks/ <2> You can do it in PHP if you like <1> how would you, personally, do this? <2> especially since you don't have the ability to run separate programs on your webhost, that would be a good way to do it. You could use XML-RPC or make up your own way to call it <1> yeah <1> XML-RPC? <2> Well, if I had a server like yours, this is the best way, IMO <1> XML remote procedure call? <2> If I had full control, I'd make it client-server and keep a persistant connection between them with a custom data protocol. <2> yeah <1> yeah, that's what I'd do too if I had full control <1> but I run dialup. <1> it'd be quite bogged down <1> are there any tutorials you know of for the procedure I'm looking at? <2> I'm sure there are lots. <2> XML-RPC is pretty popular in PHP and Java <2> http://webservices.xml.com/pub/a/ws/2004/03/24/phpws.html <0> how do i connect java and mysql server? is there any tutorials for that <2> edited: use JDBC <0> i know..but is there any tutorials for that <2> Yes, lots. <0> right now im just trying to write a simple java program which will list the tables in a database and stuff <0> then im gonna add some more stuff <2> Cool <0> its been long time i havent touched java <1> allrighty, zene <2> =) <1> another one for ya <1> http://www.seldemon.com/testmap.php <1> that's basically what the map's going to look like. However! <1> not really. <1> In battletech, there are different types of terrain and different elevations <1> how would you personally go about making a static map, which portions of it will be loaded <2> what do you mean static? <1> the map will be around 1000x1000 hexes, but you'll obviously only be able to see about 30x30 at a time <2> yeah <1> as in, the map should be stored to some file <2> nah <2> store the map as data <2> not as a big graphic file <2> and render it
<1> yeah <1> that's what I meant, it'll be stored like <1> 0000010011134200013 <2> ok <1> 1381805324274724 <1> rows and columns <2> sure, if you want to do it that way <1> that designate terrain type, then another data file that designates elevation <2> I was thinking of maybe a more relational model <2> so you can have easy lookups <1> as in? <2> a four column database table. X, Y, TerrainType, Elevation <0> first ill have to add JDBC driver to my library right? <1> I didn't even think to do it that way. lol <0> i use netbeans <2> edited: I guess, yeah. <2> Memphetic: plus then it is easy to add new information as well. <1> this table will have 1,000,000 rows :-P <2> it's ok, they're designed for that kinda thing. <1> any suggestions for ways to actually enter the data? <2> heh <2> Manually? :-/ <1> yeah <2> Or you can write map editing software. <1> figured :) <2> likely manually to start. :D <1> around 98435 I'll probably get fed up <2> well, you can always populate the whole world with water <1> yeah! <2> to make all 1,000,000 hexes programmatically the same, and then fill in the ones you need. <1> forget mechs and tanks. It's naval. <2> or fill it all with land. <2> whatever the most common type of space is gonna be used =) <1> there really isn't one... <2> well then choose one. <2> hehehe <2> or <2> make a "blank" hex type <2> just to get data in the database <2> though I'd personally start out with a real type of hex <1> yeah that would make more sense <2> so that you can build the map AFTER the game mechanics are ready. <1> maybe I'll just make a map editor that generates SQL code <1> then paste it into phpMyAdmin <2> and in the mean time, you have something of a map to work with <2> yeah, that could be ugly, but work. <2> Or you can write an applet that does it <1> besides. it's gonna take me awhile to find someone to make a 1000x1000 map anyway. <2> click on a hex, change it's properties, use a web service to update the hex <0> does JDBC already come with the JDK? <2> it should, yes. <2> you just need the mysql jdbc driver <0> get that from mysql.org? <2> likely yeah <0> so ill have to add that jar file into my netbeans <1> Zene <1> didn't you just get done telling me that that was a bad idea? :-P <2> ? <2> He's not doing it in an applet. <2> there's nothing wrong with using mysql in java <2> but you don't do it across an internet connection. :P and you most certainly don't do it in an applet. <2> heh <0> Cl***.forName("sun.jdbc.odbc.JdbcOdbcDriver"); <0> will this do it for properties? <1> okay, zene. <1> So basically <1> I'm gonna be making a PHP page that creates an XML tree with data on every unit to be displayed <1> right? <1> then the applet will read that page when needd <1> needed* <3> hey.. i'm kind of new but i was wondering... how do i convert a .jad file to .jar? <1> .jad? <1> So <1> How do I get my applet to read an XML?
Return to
#java or Go to some related
logs:
#worldchat #allnitecafe #worldchat #india #kl #allnitecafe #chat-world #linux #allnitecafe hadi bakaym
|
|