Java on Windows XP

318 byte By akpome at 2007-9-30 7:34:12
Hi All,I'm new to Java. I set up JDK on a windowws xp machine . I did sysedit on the machine and edited the autoexec.bat file like this 'SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BIN' yet I could not get my machine to compile.What have I missed out? Pls somebody help me! ...

How to write this code ?

162 byte By ilanar1 at 2007-9-30 7:34:55
I need to write 3 classes that each one can get to the other with the same instance of the class , so how do i write this code ? thanks a lot

How to get list of files within a URL directory ?

321 byte By jtolip at 2007-9-30 7:37:49
Given a URL, how can I get all the files and sub-directories inside that URL directory ?url = new URL(" http://www.example.com/somedir/");String [] list = ?I want the same effect as the File.list() method.File file = new File(...);String [] list = file.list();Thanks ...

TimeZone problem in JDK1.4.2

595 byte By Bug_parade at 2007-9-30 7:44:35
I changed the time zone from IST to UTC in Linux. This is done by creating the link.ln -sf /usr/share/zoneinfo/UTC /etc/localtimeI executed the "date" command, it shows the time with the UTC time zone correctly. Calendar calendar = Calendar.getInstance();But, if i execute the above code in ...

including jars file to the classpath using javac

123 byte By gionnyDeep at 2007-9-30 7:47:16
HiI'd like to compile a file including a jar file to the classpath.In wich way is it possible?

Interrupt read() operation

628 byte By kcook73 at 2007-9-30 7:47:41
I need one thread to interrupt a second thread, but only when the second thread in a read operation:public void run()// Thread 1Code...Codetry{BIS.read()// BIS is BufferedOutputStream}catch (Exception e){}More Code...More Code}Essentially I want Thread 2 to be able to interrupt() Thread 1 (I ...

Changing Version of JRE

647 byte By Rajeev.Asthana at 2007-9-30 7:47:49
Hi,I had installed JDK 1.5. But an application that was running with JRE1.3.0_01 stopped running on this JRE1.5.0 giving a memory heap error. Actually the application was an applet.So, I had to install JRE1.3.0_01. Windows Registry says it's now 1.3 because of this installtion (earlier it was ...

How to print Chinese character in java

1407 byte By mukadamn at 2007-9-30 7:49:37
Hi All,I have a problem .I am trying to read a file which contains chinese characters and the print the content of this file to the printer.But when the content of the file is being printed, it is printing weird characters and not chinese characters. Can anyone please help.Plese find below, my ...

Forcing concurrent execution of lines

153 byte By kcook73 at 2007-9-30 7:50:41
Is there anyway to force two lines to execute one after the other, without letting another thread execute between them?Thanks

how to compile servlet from the command line on windows

374 byte By jmling at 2007-9-30 7:53:27
Hi,I have a FileUploadBean.java file, which use HttpServletRequest object and HttpServletInputStream object, I add "Tomcat_home/common/lib/servlet.jar into my path. But when I compile this file, it still couldn't recognize those object. What's going wrong. How to compile my class from command ...

Can't run any swing apps?!?!?

941 byte By callesollander at 2007-9-30 7:55:12
Hello!I have a very confusing problem, I'm trying to run the "Java Web Start" gui.It starts and shows a Window frame (with "minimize","maximize" and the Close"X"), but the rest is gray.Nothing changes if I try to resize, or just wait (it stood for over 1 hour).I also tried the "htmlConverter" ...

Thread

274 byte By jason_phyo at 2007-9-30 7:55:50
Since resume(), suspend() and stop() methods is Thread class are deprecated, are there any other ways to achieve what these method do?Or are there any class that is similar to Thread class and have method similat to those method deprecated?Thanks

Path vs. ClassPath

116 byte By Bionet at 2007-9-30 7:56:31
I have a simple question (I hope so!) what's the difference betwen path and classpath?Thanks.

Must have a valid X Window Session!?!?

491 byte By elgcha at 2007-9-30 7:57:23
Hi!I recently discovered that if you're about to use the BufferedImage-functionality in the standard Java SDK (1.4.1) then you must have a running X-Window session which the SUN-classes connects to when your create your BufferedImage.Why is that?I'm running Java on our Linux-server and does ...

unzipping a file

1231 byte By Vince75 at 2007-9-30 7:59:40
Hi all !I use java.util.zip for the first time and I have difficulties for even the simpliest tasks.Looking at the api, here the code I wrote for just unzipping a zip file and extracting all the file this zipfile contains : ZipFile zipFile = new ZipFile(uploadedFile);Enumeration entries = ...

How to convert string to date

380 byte By mukadamn at 2007-9-30 8:01:02
HI Everyone, i am trying to convert a date which is in string format to a date format...but i am having this errorjavax.servlet.ServletException: Unparseable date: "2004-05-03"Can anyone help?Here is a piece of code :- SimpleDateFormat formatter= new SimpleDateFormat ("yyyy-mm-dd"); Date today ...

problem with threads and graphics

297 byte By jonbyrne at 2007-9-30 8:02:18
I have a thread that chooses paths for a Travelling salesman problem, it then calls a TSPdraw class and passes it the path, which the class then draws. the problem is when i have two threads it creates two windows but only draws a path in one of them. any ideas where i`m going wrong

Why does Java Permit this

316 byte By rajeshv19 at 2007-9-30 8:02:37
Consider the following snippetclass A{int i = 10;.............void abc(){}}This is something that is not permitted in C++. Why does Java permit this. Is there any advantage in using this kind of declarations. Thanks in Advance ...

Why does Java Permit this

316 byte By rajeshv19 at 2007-9-30 8:02:38
Consider the following snippetclass A{int i = 10;.............void abc(){}}This is something that is not permitted in C++. Why does Java permit this. Is there any advantage in using this kind of declarations. Thanks in Advance ...

Accesing Registry

73 byte By mr_ahm at 2007-9-30 8:02:54
Is there any way to access windows2000 registry at runtime.

Does JDK1.4.2 provides SNMP implementation

112 byte By bdighe at 2007-9-30 8:07:21
Are there any APIs JDK 1.4.2 provides to send SNMP trap etc ?Regards,- bharat

does the jsp page receive a file ?

667 byte By Vince75 at 2007-9-30 8:09:23
Hi all !Here is my problem :I have a jsp page that might be called using two different forms, and only one of them may send a file to upload.My problem is that I have difficulties to detect if the request contains a file or not.I use org.apach.commons.fileupload packageHere my code to upload ...

JPanels and MouseListeners

1273 byte By hughsimons at 2007-9-30 8:11:24
Hi All,I can't seem to make an external class listen to a JPanel. Perhaps my code is messed up, i've been trying to solve the problem for a week with no avail.Thanks in advance,HughMy code is as follows:import java.awt.*;import java.awt.event.*;import javax.swing.*;public class PanelTest ...

Help needed.

264 byte By javafreac at 2007-9-30 8:11:46
I am trying to download and install j2sdk-1_4_2_01-windows-i586.exe but i cant find it. Yesterday i was allmost finished doing it but my computer turned off because we lost power. Please give me the link or the page from which to go on it. Thank you.

Where to start from?

262 byte By Houyii at 2007-9-30 8:13:11
hi guys, i am newbie of JAVA.. can anyone tell me where should i start from to learn java? i am trying to learn myself, so which book u guys recomended? any idea? i got full of intrest in Java. pls help Best regardsHouyii

array.length - what type does it return

154 byte By fet_frumos at 2007-9-30 8:16:33
Hello!Could not find this answer in jdk doc, so what type any_array.length does return? I suggest it is int, corret?Thank you.

reg. StreamCorruptedException

3273 byte By naren_j12 at 2007-9-30 8:18:01
Hi,Can U help me How 2 solve "StreamCorruptedException" problem.This exception i'm getting when i'm trying 2 use readObject().First time it is giving EOFException().from next time onwards it is giving StreamCorruptedException().code is:import java.io.*; public class FileTry1 {// instance ...

It doesn't works!

175 byte By reneconijn at 2007-9-30 8:20:17
I have a problem with Java 2 SDK.When I try to compile a java file I get the message that he can't find java/lang/object?What can I do about this?

io help

724 byte By me_no_like_java at 2007-9-30 8:21:16
how to make a program that an accept many lines of input on the standard input. The first line works then after that it doesnt give a prompt for a line to be entered. Here is the source code. any help would be greatly appreciated.public class InputTest {char name, color; public static void ...

Is this JDK 1.4 bug? (character set converter)

2654 byte By javalove93 at 2007-9-30 8:21:33
I experienced strange behavior of JDK 1.4's character converter.Executing attached JAVA file,if it run in JDK 1.4, performance will be really really slow.But in JDK 1.3, it may be a moment. I found similar JVM bug & CR, but not sure this is realed to this problem. ...

help me ! i am looking forward to your best suggestion,

340 byte By yc200405 at 2007-9-30 8:21:52
how can i acquire the high quality of the image using the BufferedImage?and now i have a dynamic image object,and the construct the bufferedimage object use the image object,finally i utilize the JPEGImageEncoder to convert the buffededimage to jpg image that is displayed on the ie windowsthank ...

Java2 SDK

109 byte By Dcaptain at 2007-9-30 8:23:09
Does Sun only provides Java2 SDK?Are there any other vendors who distributes Java 2 SDK?

1.4.2_05 Release date.

213 byte By Peter-Lawrey at 2007-9-30 8:24:54
I am looking for a release date for J2SE 1.4.2_05 which I hope will include a fix for bug 48350373. (Given it has been fixed) http://developer.java.sun.com/developer/bugParade/bugs/4850373.html

Catch all uncaught exceptions

140 byte By gtrhk at 2007-9-30 8:30:49
Hi,Could I set a system handler to catch all uncaught exceptions to show them in a message dialog?Thnaks!

Anybody can help me to identify the object?

562 byte By lynn_lee at 2007-9-30 8:31:47
Here I have two object, one is the instance of the parent class Class1, another is the instance of child class Class2, how to identify them in my program? Thanks in advance.Here I attach the logic in my program:public void myfunction(Object obj){ if (obj instanceof Class1)process1(); if (obj ...

Need help to implement vCalendar

255 byte By rhania at 2007-9-30 8:32:05
Hello,I want to implement vCalendar, and I need some help, if there is some one have some information on how to implement this class, or any good web site where I can found good Information.any help are welcome :)rania +

How to bulid a MS-Word file using Java

201 byte By jobseeker at 2007-9-30 8:32:37
I checked out the Apache POI, but it's still in the early stage of development and seems rudimentary and unreliable. What API else will you recommend?Thank you in advance.

Need help with BigInteger

601 byte By mads_nayak1 at 2007-9-30 8:34:00
Hi, I am facing a problem with the BugInteger(byte[] ) constructor, the api documentation of jdk1.3.1 says that the array byte[] array val should a twos complement binary representation of a number. So if I want to create the BigInteger for 2, I should ideally pass 254 in byte[0], but what ...

1.5 release timeline?

132 byte By forbes912029 at 2007-9-30 8:34:15
Hi all,Does anyone know when 1.5 will be released? A ballpark estimate helps.Thanks.Philip

Acces Level

270 byte By vicpan_7 at 2007-9-30 8:34:29
public class Xxxx {private int x = 0;private int y = 1;public void add(Xxxx y1){y1.x++;//Why can i call this attributes directly?where is the hide information...y1.y++;}}Who can explain me that

Caching Problem...

527 byte By TechDeep at 2007-9-30 8:36:41
I am creating an applet that loads an image file...The image file should not be cached in the browser cache...Now to achieve this, I have tried using the URLConnection class with the setUseCaches(false), and setDefaultUseCaches(false), parameters set...However I see that under the Sun Java VM ...

? null :

585 byte By Rod-Kay at 2007-9-30 8:37:45
HiCan someone pls explain the ff line in the code snippet below:init(isLoopback(addr) ? null : addr, addr.getHostName()); what does ? null: mean ?thanks public Test () throws IOException {try { InetAddress addr = InetAddress.getLocalHost(); init(isLoopback(addr) ? null : addr, ...

What is the major difference between JDK1.3.1_02 and other versions

244 byte By LTSunDev at 2007-9-30 8:37:58
HiWhat is the difference between JDK1.3.1_02 and JDK1.3 other versions? Cause when I am trying to create dynamic table using struts, it works only with JDK1.3.1_02 version and not with any other version.Thanks

Unwanted byte at end of file writing

1022 byte By redfield1979 at 2007-9-30 8:38:08
Hi,I am trying to extract files from a ZipFile object. It is working fine, except I get a character at the end of each file that is extracted. What could be causing this and how do I get rid of it?Code extract:Enumeration enum = zipfile.entries();try{//go thru entries in zipfilewhile ...

confused between JDK and SDK

271 byte By garish at 2007-9-30 8:39:11
Hello, everyone, I am really confused about JDK and SDK. I have tried to find something online which can make it clear. But unfortunately, I am still confused on their relationship? It seems that they are the same thing?Thank you for any help.

Open file using Applets

354 byte By viniciuscd at 2007-9-30 8:39:24
I'm developing a web site and I have to open an image, in a file a little bit different from normal images, an draw a boundarie in this image. The boundarie will be write in a different file. Both images are on the server. I know applets deneis file access.So, how can I do to open the image ...

java to launch default program in Linux and Windows

204 byte By crossplatform at 2007-9-30 8:40:39
in VB 6:Private Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA"...How to find the associated program with a file type, for Linux ? and for Windows?

Error reading setup initialization file

523 byte By Foggy_Bottoms at 2007-9-30 8:40:43
Hi folks,I'm pretty much a newbie to the java.sun world, even though I've programmed bits and pieces of Java in the past.I meant to get back working with the Java SDK but when I downloaded j2sdk-1_4_2_04-windows-i586-p.exe and ran it, I came across the following error right from the start ...

i found ZipEntry bug

578 byte By randyrhods at 2007-9-30 8:42:08
it is not clearly, but i found one zip entry bug.when i took ZipOuputStream's method putNextEntry() especially, its source file name was 2-byte character(unicode or another country except 1-byte character area), output file's zipped entry was cracked.source file ...

Unable to load database

865 byte By sathyaverma at 2007-9-30 8:42:12
Hi,I have installed Clover-1.2.4-02 for my ant.I have configured and executed the target with.clover, it is successful. But the problem is while generating the report it is throwing an error ie com.cortexeb.tools.clover.s: java.io.FileNotFoundException: Unable to load database I am pasting the ...