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
So, I have this question here, which has been answered. I'm looking to replicate the marked answer in Java. Is there any way I can do some/most/all of it in Java?
Of course Java can be used to replace grep as seen e.g. in this question.
As you really want extract parameter values from a URL you could e.g. go with this approach, where a simple Java-function returns all parameters and their values as a Map. If you already use a HTTP-related library you may also want to look if they included a similar function.
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've seen -Xbootclasspath/p:path being used for loading class dynamically can you please elaborate and explain by providing example.
go to your command line and type java -X, to see the options available, -Xbootclasspath followed by path to comma seperated lists of jar files specified to prepend these classes before the standard jre classes. A use would be if you want to add patches affecting core runtime libraries.
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
Is it possible too call bash script from java ?
and get, set and assign from netbeans
in the past we scripted with putty.
if true where can I learn more about it ?
Any information would be awesome
You could use ProcessBuilder
(there were many similar questions...)
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 writing a cross-platform IDE, and am wondering what the best way to compile a program (with gcc) using java code. (It's also a cross-language IDE)
Should I access the command prompt/terminal?
Also can I have some example code?
You can probably just execute gcc in a separate process. But rather than handling this all yourself, use something like Apache Commons Exec, which is great for this sort of thing.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm coding an automated test in Java which firsts creates a set of preconditions in my application using the existing API and then, during the executions of the tests, I need to update a specific value of a key in order to execute a different scenario. As this is a REST service, I need to use PUT or POST method. Which one is the one to pick?
It's an existing API: use the one it tells you to.
If it doesn't tell you which one, then use the one that works.
If both work, then read a decade worth of "PUT v POST" debates and decide on your own.
(I personally vote for PUT.)