Recent update: 2008-5-9

Connect Postgres from JDeveloper

372 byte By tnasa at 2007-11-15
Hello folks,I'd like to connect to Postgres from Connection wizard in the JDeveloper. I don't know where I shall put the driver in the wizard steps. After I action a "New Database Connection", the wizard ask for a "Connection Type". In the Postgres case, I don't know what type I shall to select. ...

Problem using Runtime.getRuntime().exec() in Linux terminal

865 byte By roamera at 2007-11-15
I have a java source file which needs to execute this command in the terminal envrionment:In window platform, when a run the program in Dos mode, it works fine.Code:Runtime.getRuntime().exec("cmd /c mysqldump -uxxx -pxxx -hxxx.xxx.xxx mydatabase | mysql -uxxx -pxxx -hxxx.xxx.xxx.xxx ...

Best collection class to add and remove Objects frequently

212 byte By srikanth-pulicherlaa at 2007-11-15
What is the Best Collection class to add and remove Objects frequently............Pls reply me as the performance is critiacal........and also what is the best when performance is not that important.......

coordinate finder syntax, if else statement help

2841 byte By nsfoura at 2007-11-15
import java.util.*;public class Cartesian{public static void main (String[] args) {double locale;double origin;double xaxis;double yaxis;double quad1;double quad2;double quad3;double quad4;double first;double second;double third;double fourth;Scanner console = new ...

call rmi function from web services

1761 byte By MohamedSaeeda at 2007-11-15
hi all I'm trying to publish this method but always it throws this exception:Exception in thread "main" java.security.AccessControlException: access denied (javax.xml.ws.WebServicePermission publishEndpoint)at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)at ...

Variable Name as Object Name

425 byte By QTQa at 2007-11-14
How do I define a name for a new instance of a class using a variable content as the name?so in the example below i want test to be the name of the instance created of the new class object, but for some reason it doesn't get the content of the string instead takes the string name.String name = ...

using mark() and reset() for reading text file

1900 byte By mslinuza at 2007-11-14
I need to read text from a text file generated by another process line by line, split it with defined regexp, then display it to a JTable.I'm using a BufferedReader.readLine() to read from the text file.The problem is sometimes the process has not finished writing the line to the file, which ...

2 list in one form

58 byte By anu.unni@sairama at 2007-11-14
what is the method to list 2 list boxes in one form

Developing an SMTP server...

415 byte By Azoda at 2007-11-14
Hi folks,I would like to develop a simple SMTP and POP3 Server written in Java which would be capable of sending and receiving simple "text/plain" mails on a LAN.Could you please tell me what are the prerequisites (softwares, libraries etc..) that I may need in order to do the same. Also is ...

help me pls....

1041 byte By hanamichia at 2007-9-25
good day guys...i just want to ask for a help from you guys out there.....i am a beginnner in java programming....our instructor was tasked us to display an output without using the System.out.println.....example:import java.io.BufferedReader;import java.io.InputStreamReader;import ...

I need help with Frequency Histograms and Arrays/Arraylists

2987 byte By scottsmithma at 2007-9-25
I'm trying to create a Histogram method that prints a Frequency Histogram table that places an asterisk in front each instance of the number in the array. I have two arrays, one with the main data and another inside this method. If you need, I can post the whole program.The frequency table ...

Not able to reproduce NumberFormat Exception

933 byte By kanth218a at 2007-9-25
Hi All,I am trying to reproduce the following NumberFormatException.But I was not able to do reproduce the Exception.I am passing a Date String in MM/DD/YYYY.In that way I am not able to reproduce it.Even I tried DD/MM/YYYY and other formats.I f I pass blank string or null or other formats it ...

imports

309 byte By Ariel-rbra at 2007-9-25
when I put , for example, "imports myproyect.x.y" I know tha x represent a folder , "y" is a ".java" and "myproyect.x.y" is the package, but when I put "imports java..." or "imports org.eclipse...." what represents "org.eclipse"? becouse in my folders (of the proyect code) there aren't these ...

how to incrementing the date by 1 sec using add,or roll functons

370 byte By prabhmeeta at 2007-9-25
roll(int field,boolean up) and add(int field, int val) increments the second field by 1, but it doesnt change the min part of the Date if seconds cross 59 mark. can any function do it?In Date i can getTime() and add 1000 millsecs and get new Date object using this time, but i need to know if ...

Why wouldn't indexOf ArrayList function work?

1186 byte By smiles78a at 2007-9-25
I can't post EXACT code since it's company information. I will try to replicate it here though so please bare with me.BEAN:public class Product { String name;String soldDate;Long id;// set and get functions for each also...}Product are in a database, the bean above represents what is in the ...

win32 api interface

211 byte By BenCuthberta at 2007-9-24
Does anyone have any information on the win32 api i would like to write a java application that woudl allow me to list all of the task names in the taskmangerSomething like Win32::Setupsup for perl

Don't know how to make executable jar files

393 byte By w.steelea at 2007-9-24
I've read through the online guides and am still a little lost. I recently started programming with Java and am not sure how to create a desktop application that I can launch from an icon. I have a packaged application but am trying to deploy it as an installation so folks can click an icon ...

is it possible to have an html link in a pure java application ?

239 byte By anonimudsa at 2007-9-24
can you put <a href="name@host.com">click me</a> in a java component, say, a dialog?i tried and the link appeared blue and underlined but it didn't respond to clicks (nothing happened when clicked).thanks.

Checking for EOF when reading files

1333 byte By hamtaroa at 2007-9-24
hi all, the code below only reads from halfway through the file, and at the end it throws an EOFException. i thought that "while (os.readObject() != null)" would prevent this, but apparently i need to use something else. can someone help? thanks. load.addActionListener(new ActionListener(){ ...

Reading Mail from File

468 byte By Mr.shaggya at 2007-9-24
Dears:I have this line into file I have to read it from Java Application:5Ahmad19ahmad7110@gmail.com9#0931282583N/A2I used scanner with useDelimiter function to read the Strings, and Number, but as you see the Mail include number, so I can't read all email address (If it include number ...

Play sound in a separate class

3207 byte By Pierrick_WAa at 2007-9-24
Hi,I have a program (applet) but that uses other file for each panel. My main file is an applet thus I can play sound when event occur. But my problem is when I try to do that in my other class that etends JPanel because I have some buttons on it. The sound is not working and give me error ...

Reading and Writing UTF-8 characters properly

1186 byte By belur_1da at 2007-9-24
Hi AllI have written a program which reads from a binary File usingDataInputStream Object. while reading some binary files, programencounters some UTF-8 characters(apart from bytes which are normal textlike Hello World etc) . I tried using This line of code:This was Initial approach which gave ...

ArrayList as parameter!

543 byte By mangustaa at 2007-9-24
Hi to everybody!I have this simple code:class A {private ArrayList Gart;public ArrayList getGart() {return Gart();}}class B {private ArrayList Gart;public void setGart(ArrayList g) {Gart = new ArrayList();Gart = g;}}and, in a Java bean, I have this statement:b.setGart(a.getGart());The problem ...

Java for games?

102 byte By kilonuma at 2007-9-24
Is java a good language for a first time programmer to eventually start making games in? Thanks

If not overloading how about new operators

1510 byte By ArtBlaira at 2007-9-24
Here's a popular subject that hasn't come up in a while. Considering the virilent backlash whenever someone suggests Java include operator overloading whadayasay we discuss a compromise?It looks like almost everyone requesting this just wants to do matrix/vector math without resorting to ...

to read the csv file using collections

3566 byte By Kommojua at 2007-9-24
i am able to retrieve each row of the csv file which is in table format But in some columns the data entered is in two or three lines while retriving the row, the program is taking The second line of that column as the second row of that file how could i display the entire row of that file in a ...

help blob!!! java for oracle database

162 byte By jho83a at 2007-9-24
i need of java code for download,upload and delete the blob file in a oracle 10i database.Can we help me?i attend your ersponse thanks

Highlight text in TextField

622 byte By dstubbsa at 2007-9-24
I am creating an autocomplete feature for a school project using JAVA. I have created a TextField with a keyListener to lister for keypresses. After the keypress, I search a list for possible matches; stopping on the first match which is then st to the TextField. I have one problem I am trying ...

java process

403 byte By haoa at 2007-9-24
Hello,I want to call a linux script from a java system, it's simple and I did thisString cmd = "./a.sh -in a=a -out a.txt";Process p = Runtime.getRuntime().exec(cmd);now I want the command like./a.sh -in "a=a" -out a.txtthis time java returns error message, although it runs fine when use linux ...

cant figure it out

5610 byte By @dia at 2007-9-24
I need to make a student class that has datafields for stdent namestudentnumber , year of birth and age of the student.Student number shall be on the formatfor examples123456The program shall ask user to enter student name ,and year of birth .User gets in the massage window information like ...

hardware beeps when I run java program

636 byte By dd007007a at 2007-9-24
Hi there,I am running a small simple java program where I read bytes from a UDP socket, and decopress them. I DO NOT get any Exception, and still everytime I receive a stream, my hardware beeps (not my speakers). I was wondering why this would happen. It gets very annoying while running this ...

How to get File created Date

251 byte By Satish.KCa at 2007-9-24
Hi..I need to get the file deleted date. Based on that i ve to remove those files which dates are less than 2004dec31.i can use fobj.delete(), for deleting the file. But how can i get the file created date?RegardsKC.

Can't compile 500+ source files - too many for command line

578 byte By Mark_McKaya at 2007-9-23
I'm trying to use the new apt utilty to compile a large progrect and generate some code too using annotations. I've been using ant to compile so far, but unfortunately the alpha apt task in ant does not work properly, so I'm trying to do this on the command line. I've generated my command ...

thread problem

938 byte By konkodi221a at 2007-9-23
hello alli having teo thread thread1 is the parent thread which runns every 500 milisecond and thread 2 waits untill thread1 notifies itthe program is given belowpublic Test2() throws Exception{thread1=new Thread(){public void ...

How to open a dwf or pdf file

168 byte By sekiraa at 2007-9-23
I'll be happy if sombody tell me or give me a good link about How to open a .dwf or .pdf file? I tried it with standard appletViewer but it did not work.

Null pointer exception using jdbc

371 byte By olive9a at 2007-9-23
Hay Friends,I have written a jdbc program that retrieves the data from the database table.Initailly I am caching the data in a hash table, finally adding it to a vector. When I try to ret rive the data from vector it is returning null values for the columns whose value in database in null.Now ...

java.util.regex.PatternSyntaxException: Unclosed group near index 1

229 byte By pgshravana at 2007-9-23
I have used replaceAll(String regex, String replacement) method.I am giving a string for regex. But i am getting the errorjava.util.regex.PatternSyntaxException: Unclosed group near index 1Please help.

Send Out AT Commands

103 byte By robertdka at 2007-9-23
Hey there,Can tell me how to send At Commands in java, Thanks a bunchRobert

calling c code that calls mount using runtime.exec

475 byte By kws11a at 2007-9-23
I'm having an issue using mount calls when I execute a c program through runtime.exec(). The program attempt to search all drives for data and display them for the user. When the specified data isn't found, the user is given the option to search again. When the user repeatedly does this the ...

do you think this is the bug in 1.5?

1255 byte By vitalii_usaa at 2007-9-23
I have this applet and the tooltip for second button does not appear after clicking on first button. It only happens in java 1.5. Do you think this is the bug or I am doing something wrong. this is the code/*<HTML><HEAD><TITLE> A Simple Program ...

How do I Generate Key Events

301 byte By Dwarf666a at 2007-9-23
I was wondering, how would I be able to generate my own key events? What I mean by this is, I want to write a program that presses a button over and over, like space bar. How would i go about doing this? I also want programs to respond to the key events as it would if I were pressing the ...

Creating files with strict default permissions

381 byte By G_a_da at 2007-9-23
Is it possible to create a new file with default permissions, for example +rw for user but no permission for anyone else? (i.e. chmod 600)It seems that if I first create a file, then change its permissions later, I'm creating a possibility for a race condition -- an attacker might get their ...

java/lang/NoSuchMethodException: java.lang.ClassLoader.addClass

1099 byte By BruceSama at 2007-9-23
package com.bruce;import java.io.*;public class FileTest {public static void main(String[] args) {File MyDir = new File("D:/Java_prj/Java/."); String[] FileNames = MyDir.list(); for (int i = 0; i < FileNames.length; i++)System.out.println(FileNames[i]); //Print all files in this ...

Urgent...plz help me.... :-(

406 byte By ashu_GEa at 2007-9-23
Hi,Im from GE HealthCare.Our project has Java as well as X-Server GUI components.We need to have one compehensive GUI testing tool for our project."Record and Playback" technique is prefereed.Using Java GUI testing tools (such as Abbot,Pounder etc) can we perform the the intended purpose ? Is ...

problem when application is closed using CTRL-C

444 byte By Jfrain2004a at 2007-9-23
When my app is launched it displays a JFrame and connects to a DB. In my GUI I have a windowClosing event handler and also a handler for a Disconnect button which will gracefully close the DB connection befor exiting. However when a user executes from the Cmd prompt a CTRL-C command to kill the ...

[watchdog] connection getting reset!

6745 byte By Giansoloa at 2007-9-23
hi folks,and first fo all, merry Xmas... :-?br>I'm experiencing bad issues with my program. In fact, i've been developping a tcp-ip client/server program. In order to know if the client or the server are still connected (alive) to each other, I made a watchdog_server that sends a message to ...

JNI - Do I require VC++ to create DLL File?

446 byte By Omkaram at 2007-9-22
Hi all,Do I really required Visual Studio to be installed on my system to create a DLL file with the following command at the console.> cl -Ic:\java\include -Ic:\java\include\win32-LD HelloWorldImp.c -Fehello.dllas given at ...

Trouble with generics

474 byte By pbwest at 2007-9-22
I'm having a lot of trouble getting my head around generics. I assume others are in the same boat. What resources have folks found useful. I've read Bracha's "Generics in the Java Programming Language" and looked at Bracha et al "GJ: Extending the Java programming language with type ...

SQLEXCEPTION: Cursor error

2808 byte By rahulkav at 2007-9-22
Hi,We are getting following Exception in out Java application:====================================================java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Could not complete cursor operation because the table schema changed after the cursor was declared.at ...

Problems with Bluetooth Filetransfer

4078 byte By Marko_Holbl at 2007-9-22
Hi,I'm working on an application to transfer data from one bluetooth enabled PC to antoher.The Problem is that the server who receives the data misses a few last bytes of it everytime.The client on the other hand finishes to send data correctly.There is also another problem... the server ...