How can I read wireless signal strength In C++ and Java ?
Please provide a code snippet, a link to a library, or anything else that might show me how to accomplish this?
I was looking at using iText to create both a pdf and html version of a document with RTF as a possible option. According to this question this is no longer possible with iText. Is there a library that will allow me to create a document in Java and output it as both PDF and HTML? The ability to output RTF would be nice but is not required.
I'm on my way to programming a database application and in our course we are told to implement a library of elements using one of the Java Collections. Each of the elements has a unique ID with which it's supposed to be addressed. Now I am wondering how this can be done.
I though about using a ListArray but this won't work because the only way of addressing List elements is through the index which you can't control.
Do you have some advice for me?
By using java reflection, we can easily know if an object is an array. What's the easiest way to tell if an object is a collection(Set,List,Map,Vector...)?
Is there a way to force classes in Java to have public static final field (through interface or abstract class)? Or at least just a public field?
I need to make sure somehow that a group of classes have
public static final String TYPE = "...";
in them.
Why Javascript is called Javascript (there is no relation between Java and Javascript) why its not called HTMLScript or XMLScript. Any historical reason for this?
I want to add files to java app in android so I'll know their path and can access them.
How can I do it? (It doesn't matter where they will be the most important is that I can access them and I'll know the relative path of the them)
A hypothetical scenario:
I've got a project whose source compliance level is specified to 1.5.
Now I compile this project with two different JDKs: At first with JDK 6 Update 7 and then with JDK 6 Update 20.
Do these two different JDKs produce different Java byte code, although they only differ in their Update version?
Here's an excerpt from Sun's Java tutorials:
A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (discussed in Classes and Inheritance) and a few special classes that "wrap" certain primitive types: Character, Byte, Short, and Integer (discussed in Simple Data Objects ).
There must be a good reason why the long primitive data type is not allowed. Anyone know what it is?
I am in the process of creating a Java app and would like to have a bar
on the bottom of the app, in which I display a text bar and a status (progress) bar.
Only I can't seem to find the control in NetBeans neither do I know the code to create in manually.
Thank you so much for helping!
Paintrick
In Java, the wrapper class Integer has the static method parseInt() which is used like this: Integer.parseInt(). I thought only methods of static classes could be called like this (ie. Class.doMethod()). All non-static classes need objects to be instantiated to use their methods. I checked the API, and apparently Integer is declared as public final Integer - not static. Someone please help me understand this.
here's my problem: I have multiple classes that are part of the same package and they need access to a certain file path
String filePath = "D:/Users/Mine/School/Java/CZ2002_Assignment/src/"
Rather than declaring the same Filepath in every single class, is it possible to simply have a "global" type of variable of this FilePath so that all classes can access it and I only need to declare and update it once.
Thanks
Hi,
I need a Java way to find a running Win process from which I know to name of the executable. I want to look whether it is running right now and I need a way to kill the process if I found it.
Thank you! Greetz, GHad
I have a snippet of code that looks like this:
double ?t = lastPollTime - pollTime;
double a = 1 - Math.exp(-?t / t);
average += a * (x - average);
Just how bad an idea is it to use unicode characters in Java identifiers? Or is this perfectly acceptable?
I want to refer to a static Java variable in my styles.xml, is that possible? Here's a pseudo-xml example:
<style name="Artwork">
<item name="android:background">@drawable/border_{Constants.MY_COLOR}</item>
</style>
I have a java class containing all the columns of a database table as attributes (member variables) and corresponding getters and setters.
I want to have a method in this class called getColumnCount() that returns the number of columns (i.e. the number of attributes in the class)? How would I implement this without hardcoding the number? I am open to critisims on this in general and suggestions. Thanks.
Given:
Object innerProxy = ...
Object proxy = java.lang.reflect.Proxy.
newProxyInstance(Thread.currentThread().getContextClassLoader(),
new Class[]{type},
innerProxy);
How can I extract the innerProxy object from proxy?
I asked a question about Garbage Collection in Java in this topic.
But the answer I got, gave me another question.
Someone mentioned that classes can be collected by the garbage collector to.
Is this true?
And if it is true, how does this work?
Hello Guys,
I had made one Java Swing based application.
On my application,if i click anywhere on the JFrame or anything, then my right click is not working?
i had not set anything like that..then why is not working?
Basically my key board was not working then i try to copy - paste data using mouse then, i came about to know that...my right click is not working on any area of my application...
I need to convert XML data to Java objects. What would be best practice to convert this XML data to object?
Idea is to fetch data via a web service (it doesn't use WSDL, just HTTP GET queries, so I cannot use any framework) and answers are in XML. What would be best practice to handle this situation?
Can you do the following with a Java ResourceBundle?
In the properties file...
example.dynamicresource=You currently have {0} accounts.
At runtime...
int accountAcount = 3;
bundle.get("example.dynamicresource",accountCount,param2,...);
To give a result of
"You currently have 3 accounts."
I need to convert XML data to Java objects. What would be best practise to convert this XML data to object?
Idea is to fetch data via webservice (it doesn't use WSDL, just HTTP GET queris, so I cannot use any framework) and answers are in XML. What would be best practise to handle this situation?
I'm working on an upgrade project and build management is done in Maven 1.0.2. Java version will change to J2SE 5.
Please include in your answer if you have first hand experience on that particular combination (Maven 1.0.2 and J2SE 5)
Thanks
hdk