- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
54 Posted Topics
Hello everyone, When using the following source codes to play a local .wav file, I always find .wav files can not played. Does anyone know what is the trouble? [Code] import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.FloatControl; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; public class … | |
Hello everyone, Please look at the following code block, [code] public void Foo() { synchronized (lock) { //do task 1 try { lock.wait(); } catch (InterruptedException e) { // TODO Auto-generated catch lock e.printStackTrace(); } //do task 2 } } [/code] Suppose multiple threads have entered the synchronized block one … | |
Hello everyone, My application needs a feature to detect whether a directed graph contains circle. Does anyone know any efficient implementation? Which implementation is the best (most efficient)? thanks in advance & happy new year, George | |
Hello everyone, Are there any approaches to invoke Java libraries from C/C++? Thanks in advance, George | |
Hello everyone, I am looking for some approaches which can prevent my .class file being decompiled. My questions are, - I have heard that there is an approach called "obfuscated", I am wondering whether it is the best approach which meets my goal. If it is, where is the best … | |
Hello everyone, I am working on a dictionary application implementation. I have question about a string pattern matching algorithm implementation. In this algorithm, * can be used to match any sequence of characters. The input is string s1 and string s2, the algorithm using s2 to match s1, and the … | |
Hello everyone, I am looking for open source message queue implementation in Java. Does anyone know where can I find a 100% pure Java implementation of message queue with basic features? It is better an implementation which does not rely on other components and can be used as a utility … | |
Hello everyone, I have written the folllowing scripts, just want to output "Foo is true." when the property foo is set to true. But when using Eclipse to run the simple script, there are something wrong. Could anyone help to check what is the wrong with my shell scripts? Source … | |
Hello everyone, I want to use javax.comm to do serial cable communication on Linux platform. Currently, I can not find enough learning materials (tutorials and samples) from searching the net. Could anyone help to recommend some good ones? thanks in advance, George | |
Hello everyone, I am wondering if I want to debug JNI application (upper layer Java and lower layer C), are there any tools to debug through Java code to C code and return back from C code to Java code. I am using Eclipse. But I do not find such … | |
Hello everyone, I am using JDBC to compare the content of two database tables -- writing a general function and two tables are input. The two tables have various types of columns, like VARCHAR, BLOB, INT, FLOAT, etc. I want to save my time to write various statements to get … | |
Hello everyone, I am using JDK 1.4 and there is a compiling a 3rd party program error because of un-recognized word @override. Could anyone let me know what is the function of @override and in order to use it, which version of JDK is required? thanks in advance, George | |
Hello everyone, When running my program on Java JVM 5.0, there are strange stack errors. What may be the root cause? (foo.dll is my JNI invoked native library.) -------------------- Registers: EAX=0x0c213e40, EBX=0x00000000, ECX=0x00000000, EDX=0x00000000 ESP=0x0c213e0c, EBP=0x0c213e44, ESI=0x00000000, EDI=0x00000000 EIP=0x0c4e8070, EFLAGS=0x0001024f Top of Stack: (sp=0x0c213e0c) 0x0c213e0c: 00000000 00000000 00000000 0b97aeb0 0x0c213e1c: … | |
Hello everyone, I am wondering what is the differences between Java HotSpot(TM) Client VM and the J2SE VM I downloaded from java.sun.com? Are they the same thing? Why Hotspot VM has client and server version? thanks in advance, George | |
Hello everyone, From the available documents from java.sun.com, I can not find rich information about this option, which is used to tune memory of JVM. Are there any samples/documents of this option, like the meaning/function/best practices of this option. Thanks. regards, George | |
Hello everyone, I am wondeirng how to convert an ObjectInputStream to a byte array, then convert the array back to ObjectInputStream -- should I convert the array back to ObjectOutputStream other than ObjectInputStream? Any sample codes? thanks in advance, George | |
Hello everyone, When reading from a socket, I got error, java.io.StreamCorruptedException unexpected end of block data I only get it very randomly and very hard to reproduce. Does anyone encounter this before, any ideas? Should it be caused by server side (output stream is not flushed)? BTW: I program both … | |
Hello everyone, I want to use JDBC to access DB2 database. I also want to display the content of a specific table (table name is configurable) into web page (just like what is displayed when we use command line "select * from <table name>" on the console). I am wondering … | |
Hello everyone, I am wondering how to transpose a matrix (m * n) with only constant space complexity O (1). (The transpose algorithm should execute/operate on the original matrix.) thanks in advance, George | |
Hello everyone, I have heard that static variable will make the program consume very much memory. It is because garbage collector (GC) will not work on static variable. Is that correct? I am also wondering when does the memory space of a static variable is allocated, during compile or during … | |
Hello everyone, I have always seen some methods are described as "best practice". I am wondering what means "best practice", an algorithm? Thanks in advance, George | |
Hello everyone, I have heard that the search engine of Yahoo is based on open source search technology, is that true? If it is true, what open source search technology is it using? Is Yahoo search engine itself open source? thanks in advance, George | |
Hello everyone, When debugging a C or C++ binary file, the file is different from the release version of binary file (debug version binary file is larger). My question is, if we want to debug a Java binary file (.class file), is the version of file (which we use to … | |
Hello everyone, I want to write an own CVS client in Java. And I am looking for the following materials, - CVS protocol specification - Education materials about CVS protocol - A simple open source CVS client in Java Could anyone help? thanks in advance, George | |
Hello everyone, I am looking for education materials of developing C++ application with Eclipse. Could anyone recommend some good education materials? Thanks in advance, George | |
Hello everyone, When running the following block of source codes (the MMAPI library I am using is downloaded from [url]http://www.sun.com/software/communitysource/j2me/mmapi/[/url]) [Code] public static void main(String[] args) { try { Player player = Manager.createPlayer"http://localhost/sample.wav"); player.start(); } catch (MediaException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } [/Code] java.lang.UnsatisfiedLinkError … | |
Hello everyone, Does anyone know where could I find open source OMA Device Management client? thanks in advance, George | |
Hello everyone, When exceptions occur in constructor so that the instance of the object can not be created, should we throw the exception to the invoker of the constructor or simply catch the exception (and not throw it again)? I think we should not catch the exception (and not throw … | |
Hello everyone, I want to run tasks with priority, i.e. among several simultaneous running tasks, the task with the higher priority will have more chances to occupy CPU time. I have the following 2 issues dealing with the implementation of such feature. - To define each task as a thread … | |
Hello everyone, I want to clone the content of a Hashtable (its keys, its values and its key-value relationship). But I have found that the clone method can not completely clone a Hashtable, as is mentioned in the description of clone method of Java API Specification, Creates a shallow copy … | |
Hello everyone, I am looking for open source gateway written in Java. It is better a light-weighted and easy-to-configure gateway, which could be used in J2EE/J2SE/J2ME applications. Thanks in advance, George | |
Hello everyone, I have heard that there are some offline technologies which can enable users to browse web site in offline mode. It can prefetch some information from the web site (for example, Yahoo map data for some specific cities) when network connection is available. And when in the future … | |
Hello everyone, I am wondering whether Java has asynchronized I/O (whether built-in core Java SDK or 3rd party release), which is similar as select or poll in UNIX. Current read/write will be blocked when underlying stream is not ready. For example, when retrieving data from remote machine, we will be … | |
Hello everyone, I want to print out the string "Hello World!" to console at a random interval, and the average length of the random interval is 1 minute when the string is printed out hundreds of times. Anyone know how to accomplish this? Thanks in advance, George | |
Re: Hello C++, [QUOTE=C++]Hi, I am making a task-manager like program and i wanted to create a pie chart referring to the free/max memory (like the pie chart u see if you right click "My Computer.") Can anybody please tell me how to do this (oh yeah, it's an application, not … | |
Hello everyone, I want to use indexing technology to speed up searching operation of my application. I have found that Java built-in type Hashtable can only have one key for each object. But my requirement is that an object can have multiple keys for an object. For example, the objects … | |
Hello everyone, I am using HTTP protocol to transfer large amount of data across two machines. And I have found out that some packages will be lost when using the following source codes. I am wondering whether there are anything wrong or potential issues in them. Data request [Code] URLConnection … | |
Hello everyone, I am wondering where does the properties retrieved from System.getProperties defined, in some system level environment variables, some files or some other repositories. I am also wondering if I retrieved a specific property from System.getProperties, could I find out where it is defined (system level environment variable, some … | |
Hello everyone, I am wondering how to use java.util.Properties to get the corresponding value of a specific key whose corresponding value is an array, and I am also wondering how to express/format an array in a properties file. For example, I have a key "friends" whose corresponding value is a … | |
Hello everyone, I am looking for peer to peer programming resources (open source projects, tutorials or papers). I am wondering where can I find valuable ones especially Java based technologies. Thanks in advance, George | |
Hello everyone, Suppose I have a method which is a synchronized method (for example, method Foo in the following code block), and in this synchronized method another method which is not synchronized is invoked (for example, method Goo in the following code block). I am wondering when executing in Goo … | |
Hello everyone, I want to know which method owns the lock of a specific object (some of my methods are blocked because they can not achieve the lock of a specific object, and I am wondering which method owns the lock to solve the deadlock issue). Does anyone know how … | |
Hello everyone, I am looking for a light-weighted Web proxy in Java which can enhance the performance of my web server. I want it to be written in Java so that it can be used on any platform. I want to place the Web proxy between a specific Web server … | |
Hello everyone, I am wondering how to remove debug information (for example, System.out or System.err) automatically when I build/compile a Java project? Does Java compiler or build tool has such options when we build/compile a Java application? Thanks in advance, George | |
Hello everyone, I am wondering how to play sound (for example, .wav, .mp3, etc.) on J2ME platform, especially Foundation profile. Can anyone provide any resources? Thanks in advance, George | |
Hello everyone, I have found that class "URLConnection" has methods to establish a connection, for example, method "openConnection" and method "connect". But I have not found any methods of this class which are dealing with disconnect. I am wondering if I use class "URLConnection" to establish an HTTP connection to … | |
Hello all, I am looking for an audio or video Java player which can be used on Foundation of J2ME platform. It is better an open source Java player (but not a must requirement). I am wondering where can I find related sources? regards, George | |
Hello everyone, I have written the following simple program to play a local .wav file. [Code] URL url = null; try { url = new URL("file:/c:/temp/sample.wav"); AudioClip clip = Applet.newAudioClip (url); clip.play(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } [/Code] But when running the program, … | |
Hello everyone, I have a very important thread in my application and I do not want it to be terminated accidently, or in other words, if it is terminated for some reason (for example, be terminated by some unhandled Runtime exceptions), I want it to restart automatically. I am wondering … | |
Hello everyone, I want to load the binary content of a .class file in a dynamic approach. In more detail, I want it to work in the following approach. When given the name of a class, I can retrieve the binary content of the .class file. I have written the … |
The End.