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! ...
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
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 ...
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 ...
HiI'd like to compile a file including a jar file to the classpath.In wich way is it possible?
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 ...
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 ...
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 ...
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
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 ...
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" ...
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
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.
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 ...
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 = ...
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 ...
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
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 ...
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 ...
73 byte By
mr_ahm at 2007-9-30 8:02:54
Is there any way to access windows2000 registry at runtime.
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
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 ...
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 ...
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.
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
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.
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 ...
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?
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 ...
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. ...
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 ...
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?
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
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!
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 ...
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 +
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.
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 ...
Hi all,Does anyone know when 1.5 will be released? A ballpark estimate helps.Thanks.Philip
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
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 ...
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, ...
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
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 ...
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.
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 ...
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?
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 ...
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 ...
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 ...