5,727 Posted Topics
Re: Everything you need has been explained to you several times already. I don't see how regurgitating the same knowledge again will make any difference. | |
Re: After some more study (in the wee hours of morning) I found the solution (I hope, I've not tested it). Rather than declare the argument as Integer.class define it as int.class (I know it looks strange). These are special classes used internally by the JVM to represent primitive types. They … | |
Re: Expect more innovative services to take over like highspeed wireless connections. Far cheaper to put up than cables underground but so far it's not been worth it because of the price protection providers had. That's what you get when the government prevents a free market economy: stunted innovation. | |
Re: ah, the MX1000. I have its slightly cheaper brother, the MX700. Indeed a great piece of kit. | |
Re: You could start with the installation guide: [url]http://docs.sun.com/app/docs/doc/817-7971?a=load[/url] and then continue with the rest of the documentation: [url]http://docs.sun.com/app/docs/coll/790.7[/url] | |
Re: There are wrapper classes for every primitive type. Use those instead. From the javadoc (which you DO you, do you?): [quote]"Invokes the underlying method represented by this Method object, on the specified object with the specified parameters. Individual parameters are automatically unwrapped to match primitive formal parameters, and both primitive … | |
Re: what's that got to do with Java? There are some programs that might help you, IF you are lucky and the data hasn't yet been permanently destroyed (a delete only removes a file information block in the index of the drive, but if the actual data has been overwritten it's … | |
Re: I've I think 2 permanent forwarding addresses at sites I'm a paying member of. The term "I think" should tell enough, I never use either of them. Maybe the fact that I run my own mailserver has something to do with it but in my experience the only people who … | |
Re: Reflection is your friend. But a better way by far would be to use JUnit ([url]http://www.junit.org[/url]) as a testing framework. It supports complete automation, you effectively write test scripts (as Java classes) and JUnit executes then and shows the results. You can even integrate it with Ant ([url]http://ant.apache.org[/url]) to provide … | |
Re: GCJ is a very poor implementation. It's platform specific (like all native compilers), extremely incomplete (effectively utterly useless), and generally a pain in the ass when trying to set up Java correctly on any machine it's installed on. executable Jars and JNLP (Java WebStart) are the way to go. | |
Re: Crypto and chat apps have been done to death... Doesn't mean you shouldn't consider them, but you might want to think outside the box. In my experience doing something unexpected gets you browniepoints with graders. | |
Re: Don't you think 4 months after the last reply (and 5 months after the original question) is a tad long a period for your post? | |
Re: It's an AWT exception thrown by datatransfer operations if the datatype isn't supported. Things like drag and drop, clipboard operations, etc. I guess the error occurs on different vendor implementations of the JVM? Possibly on macs or unix? DataFlavors are static descriptors for data types. You get this exception if … | |
Re: Make an executable jar or a jnlp. But anyone with an installed JRE can run a Java application if they know the name of the class that contains the main method (or you provide a batchfile or other startup script for their OS). If you had tried to learn to … | |
yes, there's an area of Java I'm almost a complete novice in (so far, I'm going full steam ahead :cheesy: ). I've the following code to filter out non-numeric input from a JTextField (which is meant to contain a timeout interval in minutes, that's why). [code] private void dumpNonNumericInput(KeyEvent e) … | |
Re: You can't. It needs to be installed there for your use by the server administrator. | |
Re: The DOM API is really simple. When you have an XML element you can call methods on that that will give you a list of all elements with a given name (or using other criteria) that are children of that element. There are also methods to retrieve attributes and node … | |
Re: Centering the window: [code] // Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = frame.getSize(); if (frameSize.height > screenSize.height) { frameSize.height = screenSize.height; } if (frameSize.width > screenSize.width) { frameSize.width = screenSize.width; } frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); frame.setVisible(true); [/code] [code] frame.setResizable(false); [/code] turns … | |
Re: The JSP will need to have access to the class of course. That means importing the package the class is in. After that you can instantiate it like everything else. BUT (and that's a very big BUT) you should really not do that. You should use a servlet for stuff … | |
Re: " dont know y its giving me this error. All the parameters r correct. Can any 1 help me. Im developing a container tracking system for a company. I have worked with Java and Oracle. This is my first time with Java and MS Access." You saved yourself 7 characters … | |
Re: Interesting. And darn that I've no time to look into it (and found out about it a month after it started). | |
Re: It's quite easy to build a basic webserver in Java (it's used as an example in several books about network programming in Java). The question is what do you want it to do and support? | |
Re: none. Linux is not suitable for desktop use unless you have a) a very serious understanding of Unix in general and Linux in particular, b) old hardware (10+ years) to make pretty sure it will all work with Linux, AND c) no requirements to run modern highend software like most … | |
Re: 1) search the web. There are some tools that package a jar in an executable wrapper, but why would you want to? Far easier to use JNLP (Java Webstart). 2) Don't. Learn about classpaths instead. 3) see 2) It would be easier to just search the net for one of … | |
Re: Take this to the web forums, especially JavaSCRIPT or HTML forums. Java is NOT JavaScript. | |
Re: use getDeclaredMethods() instead. The API docs would have told you as much :) (yes, I know I keep hammering away at people using them, they're that good) :mrgreen: | |
Re: 1) not quite. Static methods don't share any object instance. Rather they don't have access to the object instances at all. 2) [url]http://java.sun.com/docs/index.html[/url] see the coding conventions for what's the norm, and the language specs for what's required. Also check out the tutorial (it's not quite up to date but … | |
Re: It's alive (even if my Delphi installation isn't at the moment, I'm too busy with other things). But Delphi isn't all that hard and there are loads of resources available, maybe people don't feel the need to ask many questions. Which could be a sign that Delphi is used mainly … | |
Re: NEVER eat exceptions. At the very least log the exception message, better yet is to log the entire exception stacktrace. My guess is that either your read operation fails, causing the method to abort, or the data you're reading cannot be parsed to a double (empty string maybe?). Your "while … | |
Re: There are in the world more people knowing C/C++ than Java, it's true. It's also true that many Java programmers also know C and/or C++ (and often several other languages as well, including Pascal, Python, Ruby, etc.), while many who mainly program C/C++ rarely know anything else. And the more … | |
Re: no. Applets are clientside code, the classfiles will always have to be downloaded to the client. In fact, your user won't even have to do that, he can just pull the classfile from your browsercache. You can do things to prevent the classfile from being used from any other location … | |
Re: That's not Java, it's Javascript. Put it in the Javascript forum if there is one, otherwise the html forum, and format it properly so people can actually read it. | |
Re: Ant is a build tool, similar to what make does for C. It helps automate builds, making them far easier to perform in a way that can be easily reproduced. Little use if you have a few files, but when your project runs into the hundreds or thousands of files … | |
Re: [quote] Platform: Windows XP SP1 (WinNT 5.01.2600) MSIE: Internet Explorer v6.00 SP1 (6.00.2800.1106) [/quote] 2 problems there. Both have been updated a lot since and are now at SP2. Then these. [quote] C:\WINDOWS\System32\ndupinwx.exe C:\WINDOWS\System32\dkfqomrq.exe C:\WINDOWS\System32\??chost.exe C:\Program Files\apsi\wtta.exe O2 - BHO: (no name) - {06CBB302-3027-2876-B64E-B7FB3EDC4AF2} - (no file) O2 - BHO: … | |
Re: Which goes to show that Gates is a lot more pragmatic than many people give him credit for :mrgreen: :cheesy: :lol: | |
Re: Of all the people I've worked with over the years very few have a degree in computer sciences or related fields. Most have degrees in physics, mathematics, or chemistry. A few have more esoteric degrees like biology and business economics. The few CS grads I have encountered professionaly have often … | |
Re: I doubt Sun will deprecate Properties. After all, PropertyResourceBundle which is one of the main concrete ResourceBundle children uses it internally :) [code] public class PropertyResourceBundle extends ResourceBundle { /** * Creates a property resource bundle. * @param stream property file to read from. */ public PropertyResourceBundle (InputStream stream) throws … | |
Re: Deittel is not very good, anything from a Microsoft employee specialising on C I mistrust automatically :) The best currently on the market are: Head First Java (Sierra/Bates) and Agile Java (Langr) (which I proofread before it went into print) | |
Re: Your line 14 is illegal there, it can only exist inside a method or an (static) initialiser block. | |
Re: 1) use code tags 2) follow the Sun coding standards, which you can get from Sun. Doing both will make your code a lot easier to read and debug, as it stands I'm not even going to try. | |
Re: Windows reads the time from the system so if one is wrong so is the other. | |
[B]Problem[/B] Due to a rather annoying and very old bug in JTable you will never get a horizontal scrollbar on a JTable even if the table is wider than the JScrollPane you placed it in. According to the bug report this is due to an error in the handling of … | |
Re: Don't shout. Don't claim your problem is more urgent than that of anyone else. Show some effort, don't ask us to do your work for you. And take a long hard look at the Date and Calendar classes, and DateFormat to format the output. Information you can find in the … | |
Re: Another rather annoying issue: When you go to the tutorials section it's impossible to post. You need to first enter an existing tutorial, click on the "click here to comment" link, then click back to the beginning of the tutorials section using the link on top (which is a different … | |
Re: Take a look at URLEncoder. It will encode the URL String into a String you can pass to a URL object. | |
Re: I think mods should have the option to move topics to a place they're more appropriate :) | |
Re: 1) Javamail 2) java.io.File 3) java.io.RandomAccessFile | |
I try to use getClass().getPackage().getName() to get the package name of an object to insert into a log message. Sometimes it works, at other times it throws a NullPointerException. Does anyone have any insight into the conditions under which getPackage() returns null ('cause that's what's happening)? The classes in question … | |
Re: Don't expect people to open attachments. Rather post the relevant sections of your code and the errors you get using the code and quote tags and explain why you can't make sense of those errors (in my experience they're usually a great help to figure out what you did wrong). | |
Re: If you think Java is complicated, try some entry level tutorials first before diving into creating multithreaded networked applications. Sun has some great tutorials, and O'Reilly has their excellent "Head First Java" book to get you up and running. |
The End.