Advertisement

Experts have come up with some helpful tips for getting a solution to your problem fast.

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested J2SE Solutions: 1 - 25 of 198
 
URL yahooURL = new URL("http://www.yahoo.com"); URLConnection yahooConnection = yahoo.openConnection(); I am under companies' firewall. But if chnage URL to an internal webpage, this code ...
How do I get the difference (int value) of two java.util.Date dates? Like difference between 2007-05-31 and 2007-05-29 is 2. Thanks. _Esam
Hi Experts, I need to have a timer that fires up an event when the specified time is elapsed. How can I do this.   Please provide a simple example. Thanks,
Hello, I need to convert an image into a byte array.  I have noticed that there are different types of "byte arrays", I need the type that I can drop straight into a file and hit save as......
Hi experts, Java newbie here. Trying to do a POST to a https:// I get: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBu...
When I run a test case I am getting the following error. javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in...
Hi, I have a web project. Now I just received an .wsdl file that is at /WEB-INF/wsdl/SendEmail.wsdl I need to know how do I crete the client stub from this wsdl ? I will need a littl...
When I execute this line : title2 = title2.replaceAll("-", " ").replaceAll("_", " ").replaceAll("+", " "); I have this exception : java.util.regex.PatternSyntaxException: Dangling met...
How can we set a path permanently using .BAT  file. I wanted to add a folder bin directory to the existing PATH in my system variables, how can I do this using BATCH(.BAT) file  ? I do...
Hi guys I have a while loop in which I am trying to replace "${"+key+"}" with a value in a String. But somehow it throws a parsing exception. Would anyone know if there is another way to re...
Cannot set environment variable PATH and TEST by passing the value through .bat file or through Runtime.exec(command, String[] env). I have java 1.4 I have : String PATH = "\""+ "C:\\Progr...
Here is the code: What is the issue with the "target line" ? Why Java does not allow the initialization of  a final static variable in a constructor? Thanks, R public class class1 {      p...
need java code to validate date in the format mm/dd/yyyy which will accept values 04/03/2008 and 4/3/2008.It should consider both formats like using 04 instead of 4. I guess this would be eas...
...new to Java and just messing around... I am attempting to call the "BigAdd" method on this page: http://www.meizlik.com/Service.asmx I get a multitude of errors no matter what I try; t...
Hi! is there a way in java to implement a file change listener without using TimerTask class? Here is my problem: I have a web-app that has few config files. For one of them, we have the requ...
Hi, could anybody advise me on the issue that I got when trying to connect to Oracle? The error message that I got: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc10 in j...
Hi, is there some magic shortcut to indent all the code correctly in a block of code ? Thank u.
Here is part of my log4j.properties file # Set root logger level to INFO and its appenders to A1, A2. log4j.rootLogger=INFO, A1, A2 log4j.logger.rwong.broker.stats=INFO, A3 log4j.logger....
Hi,   I have 2 strings which contain dates in the same format shown below s1="01/01/2008" s2="01/02/2008" I would like to do a date comparison on those strings so I guess I will have t...
Hello, I've been looking for a good example of how to use Java nio (client/server) to simply transfer a binary file across a network.  Sounds basic, but it seems that most resources on the in...
How can I sort the following set in ascending order by the keys in the hashmaps m and m1 ? bth the keys in the hashmaps are date strings. Set all = new HashSet(); all.addAll(m.keySet()); ...
Hi, I am working on Java Application using Oracle JDeveloper 10g How can I make the Executable file for my project Please Help
I have 2 classes. 1. DataModel.java - this contains public getter methods and private fields like this: public class DataModel { /* private fields */ private double temperature; private...
How to compare two integers using bitwise operator without using any comparative operator. Currently, this is how I do it. int x = 10; int y = 12; int z = 0; z = x ^ y; If the ...
Hi! Using java (jdbc), can I write into an excel file under a column without a name (column name is always on row 1 right?) ? and also can I add a new column (while java program is running) ...