What's wrong with Matcher.matches()

487 byte By dr_wack at 2007-9-30 12:18:49
Look at the following code:String regex = "(\\x2A*\\p{Space}*)*";Pattern strangePatter = Pattern.compile(regex);Matcher m = strangePatter.matcher("***********************************" + "******************************************** * ");if (m.matches())System.out.println("Matched");else ...

javac compilation

354 byte By PrabhuSai at 2007-9-30 12:22:24
When i type javac in command prompt, i get an error :Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Maini have installed java in D:\jdk141_03PATH & Classpath are set..path = d:\jdk141_03\bin;.;classpath=d:\jdk141_03\bin;.;Still the error is shown.. ...

Javac

348 byte By PrabhuSai at 2007-9-30 12:22:33
path = D:\JDK141_03\bin;d:\jdk141_03\lib\tools.jar;.;classpath = D:\JDK141_03\bin;d:\jdk141_03\lib\tools.jar;.;When javac is typed, the following error is shownException in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main But when java is typed, it is working fine ...

I have a problem with a jar file

500 byte By Elessar.82 at 2007-9-30 12:24:45
I create a jar file with JarWizard in windows but when i try to execute the jar in unix , don't work and throw this message "Failed to load Main-Class manifest attribute from /jars/CityDir" and i don't know why.My MANIFEST.MF file is this:Manifest-Version: 1.0Main-Class: ...

Java Web start?

247 byte By mike456 at 2007-9-30 12:25:21
I have a question I installed the j2sdk1.4.1_01 and I noticed that it also installed a Java Web Start program. What does the program do? I notice that it activates when I goto a website that uses a applets. thank you very much

JMX jconsole -- where is my MBean?

802 byte By vrmerlin at 2007-9-30 12:27:13
I'm missing something here in 5.0b2's JMX. I've put together a rudimentary standard MBean together, and want to view the data from jconsole (on the MBeans tab). Here's the code I used below to register the MBean.String domain = "UserDomain";String mbeanClassName = ...

Debug versions of Java libraries

1639 byte By sviyer at 2007-9-30 12:27:35
When you buy other development tools you get both: the release version of the library and the debug version. This helps with debugging i.e inspecting local variables inside the library etc.Why is it that both the java base software j2se1.4.x and libraries such as java help do not provide a ...

compiling interfaces

1108 byte By sharvan11 at 2007-9-30 12:27:50
Hi,I have an interface Compute.javapackage compute;import java.rmi.Remote;import java.rmi.RemoteException;public interface Compute extends Remote {Object executeTask(Task t) throws RemoteException;} Also there is one more interface in the same package "Task.java".package compute;import ...

what is java runtime environment.

159 byte By hi_bgrhari at 2007-9-30 12:28:18
hai, what is the functionality of jre. what it will do . what type of functions it handles. is there handles any system functions.

Unix Background Process

2128 byte By jusbe at 2007-9-30 12:30:39
Hi,I'm trying put my system working in background mode at a :Compaq V5.1 1885 alpha serverit' was running without problem in a Smart Sun Server...Now I got this error :segmentation violation at 0x11fff8a70r00 = 0x0000000000000004r16 = 0x0000000000000001r01 = 0xffffffffffffffffr17 = ...

how can I convert date infomation to a string just includes the date not th

106 byte By wgan001 at 2007-9-30 12:31:44
I just want the date like Thu 08, july 2004 but not the exact time.how can I do that.

[Help] Binary Search

478 byte By engtat at 2007-9-30 12:33:37
I want to do a binary search on a sorted array list.My question is,In the java.util package, there is a pre-written methods, Arrays.binarySearch() which I can use it to do the searching straight forward. What I concern here, if I write the binary search algorithm myself, will it be ...

How to have sign " in string?

278 byte By RomanAngelov at 2007-9-30 12:35:12
I read from DB and my String object is "RomanIvanovAngelov""" ,he has signs ".I must create table with DB result ,but sign " in my string crash all in HTML.How I can replace the signs " in my string with &quot for HTML representing of sign ".How I can do that?

Why doesn't String implement Iterable<char>

500 byte By pwolfgang at 2007-9-30 12:37:00
Why doesn't String implement Iteragle<char>? If it did, we could writefor (char c: someString) { // do somethin with c}The StringCharacterIterator is available, but it's syntax is different:CharacterIterator ci = new StringCharacterIterator(someString);for (char c = ci.first; c != ...

Would U pls tell my why?

1645 byte By David_Qiu_Weiping at 2007-9-30 12:39:12
//Here is the first classpackage com.xxx;public class StringEquals {public static void main(String[] args) { System.out.println("hi there".equals("cheers !")); System.out.println(greeting.equals("cheers !"));}private static final String greeting = "hi there";private static final Warper warper = ...

Passing innerclass name as parameter

235 byte By javaPuthuran at 2007-9-30 12:40:31
Hi,How i can pass inner class name as parameter which is used to create object of inner class in the receiving method (class.formane(className))Hope somebody can help me.Thanks in advance.Prem

Is it possible for thread to return value?

543 byte By ytjade at 2007-9-30 12:41:20
In my program, I use two threads, each thread makes a database connection and does a query. When two threads finish their query, the main thread combine the result. Is there any way for the thread to return an array to main thread.What I did is define the two thread class as innerclass in the ...

How to change final variable in Interface?

185 byte By jiangcheehwa at 2007-9-30 12:41:42
for example:I want to change CONCUR_UPDATABLE in Interface ResultSet to realize insertRow() and updateRow() methods.Can you tell me how to achive it? thanks.

Can Java program written on Windows platfrom run in Linux and Mac?

338 byte By frozenarmor at 2007-9-30 12:42:53
HiI am currently building a java applet in windows platform. I am wondering whether this program can be run on other platforms (Linux and Mac Os), Because the requirement of this program is to be able to run on three different platfrom (windows, linux and Mac os). Really appreciate if someone ...

Help!

93 byte By JavaEager at 2007-9-30 12:43:09
Can any one tell me:Where the packagesun.*.*specification?Thanks!

can not able to open tomcat

146 byte By satish_kols at 2007-9-30 12:43:26
when i am Starting my tomcat it is giving an error ie "Servise not found"can any one help me about this

JDK Version and JDBC

732 byte By M_Nadeem at 2007-9-30 12:43:41
Hi Java PeopleI wonder whether someone can help me out with this:I built a JDBC application on Windows and used the ODBC bridge. Created a data source and stuff.... it worked well on JDK1.2. I moved to JDK1.4 so as to be able to work with the DatabaseMetaData class, which is not present in ...

NoClassDefFoundError ? On Windows

1355 byte By dinosaur3367 at 2007-9-30 12:45:58
I started making this very simple application, featuring incomplete FILE EDIT and HELP menus (premade with JavaBeans for ease, but with the same result when hand-coded), four buttons that do nothing, and a JTextPane in the middle. It compiled all right, but I got the following error message ...

How to load resources within a jar file?

453 byte By kusanagihk at 2007-9-30 12:47:35
To allI want to know how to load resources (eg images or text files) within a jar file. Another question, is it the same to load these resources if you are wrapping an applet instead of an application ?I've tried to use this.getClass ().getClassLoader ().getResource (string); but it didn't ...

COMPILE ERROR

474 byte By pemorej at 2007-9-30 12:47:41
i downloaded j2sdk-1_4_2_05-windows-i586-p.exe and installed it in a win2k pro pc.no problem in installation. copied a simple program from the net:class HelloWorld {public static void main(String[] args) {System.out.println("Hello World!"); //Display the string. }}then saved it as ...

Compiling JDK 1.4.2 from source, under win32

3610 byte By cowwoc at 2007-9-30 12:52:37
Hi,Here is how I compiled JDK 1.4.2 from source-code under win32. I hope this helps the many others who are interested in doing the same.1) Download the sources from here: http://wwws.sun.com/software/communitysource/j2se/java2/download.htmlBe sure to download *all* packages (SCSL source, SCSL ...

Final & Static ?

210 byte By Huzefa-Yousuf at 2007-9-30 12:52:56
hi therecan ne body pls tell me what is the difference b/w Final & Static with reference to declaring objects n not the premitive data types ...... n what would be their effiecient use

Should static method in a utility class be synchronized

642 byte By kozmic.blues at 2007-9-30 12:53:06
Hi. I have searched google with various possible word combinations to no avail. My question is Should static method in a utility class be synchronized? For example, java.lang.Character class has a method isWhiteSpace() which is a static method. Suppose this method is being called simulatneously ...

installing J2SE SDK

231 byte By miquel24 at 2007-9-30 12:54:04
The j2se sdk contains the java virtual machine or are different things?I have installed the microsoft virtual machine and i don't know if there would be some problems if I install now de j2se sdk.Thanks

Reflecting a method with var args

1178 byte By arya_18 at 2007-9-30 12:56:19
I am trying to invoke the method of class TaskWithParams using reflection and I am getting a java.lang.IllegalArgumentException: argument type mismatch.Can someone explain why and how to get rid of it? I am new to using ...varargs...public class ReflectingKernelTest extends TestCase {public ...

What I choose?

191 byte By raulnunez at 2007-9-30 12:58:08
Hi, IM new in Java,really I dont know nothing; but I love it. I have all the tools and I need to know with what I can begin to do something : J2SDK - or JCreator?- Thanks. Raul.

What I choose?

191 byte By raulnunez at 2007-9-30 12:58:10
Hi, IM new in Java,really I dont know nothing; but I love it. I have all the tools and I need to know with what I can begin to do something : J2SDK - or JCreator?- Thanks. Raul.

file delete fails before garbage collect?

896 byte By sabrown111 at 2007-9-30 13:00:35
Hi, I've got a program that does some processing which creates a load of files in a directory and then deletes them later. Occasionally one of the files does not get deleted (file.delete returns false). From reading around I've heard that this can happen on Windows when 1) You create a file ...

Converting encoding of a Stream/String

1310 byte By peddip at 2007-9-30 13:02:38
Hi,I am wondering if there is a way we can convert encoding of a Stream/String. For example, I have an Stream/String having iso-8859-1 encoding and I want to convert it to utf-8 encoding. Is there any way to do that conversion?I figured out a way, but that is expensive to do. I build a JDOM ...

J2SE 1.4.2 JRE doesn't install

378 byte By murron at 2007-9-30 13:04:08
I've downloaded this program 2 times, and I'm getting the same installation trouble: When I go into the control panel to click on the JAVA Plug-In file (program) nothing opens or happens. Plus no data showing any file size of the program exists. There's just the Icon and nothing else. Then I ...

editorpane ( please help me!!!!!!)

394 byte By persianshadow at 2007-9-30 13:04:30
i want writing editor for html and javascript with java that change color of html text and javascript? ( i know that make use of editorpane) which method in editorpane useful for mywork? ( or example program )(i'm sorry for incorrect in this comment because english is not native language for ...

How to develop network configuration tool using Java

294 byte By john0204 at 2007-9-30 13:05:38
Hi,I would like to develop a network configuration tool under Java programming. The functionality of this tool can configurate IP, setting IP address, modify IP and so on. It is possible for me to implement it under Java? What type of Java technology i can utilize? Thanks.

File functions

235 byte By dvisitor at 2007-9-30 13:06:02
Hi, I was just wondering if there was a list somewhere explaining the functions of the individual files inside java\bin, java\lib etc. I've been searching for well over an hour now but can't find anything.Thanks.

J2SE 1.4.2 on RedHat Linux 7.3

331 byte By Antony.Paul at 2007-9-30 13:07:02
Hi ,I have to install J2SE 1.4.2_04 on a RedHat Linux 7.3 system on intel hardware. Is the download available at Sun.com can be run on this machine. My concern is that is the download is for NPTL implementation only or it will run on any thread implementations.Thanks in advanceAntony Paul ...

IS JAVA REALLY FREE?

1305 byte By RSA9999 at 2007-9-30 13:07:18
I am unable to determine if Java is free for commercial use. By commercial use, I mean that an application is developed using J2SE and deployed in a company for its internal use. What have to be done in this case? I looked for information on sun.com to no avail. They are selling Java Desktop ...

Help for JScrollPane

242 byte By wellblue88 at 2007-9-30 13:07:41
I am trying to use JScrollPane and JTextArea to create log. How can I set the scrollbar to automatically scroll down to bottom when a new log message is appended and the size of JTextArea becomes larger than JScrollPane window?

carriage return/line feed

339 byte By Chuck_Davis at 2007-9-30 13:09:13
I'm using Java on a Linux machine. I have to output a text file and transmit to a third party who are using windows. They are complaining that the UNIX "\n" is showing black blocks in their wordpad window. How can I change the Linux line feed so that it does not trouble windows users?Thanks ...

Extending abstract classes such as ByteBuffer?

680 byte By stempb at 2007-9-30 13:10:28
How would I extend an abstract class such as ByteBuffer?If I call the normal extends key word:public class MyBuffer extends ByteBufferthen I need to implement virtually every method in the class. But If I just create a ByteBuffer such as:ByteBuffer buf = BtyeBuffer.Allocate(100);then I can just ...

Failure to use javac j2sdk1.4.2_04

569 byte By presario2512EA at 2007-9-30 13:12:47
My laptop has installed on it Windows XP SP2. J2sdk1.4.2_04 ikons some shows instability. Jdb DOS command is stable and I am able to use it. Javac and appletviewer DOS command prompts areunstable and as soon as I click their ikons their DOS command is seen momentarily and thencloses ...

I need to print in only one line

189 byte By Elessar.82 at 2007-9-30 13:13:24
I don't know how i can print in the same line.I use the System.out.println() and the System.out.print(), but now i need print a line in the same position.thanks

Environment Variables

221 byte By FarazYashar at 2007-9-30 13:13:50
I have set the path variable to what is stated in the SDK installation notes. But every time I specify to import Java.blah.................. in netbeans it says that it hasn't been set yet.Any Ideas?

jdk 5.0 internal compiler performance

807 byte By mkolling at 2007-9-30 13:14:46
Hi there!I am working on a team developing a Java IDE. We do a lot of compiling (also of small code snippets for interactive invocation).I am currently testing on JDK 1.5.0 beta. One major difference is that compilation performance has become much worse. When I test on a slower machine (400 MhZ ...

Systems Programming

246 byte By Huzefa-Yousuf at 2007-9-30 13:14:55
well i wanted to ask da gurus over here ... dat can we make system program in JAVA ... coz it uses the JVM to execute the code so is it really possible to write system programs like a printer driver n communicating with OS n stuff ?

Java 5 on OSX

67 byte By aperritano at 2007-9-30 13:15:19
Whats the story with Java 5 on OSX, can i get a beta?

Missing JAWS.jar

363 byte By pvadams at 2007-9-30 13:15:26
I am new to java so I might have missed the obvious here. . I installed sdk1.4.2_05 and all was well until I included an import for netscape.javascript. and the package could not be found. I determined I needed the JAWS.jar in the classpath but I can not find the file. I've reinstalled the SDK ...