I have a string which is fed into the query as IN clause,which looks like this ('ACT','INACT') which is one of the parameters to a function inside a package.when a call is made to the function from java,
it looks like this
call package.function(1,2,3,('ACT','INACT'),4,5).
When the package is called,i get error as wrong type of arguments.
It is taking the values inside brackets as different values delimited by strings
Exception handling aside, I'm using the following to input a line of text in Java:
BufferedReader strin = new BufferedReader(new InputStreamReader(System.in));
String txt = null;
txt = strin.readLine();
However, I want to be able to edit an existing string, so that if txt were initialized to "hello" instead of null, then the readLine() would have the "hello" text in the buffer for me to edit.
I can't see how to do this. Any help would be appreciated.
Hello!
How can I draw a String in Java (using Graphics2d) in monospace mode? I have a font that looks like LCD screen font, and I want to draw something like LCD label.
I am using Digital 7 Mono font.
Do you know where I can find another font that will be monospace and lcd (I wan to type only digitals)?
What I mean is like have to user input a string with multiple variables and get the value of those variable. Like a simple quadratic formula: x^2 + 5x + 10. Or in java: (Math.pow(x,2)) + (x * 5) + 10The user would then enter that and then the program would solve for x. I will be using the BeanShell Interpreter class to interpret the string as an equation. But how would I solve for x?
Hi all,
I've been programming in Java for a few courses in the University and I have the following question:
Is it methodologically accepted that every class should implement an interface? Is it considered bad practice not to do so? Can you describe a situation where it's not a good idea to use interfaces?
Thanks.
Hey,
I want to measure thread execution time in Java. Now I'm monitoring thread start and end times, but I think it's not so accurate because thread could be suspended during it execution.
Hi,
I have to convert an incoming String field into a BigDecimal field that would represent a valid amount of money, for example:
String amount = "1000";
BigDecimal valid_amount = convert(amount);
print(valid_amount.toString())//1000.00
What is the right API to use convert a String into a valid amount of money in Java (eg: apache commons library)?
Thanks in advance,
When I use the default java locale on my linux machine it comes out with the US locale settings, where do I change this so that it comes out with the correct locale?
How can I check for a boolean to change state over a given period of time, and if a change is made over that time period perform a method?
Can any help please be given in Java.
Thanks.
I'm looking for a lightweight java reporting engine to be embedded in an applet application.
My first option was Jasper Reports, but the jar is over 2Mb, a little too heavy (and too bloated) for my needs. I don't know if there is modular jasper distribution, with funcionalities split in several jars (like html rendering, pdf, excel, compilation, runtime, etc).
I need to preview the report using Swing and print it. PDF export is a plus.
Can anyone recommend a tutorial on how to write a java servlet which connects to ms sql server and manages data?
I'm trying to write something which pulls products out of one database and inserts them into a stored procedure located on another database.
thanks in advance
Is it possible to have multiple authentication methods for a java servlet? For example, have form based authentication in addition to open id based authentication so users can choose how they log in.
Is it possible to define array in this way in JAVA, otherwise are there an alternative close this definition?
private final int CONST_0= 0;
private final int CONST_1= 1;
private final int CONST_2= 2;
private final int CONST_3= 3;
private final String[] CONST_TXTRECORDS = new String[]
{[CONST_0] = "test0",
{[CONST_1] = "test1",
{[CONST_2] = "test2",
{[CONST_3] = "test3"};
Hi,
i've a Java project managed by Maven2. The scenario i'm trying to solve is the following:
in development mode i need to use some configuration files (for example, a hibernate.cfg.xml configured for the dev environment), while in production i need to exclude all the development specific files and configurations, and get instead some other ones for my production environment. How can i handle this situation?
Thanks
how to download a image from a web server to java SE application.
i have found the code for the ME application but apparently javax package is not in the SE developments. can someone help me
Hi,
I found Facelift which can basically generate html headings as images (with "nice font") on the fly. Does something similar exist for Java (couldn't find one myself)?
Cheers,
stephanos
hi,
i'm trying to put an image as a background of my interface in java , i tried to write a class that does that and using it , but is there a simpler way to do that .
thanks
Hi,
I want to maintain order of the elements being added in a list. So, I used a linkedlist in Java. Now I want to be able to swap two elements in the linked list. First of all, I cannot find an elementAt method for linked list. Also, there is no way to add element at a specified position.
Thank you.
Hi,
I have just started with the ebay Finding API and Feedback API and I need to deploy a basic API implementation on GAE/J.
The problems are:
How do we start with the local dev environment of the ebay SDK?
There is no Java tutorial for the Finding API and feedback.
GAE/J + ebay APIs won't cause any complexity right?
I am looking for head start in the right direction,I am using Eclipse + GAE plugin.