I have to generate charts on my Web application, and after getting the answer of Is there any free library which can be used to generate Graphs in J2EE environment?, i chose Chart4j for this purpose. The reason behind picking this api over JFreeChart is, its ease of use, and also i am tempted with chartle, which is using Chart4j.
But the...
How do I encrypt/decrypt a string of text using 3DES in java?
...
Hi all,
I want to have a program (might be an idea for simple program), to read metadata from a Mp3 file.
My program should also able to edit these meta data. what can i do?
I got to search out for some open source code. But they have code; but not simplified idea for my job they are going to do.
When i read further i found there ar...
Hi guys,
I'm in a big trouble at moment. I need to configure a cluster cache for my seam application, but i'm having problem beacuse i have 2 entity managers, one for oracle and other one for mysql.
If i remove mysql persistence-unit and entity manager, everything works fine, but when it is active the following error is displayed:
org...
Hi there,
i have asked to create a module that will record video messages form the web browser it self.
what technologies, i should look at. and how should i start. please give me some pointers.
A sample code will be appreciated. :)
...
I have the following:
List<Color> acceptableColors;
Using Spring, would it be best to instantiate this list this way:
<bean>
<list>
<value ref="orange" />
<value ref="yellow" />
....
</list>
</bean>
Or, is there a way to do a register scheme, where we use Spring to perform the following Java code:
ColorRegister...
Hi,
Is there a way in Java, to copy the contents of the clipboard (an image in my case) to the end of a word document?
I want to have a program that will -
* Take a filename (word file) as a parameter
* Whenever this program is run - it will open the word file and paste the contents of the clipboard to the end of the document.
I am d...
I have a mapped entity with a property "latestHistory", which is mapped through a join table, like:
class Record {
@OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE }, fetch = FetchType.LAZY, optional = true)
@JoinTable(name = "latest_history_join_view", joinColumns = { @JoinColumn(name = "record_id")...
I want to create a LinkedHashMap which will limit its size based on available memory (ie. when freeMemory + (maxMemory - allocatedMemory) gets below a certain threshold). This will be used as a form of cache, probably using "least recently used" as a caching strategy.
My concern though is that allocatedMemory also includes (I assume) u...
I am able to have my application upload files via FTP using the FTPClient Java library.
(I happen to be uploading to an Oracle XML DB repository.)
Everything uploads fine unless the xml file has curly quotes in it. In which case I get the error:
LPX-00200: could not convert from encoding UTF-8 to UCS2
I can upload what I believe to b...
Hi folks,
The app I'm working on has 4 tabs, 3 of which share many features, including a navigation bar a the bottom with Back, Edit, and Map buttons. There is exactly the same xml in all 3 layouts, so I'm trying to DRY this out by extracting that xml into a separate component, including it, and then going from there.
Previously I had...
We have a lot of integration tests written using JUnit 3, though we're now running them with 4.4. A few of these have a need for a tearDown method that runs after all the tests in the class are complete (to free some common resources).
I see that this can be done in junit 4 with @AfterClass (org.junit). However, mixing this into exist...
I have two Tomcat servers on my machine that communicate with one another.
1) Can someone recommend on a good (free) network sniffer so I'll be able to monitor the requests/ response that being sent between them?
2) How can I inspect the request in java code? to see what the header and the body consists and their structures?
thanks a...
Hi,
We were connecting to Oracle from our code with a simple (custom) JDBC connector class. This class reads the connection properties from a resource file and tries to make a connection to Oracle (thin connection).
However, recently the database have moved to a RAC and now the application is unable to connect to the DB.
Here is the ...
I have an ANT build script that deploys a WAR folder into my JBOSS deploy directory. Can I convert that into an executable WAR/JAR file and run it as well?
For example if my folder is called: MYAPP.WAR, can I generate: NEWAPP.WAR where NEWAPP.WAR is an executable file. If i just place it in the Jboss directory and start JBOSS will it pi...
I have to write a very large test suite for a complex set of business rules that are currently captured in several tabular forms (e.g., if parameters X Y Z are such and such, the value should be between V1 and V2). Each rule has a name and its own semantics.
My end goal is to have a test suite, organized into sub test suites, with a tes...
I am not sure if we need our own custom browser for this.
If we do, what is your recommendation for open source browser?
We need application that is able to capture location of user clicks on the web page in the browser on Windows machine (cross-platform would be a huge plus). Store the coordinates in the file.
Later be able to open b...
I am trying to have the user input a number, and then that number is used to populate
a text field on a jform. However it keeps giving me errors. If I have the textfield call the str it gives me a numberformatexception, if I have it call the int variable it says it has to be a string...
public static String prePaidstr = "";
public st...
When invoking the 'java' process, I'm almost certain there is a way to have Java expand the contents of a file into a set of additional command-line arguments using the "@" symbol.
Something like:
java @myfile -cp foo -Dbar=baz com.mydomain.MyApp
And then the contents of "myfile" will be used as additional parameters.
It doesn't seem...
I have built a web application that can be seen as an overcomplicated application form. There are bunch of text areas with a given character limit. After the form submission various things happen and one of them is PDF generation.
The text is queried from the DB and inserted in the PDF template created in iReports. This works fine but t...