java

mssql sever datainsert error

I try this code this is problem to pass value in mssqlserver i pass value one page to another page in hear nrno is value come to other page but hear error is java.sql.SQLException: Invalid column name 'nrno'. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <%@ page imp...

Modify a string in Java bytecode (jar)

I need to modify a connection string that's hard-coded into a Java application (jar without source). I presume it's possible to decompile the jar, then change the source and recompile to a new jar, but is there perhaps a quicker way to do this? EDIT: It's a standalone application, not a jar I'm loading from my own code I doubt it wi...

Remote MYSQL Database Access

Hello Techies, I have developed an application in java that access remote mysql database. While I am running it by netbeans IDE of system which have running that wamp server. But while i try I make connection in another system to remote system database by netbeans it shows following error. Unable to add connection, Cannot establish a c...

DWR + Spring - Multiple ajax filters not working

Hi, Is there a problem defining more than one DWR (v2.0.5) ajax filter in a Spring (v2.5.1) configuration file? For example: <bean id="..." class="..."> <dwr:remote javascript="..."> <dwr:filter class="foo1"/> <dwr:filter class="foo2"/> </dwr:remote> </bean> In my case the only filter getting called is foo2, ...

BarCode Image Generator in Java

How can I create a barcode image in Java? I need something that will allow me to enter a number and produce the corresponding barcode image. Is there a free library available for this type of task? ...

Java based usb application

Hello All, I working on a Java based application which can be carried around by the user in a USB flash Drive. At the startup I want to check for existing JVMs on the machine the USB is plugged-in. How can I achieve it ??? ...

Hibernate One-to-one Mapping with interface.i need advice

hello good people i'm developping an application where all the pojos are exposed as interface but we map the real implementation class.we are using spring and JPA annotation.i'm about to test the one-to-one relationship and i'm having a light problem with the interface. Caused by: org.springframework.beans.factory.BeanCreationExcepti...

Struts2: Radiobutton, Iterations and List trouble

Hi at all... I have a complicated problem and I hope to explain it clearly possible... I have 2 list. On my jsp I have a nested iteration with this 2 lists, inside this there is a tag. This is the code: <s:iterator value="listSurveyToRender" var="s" status="counterS"> <s:iterator value="listSurveyValuesToRender" va...

final methods are inlined?

Are Java final methods automatically inlined? Many books says yes many books says no!!! ...

Java parser for Windows shortcut (.lnk) created by cygwin

Hi all, Following a previous discussion on lnk files parsing in java (http://stackoverflow.com/questions/309495/windows-shortcut-lnk-parser-in-java/1700377), I've tested all solutions proposed and no one works with my lnk files, created by cygwin when I untar an archive containing sym links created on a linux box. I got a java.lang.Arr...

Which library is used to access the Gmail emails using J2ME?

hi guys i want to develop gtalk application for the mobile please tell me the name of library that is used to access the gmail account thr J2ME ...

Why shouly I use Hamcrest-Matcher and assertThat() instead of traditional assertXXX()-Methods

When I look at the examples in the Assert class JavaDoc assertThat("Help! Integers don't work", 0, is(1)); // fails: // failure message: // Help! Integers don't work // expected: is <1> // got value: <0> assertThat("Zero is one", 0, is(not(1))) // passes I dont see a big advantage over, let's say, assertEquals( 0, 1 ). It's nice may...

Eclipse ini file; parameters, meanings and "best-practice" values

Hi all, I wish to fine tune my eclipse.ini file to best suit my system and development environment. http://wiki.eclipse.org/Eclipse.ini is not very helpful. I would like to know for example: Given a processing power of X RAM Memory of size Y and Java version Z; What the values of -Xms & -Xmx should be. Generally speaking, is there a...

Is there an analogue to Java IllegalStateException in Python?

IllegalStateException is often used in Java when a method is invoked on an object in inappropriate state. What would you use instead in Python? ...

WEB based application with desktop integration - technologies?

This is a general question concerning technology decisions for a product development. My aim is to develop a web based remote support (desktop sharing application) with audio and video communication. My ideal solution would be to develop it as web product meaning that the client side always run in the browser. Client technology would ...

Java Library Size

If I'm given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused library affect the application's performance? Does the JVM do lazy loading of classes, does having a larger class library necessarily mean a l...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a global id in the message header so we can trace each message lifecycle through the system. I would like to be able to prepend any log message...

Hibernate/GORM: collection was not processed by flush()

Hi, I have an integration test in my Grails application that fails when I try to save an entity of type Member invitingMember.save(flush: true) This raises the following exception org.hibernate.AssertionFailure: collection [com.mycompany.facet.Facet.channels] was not processed by flush() at com.mycompany.member.MemberConn...

Windows Executable to run Java application deleted by anti virus scanner

I built a Java application that is delivered on USB sticks. To ensure compatibility, I ship an appropriate JVM on the sticks. I made an EXE that simply invokes this JVM with the application jar. Now the problem: some virus scanners act aggressively and just remove the executable! I tried an exe made with a "Batch file to Executable" to...

Why should methods have a single entry and exit points?

Looking around forums and the web, i have come across the advice that a method should have single entry and exit points. My first question is does the sinlge entry point apply to java. I can't see how a method can have an entry point other than invoking it and passing argumnets to it. The second question is that why only a single return...