java

JDK = JSE && JDK != JEE?

Please confirm the above statement? I need to know what they are referring to when they mention JDK. ...

Spring form not submitting

I am using Spring SimpleFormController for my forms and for some reason it won't go to the onSubmit method Here's my code: public class CreateProjectController extends SimpleFormController { ProjectDao projectDao; public CreateProjectController() { setCommandClass(Project.class); setCommandName("Project"); setSessionForm...

need to understand Java SE before delving into Java EE?

i want to learn coding web apps with java using glassfish. i have bought a book "Beginning JAVA EE 6 Platform with Glassfish 3 - From Novice to Professional". I wonder if I can jump to this book directly or do I need to read a book about JAVA SE first? I just want to develop web apps and not desktop applications nor browser java applet...

How to properly send data via MINA?

I'm attempting to get started with MINA, and all of the examples seem to have data written to the session, rather than making use of a method that can write the same type of data over and over. I'm trying to make use of org.apache.mina.filter.codec.demux.MessageEncoder / MessageDecoder to encode / decode messages, which will allow me to...

Demystify Wildcard for me..

Why do I get a compile time error on this piece of code? public Interface Location { ....... } Class code... Map<Type, List<? extends Location>> locationsTypeMap = new HashMap<Type, List<? extends Location>>(); /** Code to add elements to the hashMap. */ newLocation = getNewLocation() while(mapHasElements){ Location....

Why can't you assign an int to an Integer in a loop without curly braces?

Possible Duplicate: Why this is not compiling in Java? In java, curly braces are optional for one line for loops, but I've found a case where it isn't allowed. For instance, this code: for(int i = 0; i < 10; i++) Integer a = i; won't compile, but if you add curly braces, like so: for(int i = 0; i < 10; i++){ Integer ...

Static Members Issue - JasperReports for .Net over jni4Net

I'm trying to fill a report with empty datasource like this JasperPrint print = JasperFillManager.fillReport(@"D:\ImagesReport.jasper", null); Usually the program crashes without notice, but I used watch window and found that this is what I get at net.sf.jni4net.jni.JNIEnv.CallStaticObjectMethodPtr(Class clazz, MethodId methodIdNa...

Instance Members Issue - JasperReports for .Net over jni4Net

In JAVA you'd say : JRXhtmlExporter exporter = new JRXhtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); But using jni4Net I cant find setParameter instance method (Note: It's inherited from JRAbstractExporter). I dont...

java class, extending external API functionality

Hello, I have an external API (I can't modify it) with class "A" and local class "B" which overrides methods of "A" and adds an additional function. I need to use one of them according to some parameter "is_A". /------ API (A.java) -----/ package A; public class A { public int pingA( int value ) { return value; } } /------ m...

Linker errors using LuaJava on OSX 10.5

Hi, I'm having a bunch of problems getting this library to work on my OSX installation. In particular, I'd like to use it with a Java 1.6 VM but after I compile it up I get the following: java -cp "luajava-1.1.jar" org.keplerproject.luajava.Console Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/dharabor/src/luajava-...

where do I set the web-service host name for an EJB3 client

Where do I set the web-service host name for an EJB3 client, when the web-service client is injected. ...

URLClassLoader + loadClass + invoke main method on a standalone process? Java

I'm using the following method to invoke a class inside a jar file: invokeClass("path.to.classfile", new String[] {}); public static void invokeClass(String name, String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, MalformedURLException { File f = new File(System.getProperty("user.home") ...

GWT Clone a widget using DOM.clone

I wish to programatically clone a widget. I am able to clone the Element inside the Widget with Dom.clone but I don't seem to be able to create a Widget from this cloned element. Is this possible? //somewhere in onModuleLoad()... Button button = new Button("Original"); RootPanel.get().add(button); //........

what are popular message queue services in Java?

Other than JMS, what other queue based applications/services are popular? Just want to know what is used in the industry, I am learning the basics and want to know what to put on the list. ...

can JGame do fullscreen with dual monitors?

When I run my Java game (based on the JGame framework) in fullscreen mode with dual monitors, it only shows on one. Has anyone worked around this before? ...

Calling sleep on current thread stalls my main GUI

I have one class DataThread inherited from Thread. I am using two DataThread objects ReadThread and WriteThread. I have another thread where Main_GUI is running. Now when I press a button on main_GUI it calls a method x.method1() and then this method uses the WriteThread method WriteThread.sleepForReset(). In public void sleepForReset...

integrate ms access and mysql in java

Hi, I have a problem connecting to MS Access and MySQL using Java. My problem is that I cannot find the driver for MySQL. Here is my code: <%@ page import="java.sql.*" %> <% Connection odbcconn = null; Connection jdbcconn = null; PreparedStatement readsms = null; PreparedStatement updsms = null; ResultSet rsread = nul...

Have multiple submit buttons in a form and determine which was pressed in a controller

In my Spring application, I have a jsp that has a form where I want to have multiple submit buttons that go to the same controller. I need to be able to determine which button was pressed in the controller. The form displays a number of items to the user and they can select one of the items with the only difference being the ID of the ...

what is JAVA_HOME? How does JVM will find the javac path stored in JAVA_HOME?

Hi I like to know what is JAVA_HOME where I set path of javac.exe and java.exe. It is in environment variables. When I compile java prog from command prompt how does JVM will find the javac.exe? ...

Can C++ Application load the .jar File using JNI ?

Hi There, Thanks for having a look at question. I am trying to invoke a java method which is in class files using JNI interface. In turn the called class file should be executing the another .jar file which resides in the same direcotry ? I had hard time acheiving this and I am unsuccessful in executing the .jar file. I mean I am not abl...