473,542 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Forum

Java programming language (Sun Microsystems) - Ask questions about java programming, OOP, JRE, SDK, Swing, Plugins, Java Virtual Machine(JVM), Java Libraries: Collection, XML Processing, Security, JDBC, JNDI, RMI, CORBA, AWT (GUI) and more.
1
1,637
thread by: Oracle3001 | last post Jul 17 '05 by: James
Hi All, I am having a problem that my PC (running windows XP) is choosing to run JRE stored in c:\Program Files\Java etc rather than the one in c:\j2sdk1.4.1_04\. How do I change this situation? I tried changing the java plug in options in the control panel but this does seem to have worked! Adam
0
1,915
thread by: x | last post Jul 17 '05 by: x
Just wondering if anyone had a good source of information for creating custom events and their handlers. I've hunted up and down google/sun but haven't found anything significant. Much thanks in advance!
0
1,649
thread by: Phil... | last post Jul 17 '05 by: Phil...
I have a directory with a lot of jpg files. I want to delete the small ones. Small means less than 100 pixels by 100 pixels. I use File.list() to get the list of files. I use ImageIcon(filename) to create an ImageIcon. I use getIconHeight() and getIconWidth(). then I try to delete the file if it meets the "small" test. I tried to use...
1
20,233
thread by: Oracle3001 | last post Jul 17 '05 by: hiwa
Hi All, I want to take an image maybe in a jpeg or gif format or rgb and convert it to a series of CMYK images (one for each colour). If there an easy way using the API of java 2, or JAI. If not does anybody no an algorithm I can use to implement this conversion. Cheers, Adam
2
2,934
thread by: jc | last post Jul 17 '05 by: Phil...
hi i recently had a conversation with someone who said that an advantage of C# over Java is that C# uses JIT. now, i have a very simple understanding of what JIT is, and thus didn't know if this is true/false, and if it is indeed true, then why is Java not using JIT? Is it purely due to the "age" of Java, i.e. we now know that JIT is the...
4
33,547
thread by: DiggidyMack69 | last post Jul 17 '05 by: DiggidyMack69
I have a sql resultset called columns. When I convert an integer column to string that is a NULL it converts to zero. How can I get it to convert to null?? String x; x = Integer.toString(columns.getInt("Integercolumnname")); if x is null it will be converted to '0'. I want it converted to null.
6
28,906
thread by: QQ June | last post Jul 17 '05 by: RGonzalez
Hello, I have some java classes. But, I don't want my users to type "java my_java_program" every time they run the java class ? How do I pack them together into one executable file, like myprogram.exe. ? Any tools can do this for me ?? Thanks & regards, June
3
2,829
thread by: Computers911 | last post Jul 17 '05 by: Computers911
Hello: I have just downloaded and installed JRE and SDK 1.4.2_01 onto my system. According to the book I'm reading, javaw app ( where app is the name of the class I created ) is supposed to bring up a "windowed application". This is not what happens. I get a dos prompt back from the dos window I type the command in but nothing else. The...
1
3,901
thread by: Jimbo | last post Jul 17 '05 by: batman1990
wasn't sure i should put this here or in comp.lang.java.misc (or even comp.lang.misc) but I was wondering what is the consensus for line length for java code? i always thought 80 chars/line was proper, since it handles printing to a printer so well. however, i find myself having to break up lines of code a bit too much with that number. ...
0
5,711
thread by: Ben Wan | last post Jul 17 '05 by: Ben Wan
Can anyone please tell me what is canonical path? and why does it need to throws IOexception? how come getAbsolutePath() doesn't return "c:\folder\folder" but getCanonicalPath() does? things I tried using java.io.File file.getName(); // return "." file.getAbsolutePath(); // return "." file.getCanonicalPath(); // return "c:\folder\folder" ...
3
9,934
thread by: John Bowling | last post Jul 17 '05 by: CD Rasmussen
I'm creating a routine (not in a browser) to move multiple files on a daily basis to a backup directory. It can be done easily by call shell functions like 'mv file* newdir'. I can't find any reference in the Java tutorial about accessing or using the shell or system other than standard i/o. Does anyone have a clue on how to pass a command...
1
36,638
thread by: Allan Horwitz | last post Jul 17 '05 by: Rob Ratcliff
I am trying to draw a rectangle onto a pane. My program will compile and run but the rectangle does not seem to get drawn. When the program is run the program frame opens up, but I cannot see a rectangle on the pane. Any help would be appreciated. Sincerely, Allan
9
2,318
thread by: viator | last post Jul 17 '05 by: viator
Hello Everybody! I am working on a program which renders its GUI using swing components. The program does some bath processing (some lengthy matematical calculations) when user submit a task using a command button. but when that task is submitted the GUI stops responding to events. I want to provide the option of interrupting the processing...
0
1,541
thread by: Wes Batson | last post Jul 17 '05 by: Wes Batson
I have a program that builds screens dynamically by getting all form information from a database including size, position, and variable names. I was wondering how I convert the names from a String in the database to a variable name to be used in a declaration such as JLabel <database String name> = new JLabel(); Any help is greatly...
2
1,795
thread by: Jova | last post Jul 17 '05 by: Jova
Ok I have a class called WordPlayer and in this class I have 2 methods setTray // sets the player Tray with to its parameter. getTray // it gets the player Tray of Tiles and the tray implements a stack how do I get a tile on the player tray I attached the WordPlayer class is this enough info.
0
1,386
thread by: Meh-Lit Kim | last post Jul 17 '05 by: Meh-Lit Kim
Hi all, I know that under Unix/Linux, there is a max number synchronization objects (semaphores etc.) that one can create. I assume that likewise, there is a max number of mutexes and conditional vars that one can create under a threading environment such as when using Pthreads under Solaris. Now, each java object provides the Monitor...
0
2,738
thread by: Ben Wan | last post Jul 17 '05 by: Ben Wan
if I want to create a NameList where it only hold names... is there a good way to write the pushGirl(Object obj) and pushGuy(Object obj)? here's how I want to use it... PeopleList people = new PeopleList(); people.pushGuy("John"); people.puthGirl("Marry"); so, for example, do I write it like this? public void pushGuy(Object obj) {
0
1,366
thread by: Carmine Castiglia | last post Jul 17 '05 by: Carmine Castiglia
At the moment, I know virtually nothing about programming JCode and this is not a good time to try to learn. But, I do have a JCode requirement and am wondering if someone would like to tackle what I suspect is only 20 or so lines of code... Palmgear.com (a purveyor of application software for Palm OS devices) offers a "dynamic...
1
2,935
thread by: Peter Chatterton | last post Jul 17 '05 by: Frank Brouwer
I have a class extending Vector, but I want it to extend another base class that contains variables. Can I implement some interfaces to do the same thing? The following from the Vector API makes me think I'm out of luck: public class Vector extends AbstractList implements List, Cloneable, Serializable
2
1,749
thread by: Randy Given | last post Jul 17 '05 by: munki
What are your favorite Java magazines?
0
2,278
thread by: Rahul | last post Jul 17 '05 by: Rahul
I am getting the following exception when accessing one of my tables. java.lang.reflect.InvocationTargetException: java.lang.ArrayIndexOutOfBoundsException at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3181) at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:636) at oracle.jdbc.dbaccess.DBConversion.NumberBytesToBigDecimal(DBConversio...
0
1,574
thread by: Daniel Hasler | last post Jul 17 '05 by: Daniel Hasler
Hi With JPDA (Java Platform Debugging Architecture), is it possible to redirect System.out statements from the remote VM to the debugger client application, and if yes, how do I do it? - Dan
1
8,718
thread by: Naresh Agarwal | last post Jul 17 '05 by: simon
Hi Is there any difference between JDK and J2SE? What is standard name of Java distribution - JDK or J2SE? Also when we say JDK 1.3, Does it mean JDK 1.3.x or a specific version say JDK1.3.1_07? thanks,
12
3,114
thread by: David Turner | last post Jul 17 '05 by: Amey Samant
Hi All!, Does anyone know a link to a website or know the best way to create a data structure that will pick random elements from itself with assigned probabilities? For example, say I created a bag of 3 marbles(red, green, and blue) and the red marble had a 50% change of being picked while the green and blue marbles both had 25% chance...
4
17,276
thread by: Naresh Agarwal | last post Jul 17 '05 by: David Hritz
Hi Is there a way to copy the stack trace in a string, which is obtained via printStackTrace function of Exception object. Essentially I want to log the stack trace in case of any exception in a log file. thanks, Naresh

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.