584 byte By
jmor1 at 2007-9-30 14:00:57
Hi,I do this to run my java class (because it uses a lot of memory):java -Xmx128M Crosswordand this works fine.Now I've made an executable jar to run my class just by double clicking on the jar file. The problem is that I dont know how to make the jar use this VM parameter. I dont want ...
596 byte By
seunao at 2007-9-30 14:01:00
HI i've got a standard singleton but trying to use it to copy an instance of a structure of a database just the structure required.I'm using the proxy pattern for the database connection but i am lost trying to get an instance of the structure of the database any ideas please public class ...
208 byte By
tymer99 at 2007-9-30 14:01:04
Google is acquiring some great minds http://www.theserverside.com/discussions/thread.tss?thread_id=27554#131496 http://www.gafter.com/~neal/ http://david.stoutamire.com/
284 byte By
bumpert at 2007-9-30 14:01:16
Hi i want to know how much a company should pay a programmer with two years of experience in java technologies? (that knows others technologies like perl, vb, html, js, php, c, ...)i'm trying to find something on google, but didn't find something goodthx
1464 byte By
robtaft at 2007-9-30 14:01:17
I recently encountered a null pointer with an inner class that I could not explain. JInternalFrame historyFrame = new JInternalFrame("History", false, true, false, false) {public void setVisible(boolean b) {super.setVisible(b);System.out.println(historyPanel);if (historyPanel != null) { ...
Hi all,I am developing a system which allows users to upload RTF files (generated by Microsoft Word). My program will convert them to PDF programmatically on the server side and send the PDF back to the users.I installed a PDF printer driver on the server, and then use JEditorPane to load the ...
588 byte By
annie613 at 2007-9-30 14:01:28
i used this code to generate a int N. I do this using (even)n=n/2 and (odd) n=3n+1 until n becomes 1. i use a System.out.println(n); to show the results, but what if i only wanted to show that last 4 numbers in the sequence... any suggestions.. thanks in advance annie int n = 0; ...
236 byte By
ullaxe at 2007-9-30 14:01:29
Hi!I want to take a string and convert it to a string where every word starts with an upper case letter. How should I go about to do that?eg. "hello there my friend" -> "Hello There My Friend"/Johan
Hi Folks,I have an RMI client which tries to look up a remote object using bothNaming.lookup("//host[:port]/name OR rmi://<host_name>[:<name_service_port>]/<service_name>") and ...
608 byte By
matp93 at 2007-9-30 14:01:39
hi i wrote a program that saves the data from a JTextArea into a filetry {String data = jt.getText(); //jt is a JTextAreaf.createNewFile();FileOutputStream fo = new FileOutputStream(file_name);int c = 0;while(c < data.length()) {fo.write((int)data.charAt(c));c++;}fo.close();}catch(Exception ...
740 byte By
bindlist at 2007-9-30 14:01:50
Hi,I want to be able to get the processor speed through a java applet. I am using the 1.3.1 API (don't ask). Unfortunately the System.properties does not have this value. One idea I was kicking around was this:Ask the user to d/l a small C program.C is executed through .exec().C program then ...
1216 byte By
tomba13 at 2007-9-30 14:01:53
I am looking for information on how to create a client-side program that will let me limit the time connected to a URL in a browser. I'm a programmer but I haven't a clue if this is possible and if so how to go about it. Here's the problem I'm trying to solve: my girlfriend likes to play a ...
289 byte By
EZone at 2007-9-30 14:02:05
We are trying to migrate C++ application to JAVA. I need to find out JAVA api that deals with domain, such as list of user(group) name under one domain, list of all domain controllers...Under C++ world, it would be NetUserEnum, NetServerEnum...thanks in advance
202 byte By
Dr_samo at 2007-9-30 14:02:20
hi,Actually i have to use a function in 'C' thru JAVA, how will we use it thru JNI. Kindly give the answer with an example..........................Waiting for reply
344 byte By
coreli99 at 2007-9-30 14:02:23
Hello folks,I have a signed applet through which i can upload multiple files to a servlet. I wish to create another applet or enhance this one to enable it to download multiple files from the server to the client m/c. Any idea, how to go about it?I will appreciate your helpful replies.Thank ...
2517 byte By
namnet at 2007-9-30 14:02:26
Hi there, I'm trying to make a method that returns a String[] containing the sub directorys of a given path.It works fine as long as the application isn't in a jar, but when it is a NullPointerException is throwndue to the use of File/URI.The URL I pass to it is a one given by getResource() ...
My program performs 20,000 loops currently, storing information in a database. it goes through about 7,000 loops within a minute, but once it reaches 7,500 loops it slows down to about one loop every 4 seconds. I think the reason for this (from everything i've read on the internet) is there is ...
I have a hardware device that continuously streams data over the COM port when DTR is set. There could be multiple units connected to multiple COM ports and I would like to be able to scale this to support large numbers (25+ using COM1-25+). Currently, a thread is started that loops through ...
2457 byte By
Gorteo at 2007-9-30 14:02:38
For reasons of Applet compatability with MS JVM I have to use jdk 1.1. The problem is that when I tried to call the URLEncoder.encode method I have the following exception on my java console (MS JVM):Exception occurred during event dispatching:java.lang.NoSuchMethodError: java/net/URLEncoder: ...
Hi, i've read the sun page explaining the interface BLOB, and i've read the posts, but i still cant find a good explanation on how to do it. I just have a byte array, and want to store it in my database as a BLOB. how is this done?
Hi,I am trying to complete a small program which reads a template text file as a string, updates the string with real data, and then writes the data back to the text file. The template file is an XML file, so i need to write the data into the middle of the file, whilst preserving the XML ...
Hi, I have an object in my application which is hogging memory as there is up to 3millionof them in memory at one time and i am trying to cut down the size of it.the core data structure is an array of 1's and zero's.currently i'm using a byte[] to store these. Because i know i only ever want ...
Hi,I am writing a small program which reads in a template XML file as a String, and replaces certain values within the String with real data collected from a database. But i am having a problem as to how i write the String back to the original XML file. Obviously i need to keep the XML header, ...
Hi, For networking, which one is better? Serialized Object over a simple socket connection or RMI? What would be the advantages of each of them? Thx
146 byte By
Max_Chou at 2007-9-30 14:02:59
In a general way, windows map a port of IrDA to a COMx. (e.g: COM5)How can my java application known the port is COM5?
Hi all.I am haveing trouble figuring out how to add MyThread to a ThreadGroup. I have a Runnable thread MyThread that extends Thread, which I want to add to ThreadGroup threadgroup. From what I can find, You can only add a Thread to a ThreadGroup when you call the Thread constructor.Any ideas? ...
1069 byte By
unsavory at 2007-9-30 14:03:05
I am writing an client/server application that will work as follows:Server and Client both contain small objects that are exact copies of eachother.The client will send a message to the server to request a certain action(RMI?).The server will perform some calculations, update its copy of the ...
Hi,I am trying to write a large string file with lots of data to a text file. My problem is i need to write a new line for each section of data within String data. This may not seem too hard at 1st, but i need to write a new line for many similar elements, and it is impossible to identify one ...
219 byte By
Dcaptain at 2007-9-30 14:03:07
if I have many menu items in the MenuBar such as "New", "Save", "Exit"do I have to have one actionListener to each of them?do I have to have different MenuItem for each of them?thanks.
when we pass an array as a function argument, we do this:printArray(new int[] {4,5,6}); //goodOR int [] a = {4,5,6};printArray(a); //goodHowever, if we declare an array of integers like this, it will yield compile error:int [] a = new int {1,2,3}; //compile errorwhat's the rationales? please ...
am trying to connect to FTp thru proxy. I am using jscape's FTPclienti set the properties as System.setProperty() for ftpproxy host & portbut still it is not working.Also my proxy is set to make Ftp connectionPlz do help me out . i am not getting a solution to thisThank upriya ...
525 byte By
Roy_Roy at 2007-9-30 14:03:56
Hi All, I am implementing a java program for a simple drawing tool. However, paint() is needed. But my question is why the graphics(e.g. circle, rectange, square..even filled / non-filled) may be disappearred or shifted of its original position when other frames/dialogs move over them (that ...
Hi Friends, I just atarted Struts. I am lerning Struts from http://www.reumann.net/do/struts/main Lesson11.Tomcat already installed2.created app directory3.added Strut files(downloaded jakarta-struts-1.1[1].zip and added tld and jar files in WEB-INF and lib directory respectively)4.created ...
148 byte By
nairboy at 2007-9-30 14:04:09
Hai friendsCan any on tell which are the very important concepts in " CORE JAVA " as far as interview is concernedThanks
Why when i wont run the file(java.exe) in the DOS System the file can't run?Can i run the JAVA application in the DOS System?I love JAVA becuse it is run in eny Oprating system and i wont to run my program in DOS Systemcan i do this.
541 byte By
Dcaptain at 2007-9-30 14:04:26
Is JLayeredPane works well even my layout is a GridLayout?I have a layered pane and I set the layout as GridLayout...I added JLabel objects to the pane and set the background to red and black..the pane now looks like a chessboard, 8x8 squares..when I try to draw another JLabel on the pane, the ...
My application generates some temporary files (XML files and copied XSL files). The Apache FOP processor then generates other files (PDF) in a different directory. After processing, my application deletes those temporary files. Howevere, some of those files can't be deleted (File.delete() ...
Hi guys, I am trying to use vectors because I need a variable lenght and store 2D arrays in one coordenate of a vector. That is why I am using vector instead arrays. I can turn the type of variable using "Integer" (instead of "int" as arrays), "Double" (instead of "double") and so on. The ...
I'm pretty new to all this and i was wondering if anyone would be able to help me produce a random string of 3 letters to be inputted into a hash table. I already have the code for integers to be placed into the table but am having difficulty with letters. I've tried using the Random() ...
--Can anybody plz tell me how to make the TreeModel of all the underlying filesystem like if u have c;/ d:/ e:/ drives. so that the JTree is constructed.i want the Window Explorer's Tree structure.i .e whatever is u'r underlying fileSystem that should be the output.plz mail me on ...
Hi List,I have written a class which extends Thread class with 3 threads running.Now, I have to keep track of the number of threads of request in progress, the memory size in use, some averagetiming statistics of requests per second (if possible) or average processing time.Can any 1 tell ...
HiI want to fill a JTextArea one line at a time instead of setting the text as a whole.On the press of Button,I am calling actionPerformed method and i am setting the text in JTextArea.But its printing the whole contents to be displayed as a whole..I want my text to be displayed one line at a ...
JDK versions: Problem occurs in JRE1.4.2 and JRE1.5 (JRE142_05, 5.0 beta), but NOT in JRE1.3.1.OS: WIndowsHere is the problem Scenario1. A Webpage ( GOM - Javascript ) is running2. Clicking on a button in the above webpage will load an applet ( enc3 ) 3. Once we are done with the applet, click ...
1128 byte By
ujavasun at 2007-9-30 14:05:34
Hi,Below are the part are the codes presented that cause the problem. What happens is very strange to me and i would really appreciate it if someone could help me understand and solve the problem. If the excel file only contains numbers only or strings only in its columns the program works ...
Hi!The following code:ByteLookupTable blut=new ByteLookupTable(0,data);BufferedImageOp bufiOp = new LookupOp(blut, null);bufiWorld=bufiOp.filter(bufiWorld,null); outputs the following exception: java.lang.IllegalArgumentException: LookupOp cannot be performed on an indexed imageWhat does it ...
784 byte By
iamyess at 2007-9-30 14:05:38
hi,i got a problem// ....................String EntryName = "source.txt";ZipOutputStream fout = new ZipOutputStream( new FileOutputStream("test.zip") );fout.putNextEntry(new ZipEntry(EntryName));while ( fin.read(c)!=-1 ){fout.write(c,0,1024);}fin.close();fout.close();........................... ...
can somebody tell me where i can find docs about Java vs nNet Plateforms ? as a beginner, i'm willin to know about these tools.Thnx
290 byte By
quaxi16 at 2007-9-30 14:05:52
HI there,I wanna make a program, which opens a port - well this is quite easy, butI want, that anybody who connects to this port (xxx.xxx.xxx.xxx:port) see an applet in IE, which communicates with the programm, which opened it. Has anyone still done this?
101 byte By
yarikc at 2007-9-30 14:05:53
I am looking fpr some free APIs to create SSH tunnel.Any ideas?Thank you.
Please give a look to the code below :class B {private void method() {System.out.println("xxx");}class A extends B {private void method(){System.out.println("yyy");}A a =new A();a.method();}When I compile it,the result is yyy,because private methods can be used in subclasses where they are ...