I did some network programming (socket stuff) in many languages including java (also in C/C++, pascal, python). I think networking in java is quite OK. Since it has a crossplatform api you have access to limited functionality of the native socket api of your host platform but that isn't a problem in most of the cases especially if you are developing simple UDP/TCP applications. Whether to use java or not: it depends on your goals.
Please check if your app has any errors.I had encountered this error a lot when i started App development there might be some error in your layout file or string file or sometimes you might have given same IDs to different components and if all this doesnt work check yuor android manifest file. If all these doesnt help you in error removal then create a new project try copying the code part by part . This surely will help you
I have recently read a book by David Brackeen called 'Developing Games in Java'. I understand the code in the book and am currently modifying the game engine however; I have come across a problem whilst trying to create the player inventory.
I am using code in beanshell scripts to update objects in the game and looking through different scripts by David Brackeen I came across this code, ’player.getInventory().setRedKey(true);’. I understand it means ‘if the player object’s inventory does not have the red key after a red key collision, add the key to the inventory’.
My question is how would I write this code into my netbeans IDE (so it is recognised in the script) as nesting the ‘setRedKey(Boolean)’ brings up errors when I put it in the ‘getInventory()’ helper method of my GameObject class.
We have no idea what this method, or even its containing class, is supposed to do, so it is impossible to make any suggestions. Also, if you get errors then provide the exact text of the messages and the lines of code that cause them.
Thank you Richard. I had numerous errors but the main being a reflection error stating that .setRedKey(true) could not be found in my .bsh script (however it was there).
I think i have fixed the problem by removing 'player.getInventory()' and just using the method 'redKey.setCollected(true)', this puts the redKey object into an arrayList which i can then use as the players inventory to be shown on the screen when the player presses the 'i' key.
There are frequent news stories about security holes in Java. Do these apply mostly to browser plug-ins, or are there similar numbers of security issues in other components, such as JVMs, JavaFaces & Oracle ADF, Spring and other frameworks? In particular, I am concerned with security in Java code and components running on a web server.
If you think 'goto' is evil, try writing an Assembly program without JMP.
Hey im new to this forum stuff... well i could not locate the question i posted in the discussions.So i just re-posted it.. hope mistakes are accepted for the first time by the way thanks for the reply.
Hover your mouse over your name at the top right of the page and you will see links to your questions, answers, comments and forum messages. If you are new to the site then spend some time looking around to get familiar with it.
One of these days I'm going to think of a really clever signature.
First you need to communicate with the router, I mean, for eg. in your webbrowser if you write 192.168.x.x (router login webpage) you can access to your webconfig right? And to turn On/Off your wifi you must go to the right place right? Its like this ..
In your android app you must in first place know how to connect with router ip, if you can do this almost 60% of path is done, next you need to know how you turn On/off , and how do you know ? Almost of the router have one ssh login or telnet login, and almost of the routers have commands to open ports for example, you need to check you router manual and see what is the command to turn On/Off you wifi with terminal (telnet or ssh).
Thank you reply!
router use method protocol GET to config. EX: turn of wifi: http://192.168.0.254/userRpm/WlanNetworkRpm.htm?ssid1=Ngoan®ion=105&channel=15&mode=4&chanWidth=1&broadcast=2&brlssid=&brlbssid=&keytype=1&wepindex=1&authtype=1&keytext=&Save=Save
Router support remote login + no-ip.com and i can config it by 3G of smartphone. But this problem is authentication required of router when run this example
The authentication ?
There is a house where to known people they have a secret ring ...
what do you need to enter in the house ? if you have no key ?
you need to POST the secret ring..
First step again :
You need to authenticate yourself, when you put in the browser 192.168.0.254 what appear ? a windows to insert yours creds, that windows is make from anything right ?
otherwise you have the key ? what do you need to enter in the house? The place where you insert the key (that i dont know how to say in english lol )
if you have the creds you need to check if your router can be access by TELNET or SSH !!
or you must find the protocol that is used in the loggin of the router , for exemple wireshark is good for that job
If a router was running then one must either use a wired or wireless connection to access it.
You probably think that your cell phone is going to connect wireless to the router. But then that means that the router must have a wireless management API. (And to use that you learn about IP, TCP, HTTP at a minimum.)
Now if and only if you can access the admin via the wireless access then it should be possible to turn the router off.
But once the router is off you cannot connect to it - by any means. So it would not be possible to turn it back on. Same thing if you mean disabling the wireless connectivity.