I'm searching for a tool, which compiles a JSP file into a Java file without using a servletcontainer like Tomcat or something else. Can anyone help me out?
When do you call super() in Java?
I see it in some constructors of the derived class, but isn't the constructors for each of the parent class called automatically? Why would you need to use super?
Consider a private method which is called from JNI and not used otherwise, generating a compiler warning about an unused method:
private void someMethodCalledOnlyFromJNI() { // WARNING: method is never used
// ....
}
This is some legacy code in Java 1.4 - so no dice on @SuppressWarnings.
What hack would you use to suppress this compiler warning?
Consider the following Java source:
if( agents != null ) {
for( Iterator iter = agents.keySet().iterator(); iter.hasNext(); ) {
// Code that uses iter.next() ...
//
}
}
The agents is a HashMap.
Why does the for statement sometimes throw a NullPointerException?
Thank you.
Well, I'm pretty much trying to figure out how to pull information from a webpage, and bring it into my program(in Java). For example, if I know the exact page I want info from, for the sake of simplicity a Best Buy item page, how would I get the appropriate info I need off of that page? Like the title, price, description? What would this process even be called? I have no idea were to even began researching this :'(
Hi,
In android, is it recommend to use static variable?
E.g, implement a Singleton pattern in Java, I usually do:
private static A the_instance;
public static A getInstance() {
if (the_instance == null) {
the_instance = new A();
}
return the_instance;
}
My question is when do that get free by android JVM?
Thank you.
What is the easiest way to do a GAE/J datastore backup?
It looks like there is python bulkloader.py tool to do backup for Python apps, but what should I do to backup Java app? Is there any way to use python tool?
i know java API function charAt for example
String s="dato"
char r=s.charAt(0); r is equal d
but my question is how realy it works or what function can i use instead of charAt function to get same result? thanks
I'm trying to resolve a reflection warning in Clojure that seems to result from the lack of type inference on function return values that are normal Java objects.
Trivial example code that demonstrates the issue:
(set! *warn-on-reflection* true)
(defn foo [#^Integer x] (+ 3 x))
(.equals (foo 2) (foo 2))
=> Reflection warning, NO_SOURCE_PATH:10 - call to equals can't be resolved.
true
What is the best way to solve this? Can this be done with type hints?
While working in Java, I find it hard to position my Main application window in the very center of the screen when I start the application.
Is there any way I can do that? I tried with some of the predefined methods but none worked.
BTW it doesn't have to be vertically centered, horizontal alignment is the more important goal for me. But vertical alignment is also welcome.
Thanks
Can anyone help me? I am currently using eclipse java ide, and would like a plug-in that will automatically look at my classes and draw up a class diagram in UML.
any suggestions?
I am a new user of Java swing. I need to be able to create a popup with row info when the user clicks on that row. I managed to incorporate the mouseClick event reaction in my table class, and I have the row info available. But I don't know how to notify the main window about the event so it can display the dialog box/popup box. Can you help me?
I have a normal web service. Many java and .net users are accessing it. Can I update it to wcf without anyone having to change their code? Any tutorials?
I am busy working on a java app to run on blackberries but on some devices i am testing on, the code does not seem to be working and im having a hard time pinpointing where the problem lies.
My question is: Could the problem with some phones working and not working have t odo with the type of network they are running on such GSM vs CDMA and would the code that stops working on some devices be in one of the following areas:
1) Listeners - such as MessageListener and Phone Listener
2) UI Objects - simple test labels and buttons
3) Connection to a web service using ksoap2
How to identify which server side script language was used with a web site?
Asp.Net? PHP? RoR? Java? or other?
For example, Which server side script language was used with stackoverflow.com?
How can I run solr on a windows server, so it starts up automatically?
I run it with:
java -jar start.jar
but I need the server to do this automatically.
I have a jar that runs forever (infinite loop with socket listening thread) and need it to run in the background at all times. An example would be: "java -jar test.jar" How do I do this? Thanks in advance!
How can we redirect to login page automatically after some time?
I have a requirement to redirect to login page if the current page is idle for 10 minutes in Java/JSP.
I tried to use <meta http-equiv="refresh" content="120;url=./login.html"> tag. This works only when I click on any link but not automatically after 2 mins(120secs).
Can anyone tell me how to redirect to login page automatically?
Hello,
I'm currently having some issues with a Java application I'm developing. Namely the JVM is crashing with a segfault. I'm trying to locate the hs_err.log file which should contain some helpful info about the issue.
However, I can't find this file. I've used find, locate, etc, and nothing.
Any ideas on why the log file isn't being generated?
Given a database table with lots of data in it, what is the best practice to remove noise text? I want to detect and remove strings like:
fghfghfghfg
qsdqsdqsd
rtyrtyrty
I'm using Java.
Is there any reason behind using date(January 1st, 1970) as standard for time manipulation? I have seen this standard in Java as well as in Python. These two languages I am aware of. Is other popular languages also follows the same standard?
Please describe.
I am a Java developer but up to now have not had any hands on experience using the Spring framework.
Does anyone know of anyone good online tutorials that explain the basics and offer good examples and sample code.
How do I get the number of packages transmitted per TCP connection?
I am using Java, but i know I will have to fetch the number from the underlying OS, so this quastion applies to Linux and Windows operating systems and will have different answers for each of them, I assume.
I need this information to profile the network load of an application which seems to send too many small packages by flushing the socket streams too often.