Started working with WEB UI recently. And encountered a problem of date string parsing/validation. "dd-mm-yyyy" Some approaches I found are: Matching - not complete validation, not flexible. (19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9
I am writing a server that receives http request(only GET method as part of simplification from school work) I used Socket class to get the connection I then used InputStream as well as Scanner to read the http request. However, while I was reading t
I'm trying to create a Nexus Proxy Repository to http://nexus.fdvs.com.ar/content/groups/public/, but we have only problems!!!! When I try buid my maven project, my Nexus does not find the DynamicJasper:4.0.2 artfact and the bellow error happens: [ER
From my knowledge when you create a pointer (non-primitive type) it is null until it is assigned. With primitive types it has a default value of zero. So for instance say I have the following code: int value[numberOfDesiredElements]; //all values are
I know that all classes passed to the function will be extending JComponent, but I don't know what the classes are themselves. My code is specific, but what I am asking is more general. In my code I am attempting to pass an unknown class that extends
I have a file with 2939 lines, and I am trying to save the five lines together in one index of a 2D char array. So, char [][] myArray; myArray[0] = {} //<--char array of first five lines myArray[1]= //char array of next five lines the way I am implem
I am writing a program that creates a game board, and uses a superclass and subclasses to generate the board. Essentially, I want to use an arrayList that stores the values returned back from the methods of the subclasses of Cell. But I cannot figure
I need a java program that ask a number between 0 and 2. If the user write 0, the program ends. If the user write 1, it executes one function. If the user write 2, it executes another function. I also want to handle the error "java.lang.NumberFormatE
I'm new to XML and I want to append points from an XML file to a point container that I wrote. this is the XML file: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <container> <point> <X>56<
I generated the code using the Cordova 4.0.0 CLI. Now I try to write a Plugin for Android (MyPlugin) to execute native code from the webview. But everytime i try to call the plugin's method I receive the errormessage: exec() call to unknown plugin I
I am running spring-mvc application. When i was closing Tomcat server, it shows SEVERE: The web application [/myapp] appears to have started a thread named [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely to create a memor
For testing purposes I currently ran into a situation, where I had to randomly create a two dimensional array with columns of potentially different lengths for each row. For example consider this illustration: 0.0 0.1 length = 2 1.0 1.1 1.2 length =
So following is my project structure: a jar file (named patch.jar) and a resource folder; so in jar file there is a class (named patch.class); in resource folder there is a sub folder (named scripts) and in the sub folder there is a file (named patch
I'm running Eclipse Kepler with Glassfish 4. I'm developing a set of bundles/plugins, which get deployed to the glassfish autodeploy folder. Also deployed to that folder are bundles from my target definition. The problem is when debugging the source
I have two Strings (they can be anything) like I am a boy and I am a man. Where I am a is common. My task is to find out the common words from two strings. I used Set<String> to store the data, but it only stores unique values. So my question is, ho
I want selenium to press "TAB" for me and then write something in the focused field, now I know that I can use sendKeys(Keys.TAB) But as I understand it That require a locator behind it, I want to test the tab order of my page and to do so, I wa
I install jre and jdk, then install Eclipse, I want to create new java project and run it with jdk. For another program I need rename jkd on jskd, in tip JRE in eclipse I can't choose jsdk, how to change this?It's really difficult to understand what
I have an Interface with Component annotation and some classes that implemented it as follows: @Component public interface A { } public class B implements A { } public class C implements A { } Also, I have a class with an Autowired variable like this
I am trying to make a username migrater for minecraft.net as a mod so people will be able to migrate their account ingame to discourage cracking of accounts. In order to do that I need to post a form to the website. I manage to successfully obtain th
I've a swing application that has to connect to database for some resources, for this i used .properties file to store database properties and that can be read at runtime. For this i am using the following code public void readPropertiesFile(){ try{
I want to show data in this format, 12-22-2011 11:00:00 [12-22-2011 11:13:39] Warning: Contact 'nagiosadmin' service notification command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: C:\ Drive Space\nH
I have connected VisualVM via JMX to an AIX server to profile my Java process. But the "Profiler" tab is missing I just get Overview, Monitor and Threads. Have I missed any configuration? When opening a local Java process I see the "Profile
I created simple ray tracer in Java as a hobby project, and well, it's slow. Not dramatically slow, but slow nevertheless. I wonder if I can get any performance gain using lower level language like C or C++ or will the difference be negligible and I
This question already has an answer here: ActionListener on JLabel or JTable cell 2 answers I have created a table in java in Netbeans and filled it with some data. Now I want to show some detail in a text area corresponding to the particular column
Given xml like this: <container> <item> <xmlText> <someTag> <otherTag> Text </otherTag> </someTag> </xmlText> </item> <container> I would like to select all text that is under item/xmlText. I wou
I have two JLabels created and added one of them to my JFrame but when I assign the other one to the added one the JFrame doesn't update add(jLabel1); jLabel1 = jLabel2; how can I fix this?In this line: add(jLabel1); You're adding to the GUI the obje
I want to use PHP to communicate with a java using shared database to communicate, please help me with sample code or logic. Thank you. EDIT: I appreciate your suggestions, Yes I will be using both php and java to connect to thesame database. The iss
we are migrating our application from an existing custom web application framework to JSF/IceFaces. we store window description in database: what kind of fields are on the window, what are their labels, etc. Can I have my xhtml pieces generated dynam
why we use 'Throws IOException' in java File handling. i mean what is the purpose of using these two words in File handling?? Please help...The throws word means that the code could enter an error state, the IOExeption word describes the error state.
I was waiting for the stable release of Netbeans 6.7 before starting to use it for my Java Programming. I would like to how to change the Dimensions of the Applet Viewer in NetBeans 6.7. When ever i run a java file by pressing SHIFT + F6, it opens an