Recent update: 2008-5-9
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. ...
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 ...
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.......
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 ...
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 ...
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 = ...
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 ...
what is the method to list 2 list boxes in one form
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 ...
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'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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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.
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(){ ...
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 ...
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 ...
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 ...
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 ...
Is java a good language for a first time programmer to eventually start making games in? Thanks
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 ...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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.
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 ...
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.
Hey there,Can tell me how to send At Commands in java, Thanks a bunchRobert
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...