I develop Java applications with Eclipse that process data. So far I only developed stand alone applications that take data from file or database, process the data, and output the results to the console/file/database.
I would like put my application online. I never did any web development, but from my understanding, the only difference...
When you setup a URL in your jdbc properties like:
jdbc:derby://localhost:1527/vehicle;create=true
Does this mean all the data is being sent via HTTP on a specific port? (it seems so obviously)
...
I need to establish a P2P UDP and TCP Connection between two Users. Both of them are behind a NAT.
A little research leads me to STUN, TURN and ICE.
Is there any Java solution (library) except jSTUN which seems to work only on UDP.
And TURN, ICE is much better for the symmetric NAT Problem.
...
Hi,
I'm working in an application using Tomcat and servlets.
There is a servlet (audioProcess) that receives the name of an mp3 file, that is played. This servlet also processes the mp3 file and stores the result in a txt file. The content of this txt will be replaced when the audioProcess servlet is invoked again (with a different mp...
Hey everyone,
I am relatively new to Java and while trying out some code came across something that surprised me. Hopefully some one can shed some light on this. Here's some code snippets relevant to my question. Those who've read the practice of programming might find this familiar.
This function is defined for the List datatype, and...
I'm trying to read a one line file character by character using java.util.Scanner. However I'm getting this exception":
Exception in thread "main" java.util.InputMismatchException: For input string: "contents of my file"
at java.util.Scanner.nextByte(Scanner.java:1861)
at java.util.Scanner.nextByte(Scanner.java:1814)
at p008...
In a java web application (servlets/spring mvc), using tomcat, is it possible to run a cron job type service?
e.g. every 15 minutes, purge the log database.
Can you do this in a way that is container independent, or it has to be run using tomcat or some other container?
Please specify if the method is guaranteed to run at a specific t...
Hallo,
I have the following syntax:
@AAAA{tralala10aa,
author = {Some Author},
title = {Some Title},
booktitle = {Some Booktitle},
year = {2010},
month = {March},
booktitle_short = {CC 2010},
conference_url = {http://www.mmmm.com},
projects = {projects}
}
....
I've made the following regular expression:
@[A-Z]*[{][...
I have a JScrollPane with a JTextArea set as its view port.
I update the (multi line) text shown on the JTextArea continously about once a second. Each time the text updates, JScrollPane goes all the way to the bottom of the text.
Instead, I'd like to figure out the line number that is currently shown as the first line in the original ...
Hello, everyone,
I'm a High School AP Computer Science student doing an independent study project in Java. I have chosen to write an application for beginning piano students in which the computer displays a picture of the keyboard with a note highlighted. The user then selects the name of the note that corresponds to the highlighted key,...
Hi,
I have done an layout in my GUI but it did not work , all the component just appear one after another.
Here is my codes :
import javax.swing.*;
public class main extends JFrame {
public main() {
try {
add(new FYP_Tx.GUI());
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(800, 600);
setLocat...
I'm getting a 'No thread-bound request found' error in my web app and hoping to get some help.
I'm trying to use struts2 + spring + hibernate, and use spring to manage the hibernate session factory, and inject hibernate sessions into my struts actions. I hope that made sense.
When the app starts up, there are no errors, but when i make t...
I am piping in a file and storing it into a treeset. I am trying to count unique words..
I am placing words that i dont want into a hashset. "a","the", "and"
I want to check to see if the file contains those words, before i place them into
the TreeSet..
i know i need some sort of if(word == find) ? i just dont know how to do it..
Sorry...
Hi guys, I am noticing strange behaviour when using the split() method in Java.
I have a string as follows: 0|1|2|3|4|5|6|7|8|9|10
String currentString[] = br.readLine().split("\\|");
System.out.println("Length:"+currentString.length);
for(int i=0;i < currentString.length;i++){
System.out.println(currentString[i]);
}
This will p...
We have currently a wsdl element that was defined as long since the number that was being passed could have a maximun value of 2^64.But now the client wants to pass in numbers with maximum values of 2^256 .In my view the only way to support this is to change the xsd type to String.Anybody has a better idea about dealing with it .
Also t...
Hi,
I have a question about the following code
private void printTree(Node node){
if(node==null) return;
printTree(node.left);
System.out.print(node.data+" ");
printTree(node.right);
}
I don't really get the point of 'return;' statement there. It looks like if node is null, code returns nothing. but then without that ...
Hi everyone
I think i'm missing something fundamental about how Hibernate works, specifically with lazy loading. My problem is debugging, as I'm not sure if this is a Hibernate problem or a Spring problem in disguise. I thought I would ask here before doing some major refactoring.
I have two Entities. One holds a collection of the ...
Hi i am using JPype The following is the code i am trying to use
from jpype import *
startJVM("C:\Program Files\Java\jdk1.6.0_14\jre\bin\client\jvm.dll","-ea")
java.lang.System.out.println("hai")
shutdownJVM()
It is giving error in the execution of the println statement
java.lang.System.out.println("hai")
...
i am using webservice.i am getting data to java in the form of C# dataset how to retrive values from dataset in java please help it's very urgent
...
i have a folder of javascript files, is it possible to include all of the files under that folder automatically? something like
<jsp:include-all parentFolder='/javascript' extension='.js' />
OK to make it clear
i have an ajax application, with lots of js fragments, but i want to aggregate all of them into one big js file so to spee...