java

Please help, my program is not accepting MySQL floats

I have to use a java program . I need to understand it and then modify it. The program has a source folder. It has a lot of java files. the program has a GUI interface. i have imported the program in eclipse and i can run the program. i want to learn and understand the code but since its too big i want to only read the relevant portions ...

rich:menuitem passing parameter

I have menu build on Richfaces using rich:menuitem. I need to determine, which menuitem was clicked by user. I tried to use: <rich:menuItem submitMode="server" value="#{msg.sidemenu_alldocs_internal_documents_bill_sent_documents}" action="#{billdoc.list}"> <f:param name="sidemenutype" value="#{bill_sent}"/> </rich:me...

Call a servlet on click of hyperlink

Hi All, Is there a way to call a Java Servlet on click of hyperlink without using JavaScript? ...

Why array values in java is stored in heap?

Programing languages like C,C++ will not store array values in Heap rather it keeps the value in STACK. But in Java why there is a necessity to keep array values in heap? ...

Why does this Java applet crash and close IE6?

I am using the following Java Applet to get the full file path of a file that is to be uploaded: SVN LittleShoot. The thing is, the applet is initialized and it seems to be running in IE6 - but when I call one of the functions from JavaScript to the applet to open the file dialog box the browser crashes and closes itself just the dialog...

prevent quartz scheduler job to fire immediately

Is there a way to prevent jobs from executing when the it is first registered? I can potentially have 100+ triggers under 1 job and I don't want all the triggers to get executed when the application server is rebooted. We're storing the jobs/triggers in-memory and storing the info in our db. So when the app server is started, we regist...

Requesting HTTPS URL

I am trying to grab some data from Delicious, using URL class, URL url = URL(u); url.openStream(); open stream fails with 401, url i am using is, String("https://" + creds + "@api.del.icio.us/v1/posts/recent"); creds is a base64 encoded string e.g. user:pass encoded, i also tried non encoded form that fails also, can someone tell ...

Using JNA to get/set application identifier

Following up on my previous question concerning the Windows 7 taskbar, I would like to diagnose why Windows isn't acknowledging that my application is independent of javaw.exe. I presently have the following JNA code to obtain the AppUserModelID: public class AppIdTest { public static void main(String[] args) { NativeLibrar...

Why does it throw a NullPointerException?

Hi, I have a database class which has this method and it will be called in the other bean class (when I choose an image)(imagin I work with name and family,... not with id) my method: public static void insertImageToBirthTable(String name, String family, String fatherName, String motherName, String dateOfBirth, String placeOfBirth, Str...

Using a JFrame's focus (being lost) to stop recording a screen cast?

Hello, In my Swing application, I'm using a custom module to record a screen cast. However, I'm a bit hung up on when to force the recording to stop. Right now, I check to see if the user still wishes to record (meaning that they haven't clicked the 'stop' button) and if the application is still open (closing the application causes the...

problem with while loop / java

im doing a program which has two different questions, ohm and ampere to be exact. i know how to make this work but the problem is that in the end one more question should pop up asking " do u want to make a new calculation?" this question should work like if i press "Y" the program should continue from the beginning and if i press "N" t...

Image Recognition for Android/iPhone

I'm looking at developing an app that could benefit from having a image recognition system. I've seen this sort of thing in iPhone and Android apps. Take a picture of a book and the app takes you to Amazon where you can find that book. I'm not looking for general image recognition, but more the ability to pick a single image out of a lib...

Java and crossdomain.xml

Does anyone have any experience with Java pulling data from another domain? Assuming my client has a minimum of 1.6.0_10, how likely is it for it to work. I've seen some posts saying it works, then others saying it doesn't, and still others saying it's broken in the later micro-updates. Any insight would be appreciated. Thanks, -Dan ...

Stateless session bean result caching ?

We're running a Stateless Session Bean to retrieve some data from various locations. What's the best way to achieve caching for this SLSB ? Using interceptors ? Using JBossCache ? We're using JBoss 5.0.1. ...

Websphere Server 5.1.2 Ldap Multiple URLS

I am trying to make some ldap calls in Websphere 5.1.2 (which is an IBM 1.4.2 jvm?) and I'm trying to pass it multiple URLS in the format of "url url url url" etc. Does this build of websphere server/jvm support multiple URLs? Supposedly Sun's build of java 1.4.2 supports urls in this fashion. Is there anyway to do this? ...

Java inherited method question

While studying for the SCJP 6 exam, I ran into this question in a test exam: class A{ private static String staticProperty = " a "; String getStaticProperty() { return staticProperty; } } class B extends A { private static String staticProperty = " b "; public static void main(String[] args){ new ...

OpenRules rules only in a database possible?

I am experimenting with OpenRules and Java and I'd like to store all my rules in a database only. If I understand the documentation correctly, I need to have one "Main.xls" in which to store the environment settings. Now the question: Is there a way to completely circumvent this one physical .xls file? Best case would be, if I could just...

Filling in MBeanParameterInfo

When looking at the MBean for my application in the MBeans tab in JConsole there are submenus for 'Attributes' and 'Operations'. If these tree structures are expanded to their maximum extent and then one of the operations is clicked on, the panel on the right presents three sections: Operation invocation, MBeanOperationInfo and Descript...

SimHash implementation in Java?

Has anyone come across a simhash function implemented in Java? I've already searched for it, but couldn't find anything. ...

How to put "new line" in JSP's Epression Language?

What would be right EL expression in JSP to have a new line or HTML's <br/>? Here's my code that doesn't work and render with '\n' in text. <af:outputText value="#{msg.TCW_SELECT_PART_ANALYSIS}\n#{msg.TCW_SELECT_PART_ANALYSIS2}"/> ...