So, here's my problem:
I have a message driven bean X and would like to make use of Logger in X's onMessage() method. Lets presume that I have a single instance of the bean running in my app server, hence, I would initialize log4j in ejbCreate(). This would mean I would have to do something like this:
public void ejbCreate() {
Pr...
I would like to know the number of built in classes and packages that are available with Java 6.
Please provide me the url from where this information is available.
Thanks
...
I have a java application running on linux machine.
I run the java application using the following
java myapp -Xdebug -Xrunjdwp:server=y, transport=dt_socket,address=4000, suspend=n
I have opened port 4000 for tcp on this linux machine.
I use eclipse from windows xp machine and try to connect to this application.
I have opened the p...
I have a XML structure somewhat like this:
<root>
<a/>
<b/>
<b/>
<a/>
<a/>
</root>
My XSD looks like this:
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element ref="a"/>
<xs:element ref="b"/>
</xs:c...
I think most coders have used code like the following :
ArrayList<String> myStringList = getStringList();
for(String str : myStringList)
{
doSomethingWith(str);
}
How can I take advantage of the for each loop with my own classes? Is there an interface I should be implementing?
...
I’m getting the following error when I start Debug from the Eclipse IDE.
Message: “Failed to connect to remote VM. Connection Refused”
What could be the reason?
...
Hi All,
I work on a large financial system which is hosted on WebSphere and currently has an applet front end.
I am just playing around with Flex for the first time and I am really impressed with the quality of the framework. I am interested to see if there is anyway I can integrate Flex into my J2EE application in a simple type safe ...
I'm having trouble understanding how compilers and linkers work and the files they create. More specifically, how do .cpp, .h, .lib, .dll, .o, .exe all work together? I am mostly interested in C++, but was also wondering about Java and C#. Any books/links would be appreciated!
...
I want to create AES encryption and decryption program in symbian which must be compatible with AES encryption in java
Means if I encrypt the data in Symbian I must be able to decrypt the same in java and vice versa
Thanks
Sunil
...
I am putting together a simple simulated network in java, where i can add computers, servers, and connect two objects with ethernet ports. This is where the null pointer exception is being thrown, when i call "this.etherPort.addElement(t);"
import java.util.Vector;
public class Server extends Computer{
public Vector<E...
Hi all,
I'm a relative newb when it comes to regexes, but i'm starting to get the hang of it. I started writing a method in java to "linkify" a string - that is, scan it for any references of urls (i.e, "http://...") or strings that look like web addresses ("www.example.com...")
So, for example, if I had a string that looked like this...
I have a webapp where users can create their account and use the service. Now I want to give them a custom domain facility where
app.customer1web.com points_to myservice.com with userid customer1
once he sets up the custom domain, for the world it looks like my service is running on his machine.
Many services like blogger, wp.c...
I'm trying to populate a List of beans from a form:
public class Foo {
public String attr1;
public String attr2;
}
public class Bar {
public List<Foo> foos;
}
public class StrutsAction extends Action {
public Bar bar;
}
So in my Struts2 form, what's the best way to populate Foo? Intuitively, I want to do:
<input type="...
I want to display a file tree similarly to java2s.com 'Create a lazy file tree', but include the actual system icons - especially for folders. SWT does not seem to offer this (Program API does not support folders), so I came up with the following:
public Image getImage(File file)
{
ImageIcon systemIcon = (ImageIcon) FileSystemView.g...
we are about to build several UI test with selenium-rc and the java client
the app itself is a classic asp web application that uses integrated security to retrieve the user's permissions from a database, and then, according to those permissions, displays a menu with the appropiate options.
we'd like to automate that test, something li...
I noticed the eclipse indenter has support for the latest version of java, and it would be nice if I could use that class to indent generated java source code. Is there a way of integrating it ?
EDIT: I need to be able to include the code formatter in my code. No external calls.
EDIT2: I've managed to get it working. You can read the s...
I am using GWT, which includes a Java-to-JavaScript compiler. Before this project, targeting the JavaScript runtime from a different language hadn't occurred to me, and I'm enjoying the GWT experience.
A quick search revealed Java2Script as another Java-to-JavaScript solution. Are there any other mature compilers that target the JavaS...
Hi,
that may be a dumb question... but I have a quite large java program that i'm debugging using the old System.err.println method, like I do using print* in any other language...
But after a while, I've so many of them, I don't know how to manage them (and sometimes I put twice the same message concatenated with other information mak...
Hi,
I'm currently working on a tile-based game in Java2D, and I was thinking of adding some cheap eye candy.
For example, implementing a simple particle system (maybe something like this) for explosions and/or smoke.
Do you have any suggestion for relatively easy to program effects that wouldn't require drawing a lot (or at all) of ...
In my domain driven design I have a containing entity, say Car, which has a list of constituent entities, e.g. Wheel.
Now, I want to add a ChangeWheel method to my car entity. Note that changing the wheel does not actually modify the car entity as such. It only affects one of the entites in its wheel collection. I.e. the Car entity h...