I need a method that returns an instance of the supplied class type. Let's assume that the supplied types are limited to such that an "empty" instance of them can be created. For instance, supplying String.class would return an empty String, supplying an Integer.class would return an Integer whose initial value is zero, and so on. But ho...
Hi,
I want to match the following: a zero length line, with the match continuing across lines of non-zero length until a particular string is matched in a line. E.g: the match starts with a zero length line and continues until STOP is reached:
Some random text I don't care about
The match starts at the beginning of this line
The match...
I'm running a Weblogic application server, version 10.3. In it i run a couple of enterprise applications.
I suspect a memory leak so i booted up mission control and memleak. The problem is Memleak Tren tab doesn't show any of my own objects only bea, java and sun objects are listed. I sincerely doubt mine occupy less than 0,1% of the he...
Hello,
Tomcat offers a build in "Virtual Hosting" Support: An Engine/Web-Application can be configured to be responsible for a list of Domains. These Domains have to be put into the server.xml/context.xml files with a special xml directive.
=> Is there any possibility to change the Tomcat Configuration (in general) and especially the "...
File file = new File(path);
if (!file.delete())
{
throw new IOException(
"Failed to delete the file because: " +
getReasonForFileDeletionFailureInPlainEnglish(file));
}
Is there a good implementation of getReasonForFileDeletionFailureInPlainEnglish(file) already out there? Or else I'll just have to write it myself.
...
Hi, is there a way to force maven(2.0.9) to include all the dependencies into jar file?
I have a project the builds into a single jar file. I want that the classes from dependencies will be copied as well.
Update: I know that I cant just include a jar file into a jar file. I'm searching for a way to unpack the jars that are specified as ...
I got the impression that if we use persistent fields, there is no need for getter methods since the entity manager references the instance variables directly. However, when I removed the getter and setter methods from an entity to have persistent fields, the values for the corresponding instance variable was not retrieved from the datab...
Does anyone know how to work with the Card Layout in the NetBeans GUI builder tool? I want to show panels as per the JRadioButton selection, so I want to lay this out using the Card Layout.
...
Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading operation of the file.
Thanks.
...
I have a string like:
"This is AA and this is AA and this is AA and this is the END blah blah"
I want to match:
"AA and this is the END"
ie, ending in END, back to the first occurance of AA before END. (Language is Java)
...
By experiment, I find that SpringJunit4ClassRunner treats the context and its beans as 'class scope' in the JUnit sense of scope. It inititializes my beans once for the entire set of tests in the class.
Is there any way to use this mechanism and get these things to be 'test scope'? In short, I wish that the context was being loaded as @...
Hello,
I am trying to get remote debugging working with Java on Solaris OS. Following is what I have tried-
I have a Java class called TestP which has the main method.
When I try
java -classpath . TestP
the program works fine. But when I try adding the debug parameters to the JVM-
java -Xdebug -Xrunjdwp:transport=dt_socket,address=...
Is it possible to get the height of a 'text' field from mysql?
Or the number of linebreaks would also work!
I have a table which fetches the 'text' field from my mysql database.
The background image of the table is sort of a container...
I want the background to change to another (taller) background if the text is vertically high!
Poss...
Hi
I am using Spring and at application-context.xml file; i have definations like :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springfram...
When I start a java application, the Java Console is started. But when I start a java application from Eclipse, the Java Console does not start on its own. How can I make it start also when I run an application from Eclipse?
...
I have an ArrayList and i am trying to display it in a table
.....
ArrayList rows = ....
.....
<table cellspacing="1" cellpadding="4" border="3">
<tr>
<TH>
Heading1
</TH>
<TH>
Heading2
</TH>
<TH>
Heading3
...
Hi,
I'm having a big graph created with jfreechart. This chart is too big for the screen, so I would like to put it in a scrollpane. However, when using the scrollbar, the complete graph is redrawn everytime, which makes it extremely slow. Is there a solution for this?
thanks,
Bart
...
I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the add button, I can see only sub-directories of the plugin project.
So if I want to add same .jar file to more than one plugin project where should I store the .jar files.
...
I want to do something with ehcache in Java that I think should be extremely simple, but I've spent enough time frustrating myself with the docs...
Write a value to a disk persistent cache. Shut down.
Start up again and read that value.
Here is my Java function:
private static void testCacheWrite() {
// create the cache manager fr...
I have the following mapping
@Entity
@SequenceGenerator(name="sacpSequenceGenerator", sequenceName="SACP_SEQ")
public class Sacp {
private Integer id;
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="sacpSequenceGenerator")
public Integer getId() {
return this.id;
}
// other setter's a...