Description:
Programming in the Java language.
|
|
|
regex problem
|
| |
Hi all, I am new to Java. I want to use regex to match against some strings. One of the requirement is to match a string if it is NOT equal to some other string. I know one way would be to negate the result but I want to know an alternate solution. Here is the sample code that shows my problem - import java.util.regex.Matcher;... more »
|
|
Trying to avoid the batch file route
|
| |
The code is pretty self explanatory-the commented out portion does not work I'm guessing due to the ">" which the java runtime does not recognize? How do I write the output to a text file without having to use a batch file? Things would be nice if exec() returned the output, but the process which is returned does not do so to my knowledge. So, I try... more »
|
|
Best practices for declared exceptions
|
| |
Hi, is there any pros to declare unchecked exceptions ? I'm asking since there is no warning in eclipse for this case. I'm asking for a rational, or better, an example of something which can't be done whitout declaring some unchecked exception (i don't want to start a troll).
|
|
JBoss Datasource Configuration
|
| |
To use a datasource with EJBs in JBoss, the JBoss documentation says to configure a JBoss datasource using *-ds.xml file and create a persistence.xml file in the META-INF directory of an EJB JAR within an EAR. Is there any way to specify the datasource information within the EAR and not as a separately deployed *-ds.xml file?... more »
|
|
JAR in a JAR?
|
| |
I'm trying to use an external library in my application. The external library (developed by a different developer) uses a library within itself (a resource library, essentially) which is also contained in a JAR file. When I pull this developer's library into mine application, all of a sudden, his library can't find the stuff inside his library... more »
|
|
Error: Pointer type needed instead of JNIEnv_
|
| |
How to fix the error in ret = (*env)->NewStringUTF(env, newstring); C++ on solaris 10? ...solaris foo.cpp -z text "foo.cpp", line 26: Error: Pointer type needed instead of JNIEnv_. 1 Error(s) detected. foo.cpp: ...JNIEXPORT jstring JNICALL Java_JNIFoo_nativeFoo (JNIEnv *env, jobject obj) { int i; int ds_ret;... more »
|
|
How to use assertions in java?
|
| |
Hey guys, I'm a sophomore in high school and i'm taking ap computer science ab this year. my teacher never really teaches us. but now i got a question that my friends dont know and my teacher's teaching comp-sci a people. so what is assertion? how can i use it in a java program? thanx, eileen
|
|
USB and hibernation
|
| |
Is there a mechanism for a USB port to be able wake up a PC on standby or hibernating? Ethernet cards can do it. Can anything else?
|
|
|