I am writing a Java applet that downloads images from a web server and displays them to the user. It works fine in Java 1.6.0_3 and later, but on older versions it will completely crash the process about once every 20 page views. There are no error messages in the Java console, because the process is completely frozen. I've waited for al...
OK, this is a follow-up question to this one, since I am really confused now.
Suppose I have a one-to-many or many-to-many association between entities Person and Event such that a Person class in Java contains a Set<Event>. (Let's ignore whether Event contains a single Person or a Set<Person>.)
Events are entities stored in a database...
Is it possible to ask for elevated permissions from within a Java Application? Suggestions I've seen seem to all be centered around running an external executable or setting up a manifest to request privileges on launch. These aren't available to, for instance, applets. Is there any way to request elevation from a running application?...
In anyone aware of a tool/script/program/whatever to create a java object instance from a binary java serialized object?
I don't have the .class file, so I can't ( afaik ) simply create an ObjectInputStream and load it from there.
This object has the default serialization mechanism, and I'm trying to debug a problem we have.
Anyone?
...
I have some files stored in a database blob column in Oracle 9.
I would like to have those files stored in the file system.
This should be pretty easy, but I don't find the right snipped.
How can I do this in java?
PreparedStatement ptmst = ...
ResutlSet rs = pstmt.executeQuer();
rs.getBlob();
// mistery
FileOutputStream out...
Hi,
I need your help, and thank you for reading my question!
I am currently writing a java Programm that will use an Direket Form 2 Transposed Filter. I know that the function filter in Matlab will do that just fine, but i have to use Java.
So does anyone know you to implement this Direkt Form 2 Transposed , this Math Function:
y(n) ...
I have to create a special TextFieldUI that draws an image as the background. That image contains some alpha components. However, whenever a character is written in that text field, first it redraws the background and then draws the character. This is fine when the background contains no alpha components, but after a few characters ha...
I'm starting an open source Java project and I need a few bits of advice.
Should I use an IDE such as Netbeans to create the UI (swing) or should I do it by hand. Is there an easy way to do GUI using the Eclipse IDE?
What's a good way to do the file structure? workspace/PROJECT/? Like where should I place the main class?
...
I'm using JMX to build a custom tool for monitoring remote Coherence clusters at work. I'm able to connect just fine and query MBeans directly, and I've acquired nearly all the information I need. However, I've run into a snag when trying to query MBeans for specific caches within a cluster, which is where I can find stats about total nu...
Question:
Why is my C++ swigged object losing its type when passed to a Java callback function?
Setup:
I've taken the Swig Java example for doing callbacks and added an object to be passed to the callback run(Parent p). The callback works as expected but when I pass a Child object the Java seems to lose its type and think its of type Pa...
Hi, I'm both learning to use the JPDA on Netbeans and solving the Prime Generator problem of Sphere's Online Judge.
I've been reading this tutorial on netbeans.org about he JPDA, but haven't found it of much help.
This code, which is based on a Sieve of Eratostenes implementation provided by starblue here, is running like this:
2
1...
In Java, I'm using the String split method to split a string containing values separated by semicolons.
Currently, I have the following line that works in 99% of all cases.
String[] fields = optionsTxt.split(";");
However, the requirement has been added to include escaped semicolons as part of the string. So, the following strings sh...
I am new to Java, and when I started my development, my friends recommended Maven for project management. I almost immediately realized that it is an indispensable tool, and at that time I was thinking that all programmers use it. But when I see statistics on the NetBeans site, I was in shock: 67% of developers are not using Maven. Why? ...
Hi all,
I would like to create JComboBox control similar with the URL textbox of Firefox. Does anyone know how to customize the textfield of the JComboBox. I want to add some icons on the ALIGN.HORIZONTAL_RIGHT near the arrow button of the JComboBox
Thanks,
Minh
...
I have some experience using parallel extensions in .Net development, but I was looking at doing some work in Java that would benefit from an easy to use parallelism library. Does the JVM offer any comparable tools to parallel-extensions?
...
i want a thread to start automaticalyy when my application on tmocat is started.
How do i do that.Do i have to add something to web.xml??
...
Here's the class
package db;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Oshadha Gunawardena
*/
public class DBFacade {
pri...
Hello,
I have an URLClassLoader named "MyClassLoader" set up with some jars on it.
If I try
MyClassLoader.loadClass("MyClass");
it works.
If I try
Thread.currentThread().setContextClassLoader(MyClassLoader);
Thread.currentThread().getContextClassLoader().loadClass("MyClass");
it also works.
But If I try
Thread.currentThread().s...
Where can I get the JavaFx Authoring tool?
...
I am currently working on a web app using Wicket and started using jQuery core (UI also) in it today. I ran into an issue I troubleshooted as a jQuery function (show(), slideDown()) colliding with some of the javascript Wicket auto-generated for an external form link.
Before I get deeper into this project I am wondering if anyone has ha...