203 byte By
PeaceGod at 2007-9-30 14:40:58
do any body know good material (Ebook,Epaper , web site ) to learn the difference between Objects, references, types and classes in javaand good live chat address which learn java..
471 byte By
wiley173 at 2007-9-30 14:40:59
I have a two classes called Class1 and Class2 in a package called myPackage1.They both have package myPackage1; declared at the top of the page.I compile Class1 just fine.Class2 creates and instance of Class1 and it will not compile unless I take the package declaration off of it. - But if I do ...
3514 byte By
yasoja at 2007-9-30 14:41:07
Question:String a = new String(?08001a908000016f?);String b = new String(?08001a908000016f?);Will a.equals(b) always be true? This apparently should work, but I run into problems.I?m using ConcurrentHashMap (one of the open source concurrency utilities from ...
353 byte By
Timur5 at 2007-9-30 14:41:11
Hello.I am interesting in the java-class that can generate a string of symbols (it is desirable to be of a minimal length) using given Stream of symbols, so that such a string is never found in the initial Stream ?I also want to find class that can do the same with the given Array of ...
I have Tomcat working with mysql but I want to be able to set up a path to the directory containing my JSP's so i just type http://mywebsite.com.Thank you for any help
HiHow can I tell to my program: public void method()do somethingIf(ok){Return to execute the method or the Do}Else{Do something else} } thanksD ...
Hi all,I need to add some classfiles that are generated on the fly into a jar file and then deploy the jar. I am facing a peculiar problem when trying to run the java program from the newly created jar. It throws up an NoClassDefFoundError when running java like this:java -classpath ...
264 byte By
VPS_leow at 2007-9-30 14:41:28
hi i am using a jtextarea with a jscroll pane to display some log message in my application. how to i make it such that when the text in the textarea goes beyond the textarea size, it automatically scrolls down to view the latest entry?thanks!
It seems I cannot set the datetime to 28/03/2005 02:00:00 (the problem is the hour).I have the following pieces code:1. Date d0 = new Date("03/28/2004 02:00:00"); System.out.println(d0);prints out Sun Mar 28 03:00:00 CEST 2004: the hour is 3 instead of 22.Calendar startCal = ...
Hi,I am able to send the mail to local people (belongs to same email server) by my SMTP server but when i am sending the mail to outside the account like ( any yahoo id or rediffmail id ) i am getting the following error. ( all yahoo or rediffmail Ids are correct)can any body help me ? Thanks ...
It seems I cannot set the datetime to 28/03/2005 02:00:00 (the problem is the hour).I have the following pieces code:1. Date d0 = new Date("03/28/2004 02:00:00");System.out.println(d0);prints out Sun Mar 28 03:00:00 CEST 2004: the hour is 3 instead of 22. Calendar startCal = ...
Hi,Anybody tell me how can i convert object[] to float[]. My code is:java.util.List value = new ArrayList();Object[] v = value.toArray();float[] f = ?I tried to convert first to String[] and to float[] but it did not work.Thanks,
390 byte By
pelegk2 at 2007-9-30 14:42:03
i did this :[CODE]String[][] unit_table = new String[2][];while (rs_units.next()) {unit_table[rs_units.getRow() - 1][0] = rs_units.getString(2);unit_table[rs_units.getRow() - 1][1] = rs_units.getString(3);}[/CODE]and i get :<B>Exception: null</B>why is that?thnaks in advancepeleg ...
Hello Sir I have the Problem while using PackagesI have two Packages A and B (inside A) where B package have Classes which neede to access the classes of A package .Pls 2-3 possible Solutions
619 byte By
jakain2 at 2007-9-30 14:42:30
As I understand it you only need to regenerate a Stub when your remote interface changes. What I don't understand is that, say your remote interface returns an instance of class "User" and you add a new method to this class or change the implementation of one of the methods, what happens at ...
165 byte By
Dcaptain at 2007-9-30 14:42:37
anybody who knows any link of the Java core Library specs?not the Sun, IBM or any other company's own specs but the Java itself..thanks.
Hi all!I have a nice problem that I feel should be easily solved, but how?!I have a class "MyStruct", which is a struct for storing things. I create an instance of MyStruct and want to store it in i file (I do this through converting it to a String. Wrong?). Then I retrieve the object from the ...
Hi all,I've a problem with the isAlive method of the class Thread. Here is the example:// main programThreadTest tt = new ThreadTest();(new Thread(tt)).start();while(true) {System.out.println("is alive = "+tt.isAlive() );try{Thread.sleep(1000);}catch(InterruptedException e){}}// thread ...
hi!i want to write a program that looking sites for gathering information that i need to them .this work should doing with program and i give to program address of sites that information is in them.then program reports to me.please introduce ways with java.thanks ...
I definitly sure that the ISelection is a TableRow which can be seen from the output below. I'm not sure what the [-brackets mean, can anybody help me out here, I must be doing something fundametly wrong. --8<viewer_.addSelectionChangedListener(new ISelectionChangedListener() {public void ...
612 byte By
bodgiver at 2007-9-30 14:43:17
Hello,I am trying to sort a 2 dimensional array of doubles according to some columns.For example (unsorted)1 1 00 3 10 1 01 3 01 1 1sorted according to first , then second, then third column should be0 1 00 3 11 1 01 1 11 3 0The only way out that I see is to do a bubble sort on each column, ...
Hi guys,I am looking for an interface or anything which allows me to do the following graphic. In a few words, there is a 2D plane square (for example 1 m width and 1 m height) represented by a regular mesh 50x50 nodes. Each node has got a value. In order to make a scale, I think I can split ...
Having a bit of a problem with the below code, it from an excersise in thinking in Jave. I've managed to create objects from an innner class before but when I try to base it on an interface it douse not work, pointers mutch appreciated:-interface C8Q22Int {class C8Q22Inner { }}class C8Q22 ...
Hi,I am trying to read a file from a zip file and i felt there is no better way to handle this than by handling it like below code. InputStream iss = getClass().getResourceAsStream("A.zip"); ZipInputStream zis = new ZipInputStream(iss);ZipEntry entry = zis.getNextEntry();InputStream is = ...
1513 byte By
rbouy at 2007-9-30 14:43:30
Hello,I spent the better part of yesterday seeking insight to this with little success. So I hope someone here can direct me in a productive direction.I set-up my runtime.exec in a manner similar to the article on javaworld.com which is often referred to here, with two threads to empty the ...
Hi!!!!!!!!!!!I'm developing an applet based on Swing.I implemented the KeyListener interface and overwrote the keyPressed() method like this: (this is only a prt of the code)/** Clase que implementa los eventos del teclado */class GeneradorEventos implements KeyListener{/** Metodo sobrecargado ...
2589 byte By
jfreebsd at 2007-9-30 14:44:11
The problem is that when i open the XLS file that I create using POI the DATE Cells are not formatted as DATE Cells and the code is well. It'sprivate void llenarFila(ResultSet rs, HSSFRow row, HSSFWorkbook wb) throws SQLException {ResultSetMetaData rsmd = rs.getMetaData();//DateFormat df = ...
Hi there, I'm attempting to creaet a java interface with an SQL database on an MSQL server but am not having much luck setting up the JDBC and MS SQL Server 2000 driver in netbeans... any help that anyone can give me will be much appreciated!I have netbeans setup and installed the SQL server ...
Hi All,If anyone could shed some light on this topic, that would be wonderful.Basically, I'm using the local date instance and formatting a date to short. I'm doing this so that everyone can see the dates in their native format.This works fantastic - BUT - for consistency's sake, I need to ...
I齧 trying to create a program to access a database using SQL and Java the other thing it齭 I齧 not sure if it齭 the best way to do it please /* * SimpleTableDemo2 To access a database * */import java.util.*;import java.sql.*;import java.io.*;import java.lang.Object;import ...
624 byte By
kilyas at 2007-9-30 14:44:37
I have been running into this problem for a while now but it seems to be getting on my nerves now. If I am running a web application on the websphere server in eclipse and stop the server make some changes and save them it works great, but the problem arises if I am debugging. Whenever I start ...
4952 byte By
_woot_ at 2007-9-30 14:44:45
I have two books and i have search on google but can't find the information i need.It's a schoolproject (so why don't i just ask my teacher? -It's holiday...)I just want some information so i can start...I'm trying to do a car register with my own HashTable. To start with i have these ...
646 byte By
brokolyx at 2007-9-30 14:44:56
I have a superclass BankAccount and two subclasses SavingAccount and CreditAccount. And i have a main class where i create my objects.So i am trying to figure is it possible to make a class Customer and then from there to inherit all methods from SavingsAcc and CreditAcc.Ex in main.Customer ...
693 byte By
dopey070 at 2007-9-30 14:44:59
Hi, im very new to java and im looking on how to solve this problem...i use eclipse if that helps anySyntax error on token "}", "finally" expected....why is that coming up? any suggestions on how to fix it?Heres the code:import java.io.*;class ReadNumber{public static void main (String ...
459 byte By
rbouy at 2007-9-30 14:45:03
Can anyone describe the interactions of the process environment created by Runtime.exec()?For example, if Runtime.exec() is used as follows:Runtime.exec("cmd /K somebatfile");Is the environment preserved throughout the execution of somebatfile?Rather, if the classpath, working directory, etc. ...
hello,I'm trying to parse an HTMl document for the attributes of the following tags: <IMG> and <A>I thought of using an XML parser (SAXParser) but there's some problem:1. html document is not xml well form (some missing end tag)2. script (such as javascript, vbscript)..would this ...
780 byte By
JavaTAD at 2007-9-30 14:45:12
I am trying to compile a series of Java files via a Korn shell script. I am running into to trouble using the -d option when the source file is under a directory. Assume the followingDirectory A contains directories source and classesSource contains 3 directories A, B, & C, each of which ...
523 byte By
vogel08 at 2007-9-30 14:45:22
I have created a java servlet that runs on TomCat 5. The web application performs various tasks to a Microsoft access database. When I run it on my local machine it works fine. Now I have to put it on a local server so it can be accessed within the department. I was wondering if there is an ...
I like that one can be expressive with identifiers in Java, but sometimesit really makes it hard to keep lines of code at 78 characters in length. I amposting a line of code below from a project I am working on. I am curiousto see how others out there would break up this particular ...
I'm having trouble that if I the following codenew File("con.model").exists()seems to always return true. I'm running on a Windows machine, and I believe this is because of the weird way Windows treats "con". I went to the directory and tried to delete "con.model", both through the command ...
130 byte By
kvodski at 2007-9-30 14:45:36
Does anyone know how I can access a particular website from within a java program and perform some operations on it?
342 byte By
jfreebsd at 2007-9-30 14:45:42
I'm getting a Timestamp instance from the DataBase and I need to create a Date. I was using the methods timestamp.getYear(), timestamp.getMonth(), timestamp.getDay() to create a Calendar and ask the Calendar the Date but those timestamp methods are Deprecated.How can i do it ? Some code ...
235 byte By
jh1562 at 2007-9-30 14:45:51
I hope somebody can help me on this. I am trying to apply two different tool tips to the same component. One will be displayed as the mouse hovers over it and the other will be displayed by pressing F1. Is this possible?
527 byte By
zioluter at 2007-9-30 14:45:59
hello,I call some methods with reflection.....As you know method.invoke(....) returns an instance of Object......I saw on javadoc that primitive data types are wrapped into their corrispondent object:es int->Integer......My problem is with primitive data types arrays: if I have int[] as ...
495 byte By
AMDJava at 2007-9-30 14:46:00
Do I need to pay Sun anything if I release a commercial application written in Java? This is for both the Standard Edition and the Enterprise Edition and the SDK concern is only the one from Sun and not other free java based compiler. Could you help me regarding this question preferably with ...
I need to transfer pdf files from one application (written in C/C++) to another application (written in Java). I have the option of using SOAP or FTP....what is the best method for file transfer? the pro's and con's of each?Thanks-EF
Hi,I have a java application (No GUI) that needs to print an RTF file. Could any one provide me links to tutorial/sample codes for doing this?Thanks a lot,Vaishali
448 byte By
kvodski at 2007-9-30 14:46:20
I need to write a Java program that interacts with a website by using a "browse" menu to enter a file, and then hitting a couple of buttons and choosing an item from a menu. I have looked at URLConnection and its getOutputStream function. I assume the actions that I need to perform can be ...
260 byte By
yu169409 at 2007-9-30 14:46:21
hi all i have a question about processing french character. i have a file that contains french characters such as ? when it is read in and assigned to a string variable, it becomes ╩, how can i preserver the french characters? thanks
I know this will not make my program portable, but how can you execute system commands on windows xp, 2000, 98se, and *nix? Is there a class that will allow access to this?I'm wanting to write a front end for cdrecord, and a few others.