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
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?
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 there a way (and if so how?) to access plugged-in resources on my computer with java? Like the microphone, the speakers and the computer monitor? I'm not talking about mainboard, cpu, etc. this is reserved for C.
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
Hi friends,
I have text file as
0B85 61
0B86 6161
0B86 41
0B87 69
0B88 6969
0B88 49
0B89 75
0B8A 7575
0B8F 6565
I want to write this string into two dimensional array. (i.e) String read[0][0]=0B85 and String read[0][1]=61.
Please suggest any idea to do this using java. Thanks in advance.
ipString is a String representation of an IP address with spaces instead of dots.
String[] ipArray = ipString.split(" ");
String ip = "";
for (String part : ipArray){
if (part != null){
ip += part
}
}
ip = ip.trim();
int ipInt = Integer.parseInt(ip); // Exception is thrown here.
Exception in thread "main" java.lang.NumberFormatException: For input string: "6622015176".
Could someone explain why this exception is being thrown?
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)?
Is there a way to kill a child thread after some specified time limit in Java?
Edit: Also this particular thread may be blocked in its worst case (Thread is used to wait for a file modification and blocks until this event occurs), so im not sure that interrupt() will be successful?
This might sound stupid, but why doesn't the Java compiler warn about the expression in the following if statement:
String a = "something";
if(a == "something"){
System.out.println("a is equal to something");
}else{
System.out.println("a is not equal to something");
}
I realize why the expression is untrue, but AFAIK, a can never be equal to the String literal "something". The compiler should realize this and at least warn me that I'm an idiot who is coding way to late at night.
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
Hey guys,
I am working on a Natural Language parser which examines a sentence in english and extracts some information like name, date etc.
for example: "Lets meet next tuesday at 5 PM at the beach."
So the output will be something like : "Lets meet 15/09/2009 at 1700 hr at the beach"
So basically, what i want to know is that is there any framework or library available for JAVA to do these kind of operations like parsing dates from a sentence and give a output with some specified format.
Regards,
Pranav
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?
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 - how do I push server alerts to tray apps in java without using xmpp or other heavy protocols?
Do you recommend a way to accomplish this?
I was planning to write an app which uses URLConnection on a server equipped with Comet but I doubt if that would work as the client requires a JS to be invoked and URLConnection is not a browser..
What is the best way to push instead of using a proprietary client-server approach?
Usually when I'm typing a Java import statement in Eclipse or otherwise referencing a class via the packages that it is in, Eclipse shows a context menu with a list of all classes within that package. There have been several times, however, that it would only shows subpackages within a package and would not show classes within that package.
Does anyone know why this is? It sounds like a setting/preference was changed, but I never knowingly changed anything related to this.
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.
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.
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'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
I am new to Java Swing and I am creating a window which displays a list of items retrieved from an XML file that can be manipulated by the user.
The window should have a Cancel and a Save functionality implemented with buttons. While the Save functionality is straightforward (just close the window) I don't know how to implement the Cancel functionality. Does exist an "undo" function? Does anyone know how?
Hi,
I'm looking for a CSS Parser in java. In particular my requirement is, for a given node/element in an HTML document, to be able to ask/get the css styles for that element from the Parser.
I know there is the W3C SAC interface and one or 2 implementations based on this - but turorials/examples appear non-existant.
Any help/points in rigth direction much appreciated.
Thanks