Are you getting an error message? We can look at that then take it from there...
Are you getting an error message? We can look at that then take it from there...
Geez.. Don't know if that's possible. Not that I've came accross anyways..
How about creating an applet and displaying it in your HTML5 page with the <applet> tag? Or is that not what they want either?
********Edit*************
Damn, peter beat me to it!
I don't know if your first "solution" will be possible or not... But I do know that there is a method of the File class called "lastModified()".
The lastModiied method returns a long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file does not exist or if an I/O error occurs
Like:
long lastUpdated = myFile.lastModified();
Hope this helps!
No problem man :-)
Oh okay perfect,
BufferedWriter out;
String yourString = output;
out = new BufferedWriter(new FileWriter("yourFileName.txt",true));
out.write(yourString);
out.newLine();
out.close();
You might have to tweak some of this code, but otherwise put this in your method body and I'm sure you'd be able to make this work..
Whow, your question is either very vague/messed-up or I'm going mad..
Let me just make sure what you mean here, you want this method, to Create a file with the name of the String that has been passed as the arguments for the method?
OR
Do you want to just write the String to a file?
Check out if this will help: www.javadb.com/convert-string-to-byte-array
It converts a String to a byteArray instead of just an array. Maybe you can use this in some way...
I wish I could help you there man, I know nothing of UDP at all. I do know however(as far as my knowledge goes) that you cannot convert a string to a byte.. Sorry bro
Oh no, sorry you understood me wrong. The string must only have numbers the "-" that I used meant that it can be "minus" number as in "-134" for example. You can't have any letters in that string.
What are you trying to do? Ahy do you want to convert the String to a byte?
Your string can only contain digits or start with a "-" otherwise a NumberFormatException is bound to be thrown...
With the number the user then adds, and after you've converted it to an int.
Use a switch statement to take appopriate action depending on the user input...
What might also work then in that case, is maybe just converting the string that you're getting to an int or what ever you want? As in:
myInt = Integer.parseInt(theStringThatYoureGetting);
Sir,
Googling "Web hosting" brings up numerous options from hundreds of companies. Should have no difficulty. Unless sir is staying in Kowloon Wallen City.
Regards,
Hi there!
Okay so the difference between Swing and an Applet..
Applets are little programs imbedded in websites/HTML pages.
Applets also are more commonly used for small single tasks in
webpages.
Swing programs however, would probably be the better choice
in your situation. Swing acctualy refers to a class in the
java language that defines/handles GUI(Graphical user interface)
components like(like buttons, labels, textfields etc).
So just depends what program you want. Do you want a standalone java
program (swing) or do you want a java program imbedded in a website(applet).
Hope this helps!