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 !
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 have two applications running concurrently: one in Perl, and one in Java. The Perl app relies on using nfreeze to store objects in the database. If my Java app has access to that database, how can I "thaw" that object inside of the Java application?
I don't need to be able to write to that object, just read it and use it in the Java app.
Storable is specifically designed for Perl data structures. It hasn't been ported to other languages.
Instead of (or in addition to) using Storable, use XML, JSON or YAML (in no particular order).
It's that's not possible, your Java program is going to have to call a Perl script to translate the data into something more convenient.
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 am currently a relatively new in the field of programming, and I am helping with a friend of mine on building a social network. It is already live picxter.com. However we are looking on implementing a chat feature for our users and the owner told me I should use a Java applet as it would be best suited for our needs. However is this possible? We are not trying to make a chat site type of chat. We are trying to build a chat like Facebook.
Don't use Java for these sorts of applications! Using Java in your browser is not a very good idea in general. You could try to do it in JavaScript using AJAX (which is syntactically very similar to Java and by far not as slow, doesn't require a runtime environment and isn't as risky [you can argue about that, to be honest] in terms of security).
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 need to execute the program I've written in Java in another computer different from mine. Is there a way to make it run without having to set the system and enviroment variables and without having to compile it manually through the shell? It would be great if I could just click on a file and make it run. Thank you
Create a runnable jar. If the user has his Java set up properly, it can be run by double clicking on the jar.
(Provided of course that you don't make it depend on paths or other things on your particular computer).
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
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
Can anyone share your views whether we can automate Oracle Forms through Selenium?
One of the forms doesn't contain any locators (web elements) and only contains JavaScript functions. Alternatively, is it possible to call JS through Selenium?
Please suggest me best way or correct me if I'm wrong.
Thanks
Not that I know, for what I know it should be impossible at this moment with Selenium.
Oracle web forms run in a java applet object inside html (they are just one object in the DOM) so Javascript doesn't know any of the internal forms objects, and hence, can't record the operations or manipulate the form.
I'm also sorry it doesn't as we do a lot of development with Oracle Forms.
Best regards.