This is my first attempt at JNI. My ultimate goal is to get all tasks currently running on a machine, but need to get even a simple example running. I keep getting this error when I try to execute my main program. I have supplied my simple Java main program, the header file generated, and the error.
I do not know what this DLL could be ...
I'd like to do something like:
ArrayList<CustomObject> objects = new ArrayList<CustomObject>();
...
DozerBeanMapper MAPPER = new DozerBeanMapper();
...
ArrayList<NewObject> newObjects = MAPPER.map(objects, ...);
Assuming:
<mapping>
<class-a>com.me.CustomObject</class-a>
<class-b>com.me.NewObject</class-b>
<field>
<...
Hello,
I would like to know how is possible to read a file placed in WEB-INF direct into a variable.
My intent is to load (and process a page) into a var, than save it to a file and besides that, use the same html result to be displayed (like included) directly into another JSP.
is it possible?
...
How can I determine if the OS is little/big endian in Java?
...
Hello!
simonn helped me to code an ordered integer partition function here. He posted two functions: one function simply gives back the count of partitions, the second function gives the partitions as a list.
I've already managed to translate the first function from Java to PHP:
Java version
PHP version
Unfortunately, I can't manag...
What should I name my class that stores costs/prices/amounts of money in CAD/USD as separate longs for dollars and cents? I has "PriceInDollars", but I don't really like that, and I always forget it. Any ideas?
EDIT: Apparently I should use BigDecimal, not reinvent the wheel. I guess I'll just use that. I did learn a lot trying to make ...
I understand that "2.5" is automatically a double, and to make it a float, I need to do "2.5F" (or should the F be lowercase?), and that I should use a float, say, if I had a constant that only ever needed 2 decimal spaces (like "0.08F" for Ontario PST tax), but I'm not sure whether "12" is an int or a long, but I know "12L" is a long, b...
I need to append log4j content to a Swing component (JTextArea or similar). Is there a common way to do this?
...
Is there any way to get a map or other data structure of the local variables in the current scope in on the JVM without using a debugger? That is, to get the locals of the current stack frame?
I know that there are stacktrace objects, but StackTraceElement has no way to get access to any state. It just tells you what method was called ...
Hi,
i'm using java on a big amount of data.
[i try to simplify the problem as much as possible]
Actually i have a small class (Element) containing an int KEY and a double WEIGHT (with getters&setters).
I read a lot of these objects from a file and i have to get the best (most weight) M objects.
Actually i'm using a PriorityQueue wi...
Any re-sources or best-practices for implementing dynamic class re-loading feature into a J2EE WebApp on WebSphere App Server?
The point is I don't want to bring down my web-application while certain classes are updated.
...
I need to have a button whose text is underlined and the only way I could find to do this in Java was to use and tags but when I do this, it causes the button to take up as much room as is left in the JToolBar even though the text is short and it should only take up a small amount of space. Here is how I create the the Button.
...
Curious if anybody has considered using EnumMap in place of Java beans, particularly "value objects" (with no behavior)? To me it seems that one advantage would be that the name of a "property" would be directly accessible from the backing Enum, with no need for reflection, and therefore I'd assume it would be faster.
...
I have some groovy files in Eclipse and my project has the Groovy nature. I don't use the GroovyBuilder (I don't think you need to now. there were problems in the past when java files referenced groovy and vice versa). Sometimes when I run my project I get a "Stubbed Method" error and I need to do a project clean for the groovy files to ...
I currently have a Table [org.eclipse.swt.widgets.Table] with several TableColumns; however, due to UI space restrictions I have a bit of an issue.
Lets say for example I had a table column named "Target User" and this couldn't be named anything else AND the whole display "Target User" had to be displayed. Now lets say I also have sev...
first time use JTree. Just wondering is it possible to have more than one top level TreeNodes?
thanks
...
I have a GLCanvas on which I want to render some text. I'm actually using a 3rd party library that extends GLCanvas and it is doing most of the GL rendering. The 3rd party tool allows you to display images on it, so I've been creating images of the text and displaying it on the GLCanvas.
That works, except the text doesn't really look t...
Do you think you are a java wizard?
That you are well versed in the secrets of the reflection API?
public @interface @a {}
public @interface @b {}
@Mark public @interface @c {}
@Mark public @interface @d {}
public @interface @e {}
public Class C
{
@a @b @c @d @e public void x();
}
public class Solver
{
public Annotation[]...
I need to have a long descriptive dialog in part of my program and it display differently in mac and windows. On the mac in seems to word wraps the text and breaks it down into 3 or 4 lines but on the PC it just creates a really long dialog. Here is some code that shows my problems:
public class Test extends JFrame{
import javax.swin...
I am trying to use the Desktop API to launch the appropriate app for a file. So i am using this :
if (Desktop.isDesktopSupported())
Desktop.getDesktop().open(new File(path));
where "path" is a String pointing to the file.
Everything works fine until i try to launch a jpg that resides at a network location (for instance "\\My...