Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
After sending the message with JavaMail by smtp, how to put it into the Sent folder(IMAP)?
What about the non-english mail(ex: in Russian sent=отправленные)? Is there a way to get the name of the "sent" folder programmatically?
Folder.appendMessages()
There's no standard name for the "sent" folder. Depending on the mail client being used, the folder might have a different name. There's an IMAP extension that would tell you which folder is the "sent" folder, but I don't think most servers support the extension.
In general, the Sent Folder doesn't have a fixed name. Gmail, specifically supports 'special use extensions' for Folders. When you do a LIST to get the list of email boxes, it will tag the sent folder with a \Sent tag.
See Gmail's document for their implemented extensions.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to develope an application which extracts data from another application (the "whatsapp" application) when i am getting an incoming call.
How can I do it?
Maybe relevant guids will help :)
Thanks in advance!
Yogo.
It is generally not possible, unless if the application makes it public, for instance, sharing data via Intent or storing files in a public folder, e.g. in the SDCard.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
I am writing one web page in which I am putting one html input type="textarea" in which user will write their java code and on submit it will return output of that java code. Can I do this using jsp? if not then what are the other ways.
I would think very carefully before allowing people to do that.
At the very least, to read and run the user's input, you will need a JDK to compile it, and a JVM to run it. Since you're talking about over the web, presumably the user's machine will not have those (otherwise they'd just use theirs), so you'd have to use the ones on your server - that is, take the user's text, upload it as a .java file to your server, compile and run it (for an anonymous user on your server!), and send the result back to the browser session.
As you can see, there are a couple of pretty big, bad security problems here. Not recommended !
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I got an application that coded with java.
the application have a same window that i can add some text and hit the send button.
it is sending the test to a server and then print it there.
when i'm writing an English letter i have no problem.
when i'm writing Chinese letter , i can see it on the windows , but when hitting the send button the letter is changed to ??.
and the string that i'm sending to the server is ??.
any idea how i can add the Chinese support here ?
by adding to the bat file -Dfile.encoding=GB2312 the java application support the Chinese char.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a HTML file that acts like a template. For example:
Dear Name Surname
is contained in a HTML file. At runtime I would like to replace this with Dear Someone Name. How is this possible in Java?
Having looked in Google I couldn't find anything. I know I can do this in XML, but in this scenario I have to use the above approach.
Depending on the degree of complexity of your file a simple String.replace() or String.replaceAll() might do.
If you have more complex files I would recommend templating engines like Velocity or Freemarker.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
In my server-client program I want to know if the client is official (so, not modified). For that I want to implement a version check and the version should be stored in a data file or something. The problem is, how to store this securely? I don't want it to be readable with any sort of text reader, and if someone would modify the client, it must still not be usable for the modified program.
I already tried several things, like using a Data In/Out Stream, or an Object In/Out Stream, but they all remain slightly visible in a program like Notepad++, and still they can be used by any non-authentic version of the client.
Is there a way to do this properly?
Don't rely on a "version check" in this sense. Instead, use signed jars, which guarantees the jar cannot be modified and still run, and use the signature field in the manifest file in communications with your server to determine if the client is an authorized version.
http://docs.oracle.com/javase/tutorial/deployment/jar/signindex.html