String.split() and DOT regex

494 byte By Piligrim at 2007-9-30 4:41:27
Hi All,I've discovered pretty weird behavior in String.split() function when the regex is DOT (.):String ipAsString = "10.0.0.4";String[] nodes = ipAsString.split("."); The result of the previous two lines is 0 (i.e. nodes.length == 0) but if I replace DOT by COMMA (",") the function ...

Help with First Cup of Java Tutorial

669 byte By j_peterson at 2007-9-30 4:41:30
Hello everyone,I am new to java (just downloaded the J2SE 1.4.2 SDK and am running on a Windows 2000 system) and have started my learning process by going through the First Cup of Java tutorial. I completed the tutorial, ran my hello.html from the appletviewer. The appletviewer displayed the ...

csating string to double

80 byte By vbeir at 2007-9-30 4:43:17
What is the code for casting a string into a double?thanks,

parse String to Calendar

121 byte By vbeir at 2007-9-30 4:43:22
Is there any parser that will take a string in the form of "26-Mar-04" and parse it into a calendar object?

creat setup

102 byte By Mr_mito at 2007-9-30 4:45:05
i've finished my software and i wanna make a setup.exe how i can creat that file

pages not accessible after installation

463 byte By sunshyne7781 at 2007-9-30 4:45:13
I was wondering what steps need to be taken to view certain pages after the installation of Java? There are certain sites that I go to and the pictures will not come up on my system, however I have been able to view them on other computers.I have gone into Tools, Internet Options, Security and ...

How to access the Excel files?

351 byte By MicroFanns at 2007-9-30 4:45:59
Hello,We usually develop our projects with the Excel documents supplyed by our client in our company,so I want to make an Java program to access data from Excel files directly.But Excel file destn't belong to DataBase table,how can I use JDBC-ODBC to access the Excel data?Thank you in ...

1.4.2_04: EXCEPTION_ACCESS_VIOLATION

6037 byte By MartinHilpert at 2007-9-30 4:46:17
Yesterday, i downloaded J2SE 1.4.2_04 and found that my projects don't start anymore. so i recompiled with the new SDK, but it still doesn't work:Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at ...

long URL

683 byte By gambierca at 2007-9-30 4:51:49
Hello,I am trying to use an HttpURLConnection with a long url (2000 characters). However, when I attempt to make the connection (.connect()), I get an "illegal character in URL" exception because the url is too long. (There really aren't any invalid characters) How can I overcome this ...

Socket read problem under load

1661 byte By mimmell at 2007-9-30 4:52:03
All, I have a very socket intensive program with a server and multiple clients with anywhere from 25 to 50 sockets on the server open at once. Under a load condition, I am getting partial reads which then throws off the rest of my communications because the expected size is not read and a ...

flexible graphs from java script

156 byte By anirudh_r at 2007-9-30 4:53:29
Hi,Can anybody help me to find flexible graphs with java script?. I am using Oracle 9i as my database, jsp and ejbs...Thank you.

SDK 1.5 Beta

148 byte By ASolymosi at 2007-9-30 4:53:47
I miss Enum.VALUES in SDK 1.5 Beta.Or how can I reach enum values, for example to program a next() or previous() method?

Problem with jar files

1109 byte By stonest at 2007-9-30 4:54:41
I'm having running a program in my jar. It seems to be a problem with my class path as when I run my jar with this Command linejava -jar ClientTest.jar -hI get the following errorException in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Loggerat ...

JDK 1.5 realese date?

129 byte By jayakumarCD at 2007-9-30 4:58:40
Hi, Is there any scheduled date ofr jdk 1.5 realese? where can I follow up the same?Thanks,jay

Does anyone know of an API that can gain access to system resource info?

172 byte By N51 at 2007-9-30 5:01:49
I wish to include cpu and memory usage monitors in an application but i don't know any way of obtaining that info.Does any one know a way of doing it?

How to set classpath on linux

25 byte By bhaskarunix at 2007-9-30 5:02:02
pls help me

how can i access javac and jav from comand line on linux

25 byte By bhaskarunix at 2007-9-30 5:02:03
pls help me

how to get the mysql driver for java or jdbc on linux

25 byte By bhaskarunix at 2007-9-30 5:02:09
pls help me

Cannot see anything on execution

656 byte By masterc27 at 2007-9-30 5:05:35
I recently bought a new computer and installed JSDK 1.4.2 along with JCreator.My files compile correctly, but when I execute them it only shows an empty window. The window is the correct size that I specified, but there is nothing but gray inside of it. The program works perfectly, I can click ...

Doubt in interfaces

969 byte By jmatee at 2007-9-30 5:09:53
Hi!I am trying to compile a class which implements an interface, so I have to override all the method in the interface, haven't I?Well, there is only one method in this interface:public class Call extends Frame implements ActionListener {//....void actionPerformed(ActionEvent e) { but I got ...

MulticastSocket

803 byte By xyoon at 2007-9-30 5:11:25
Hi,I have a question regarding client and server MulticastSocket. It seems like when we create the server part, we use the following:InetAddress group = InetAddress.getByName("230.0.0.1");Then the client can connect to the same class D IP address (ie 230.0.0.1)Then, if the server sends a ...

installation

370 byte By r_u at 2007-9-30 5:11:51
When I install "jdk1.2.1" in Windows NT and Windows 2000 Advanced Server, I am getting error message" 'Javac' is not recognized as an internal or external operable program or batch file". In the properties of ".java" file it says "unknown application".I set "class path" and all enviroment but ...

copy file

309 byte By vbeir at 2007-9-30 5:12:39
I need to copy a file (its a url from a website) to a file on my computer. I am trying to figure out how to do this. I found code for copying it with bytes but that messes up the file somewhat.... I want an exact copy of the original file.code is highly appreciated. thanks, ...

1.5 badly broken, can it be fixed?

2620 byte By cxx_guy at 2007-9-30 5:14:12
I'm working under the following system:07:08:00$ uname -aLinux dragon 2.6.4-gentoo #13 SMP Fri Mar 26 01:42:12 EST 2004 x86_64 5 GNU/Linux[linguist@dragon] sl=1 /usr/src/linux07:13:18$ grep . /proc/cpuinfo /dev/null /proc/cpuinfo:processor : 0/proc/cpuinfo:vendor_id : ...

Getting an .exe

191 byte By jmatee at 2007-9-30 5:14:17
I don't know if this question could be a bit stupid but,...How can I get a .exe file from my .class files?,in order to run the application anywhere.Thanks.

MIDI sequencer playback too fast in 1.5.0-beta

275 byte By svaleklev at 2007-9-30 5:18:11
I have downloaded JDK 1.5.0-beta which solves some of my MIDI problems but introduced a new one. The default sequencer seem to playback a loaded MIDI-sequence approx 30% too fast. Has anyone encountered the same problem?Running on Windows XP Pro 5.1-SP1

creating a file with xml extension

4311 byte By gkjdsfk at 2007-9-30 5:19:44
hello this i am going to implement in jsp..... the thing is just user will enter some values which i will get by using getparameter() from the .jsp page and that value i will fit in between these given xml tags which is already predefined.....just i have to create a file with the name of xml ...

creating a file with xml extension

4311 byte By gkjdsfk at 2007-9-30 5:19:47
hello this i am going to implement in jsp..... the thing is just user will enter some values which i will get by using getparameter() from the .jsp page and that value i will fit in between these given xml tags which is already predefined.....just i have to create a file with the name of xml ...

Do java codes/programs works the same in win 2k and win xp?

154 byte By britius at 2007-9-30 5:19:51
Hi,Does anyone have any idea if java codes/programs works the same in win 2k and win xp?Thanks a million!Britius

odd behavior while transmit byte[] -> String -> Socket -> String -> byte[]

1534 byte By fet_frumos at 2007-9-30 5:21:01
Hello friends!I develop application for WPAN controlling. Everything works ok except one moment.I have frame (byte array) which include IP address, type of operation, id parameter. Then I send this frame through the sockets. So all frames are sending and receiving properly except one.Here is ...

Multi - Comparable

243 byte By Gioe at 2007-9-30 5:21:53
I'd like to know how can I implement Comparable or if there's another interface which allow me to compare objects from differnts field... like to sort a book and choose if sort them by title or by author.Thanks a million

creating a folder

306 byte By ck.tan at 2007-9-30 5:22:08
1) I would like to create a folder under a directory2)then i would like to move all specific file types(say *.txt) to this newly created folder3)then i would like to zip this folder.how should i do that all in java?please help. this is urgent.Thanks. ...

Cannot Load jvm.dll in Sun One studio

734 byte By drake546 at 2007-9-30 5:22:53
I recently attempted to upgrade to the newest version of the java sdk (1.4.1 to 1.4.2 or whatever is current). From the instal message it sounded as though i needed to uninstall the older java. So I unistalled the old sdk and then installed the new one.Since then i haven't been able to get the ...

Java Program Not Running

645 byte By Rajeev.Asthana at 2007-9-30 5:25:25
Hi,I have a small Java program that imports Oracle.sql.* and Oracle.jdbc.*.It establishes a default connection and converts a String[ ] to Oracle.sql.ARRAY type.As per Oracle documentation, I have added paths of required .zip files in CLASSPATH variable.Though I am able to compile the code, but ...

question to java profesionals

554 byte By vitaliiusa at 2007-9-30 5:25:46
I have this question.how many lines of debugged code does java profesional with 3-5 years of experience write a day. what amount of work you do in one day? what is expected from you at work?you can post any code that you created today. i am a student at coumputer science and it takes me long ...

When is JDK 1.5 beta 2 coming out?

180 byte By cowwoc at 2007-9-30 5:27:43
It was due out on April 4th, 2004 according to some old Sun docs I found but that date came and went. When are we expecting a release?Thanks,Gili

I can not use jdk1.5 in JBuilder

405 byte By Liitle-Ant at 2007-9-30 5:31:07
I am using JBuilder X,when i change my jdk to 1.5,it shows below:"MainPanel.java": cannot access javax.swing.JPanel,bad class file: C:\tools\j2sdk1.5.0b1\jre\lib\rt.jar\javax\swing\JPanel.class,class file has wrong version 49.0, should be 48.0,Please remove or make sure it appears in the ...

Compiling Java in Linux error

243 byte By Mahesh@idealake.com at 2007-9-30 5:35:19
Hi, When i compile java program on linux its gives an error " Cannot Load Native Threads" i had set path as well as classpath variable.can any body help me whats the error about and how to rectify it

Issue with GregorianCalendar class

2291 byte By KrazyEyez at 2007-9-30 5:38:07
Hi I'm having issues with the GregorianCalender class. I am trying to enable daylight savings time but it doesn't seem to be working properly for. As a test I have taken the difference of time (in milliseconds) between a date where daylight savings causes a shift in time (April 4, 2004 for ...

putting " into a string

163 byte By vbeir at 2007-9-30 5:38:19
I have a long string which includes " how do I put this into a string as String s = " he said "hello"..." ;obviously doesnt work

Issue with Class.forName(String)

336 byte By CocoPops2 at 2007-9-30 5:39:24
Hi,Is there any reason why Class.ForName("ClassName") would generate a "cannot resolve symbol" error? I tried using it in a test project where it worked fine but when I try the same line in a medium sized project for uni I get the above compilation error.Any help appreciated(using 1.4.2)George ...

How to read binary content from URL and save to a binary file

1889 byte By angelearth99 at 2007-9-30 5:40:19
I have a scenario where my program would be receiving a URL string which points to binary data - could be a *.jpg, *.doc, *.pdf, etc. file. I have to read this URL's content and save it to a file on the hard disk.I have tried using BufferedReader on the URLConnection.getContent() but this way, ...

in dire need of glassPane help

491 byte By EvilPandaC-130 at 2007-9-30 5:40:27
how can i make a glassPane transparent?here is the part of my code that creates itJPanel pGlassPane = new JPanel();JButton b = new ...

Outer Class Accessing Inner Classes Variables

229 byte By donnapep at 2007-9-30 5:43:25
Hi Everyone,Should an outer class directly access the private member variables of its inner class? Or should it get their values by calling an appropriate 'getXXX()' method?Just wondering.Thx.

NetBeans & J2SE 1.5.0 SDK

137 byte By djzuri at 2007-9-30 5:44:21
Does anyone know how to update netbeans ide to work now with 1.5.0 if I uninstalled 1.4.2? it seems not to work ok. thanks!

Help!!!

215 byte By cseownga at 2007-9-30 5:45:24
Hi all,Wish to asked if there are any ways to make an applet (written in MS J++, visual cafe) comply with Sun Java? Doesn't seems to when running on Sun Java in IE.\Thanks so much!!!! =)

How to read from and write into the same file from multiple threads?

217 byte By m_nekkanti at 2007-9-30 5:46:12
I need to read from and write into a same file multiple threads.How can we do that without any data contamination.Can u please provide coding for this type of task.Thanks in advance.

Where and how to find or add the servelet packageI to compile a servlet?

749 byte By ylq at 2007-9-30 5:46:26
Hi,I met the same problem: " have a servelt java file and when I try to compile its giving the following error:C:\Shopping1\WEB-INF\classes\BookShoppingServlet.java:7: package javax.servlet does not existimport javax.servlet.* "It is said that the Servlet API is part of J2EE. Either you need ...

Reading from a .txt file to GUI

869 byte By w1n at 2007-9-30 5:49:55
Hi,I have a txt file that looks like this:1 sds sdsdf d dfd 43342 ww asdfgg ww 43343 dsf fdfdfdff fdfd 44344 ww wwww ww 4343Now i want to print this txt file to GUI. My code:private JLabel labela = new JLabel("");try{BufferedReader in = new BufferedReader(new FileReader("filename.txt"));String ...

CPU and memory rate

79 byte By diegosuaed at 2007-9-30 5:53:57
How could I get the used rates of cpu and main memory in Windows?