I am trying to transmit objects of a particular class from one server to another.
The options I'm looking at are:
Serialize the data as JSON and send
it over the wire using HTTP, and
de-serialize at the other end.
Serialize the data into some binary form and transmit using TCP
sockets.
What are the best practices in this area? Wha...
I have a requirement where I need to share some web resources (jsp, html, js, images, css etc.) across different Spring based Struts 2 applications. And seems like OSGi can be used to achieve this?
Can some one give some pointers on how to achieve this with OSGi?
And secondly I want to know is OSGi mature enough to be used in producti...
I'm using the code snippet below to create a JFormattedTextField. When entering values via the GUI text field the formatting works as expected. However, when I programmatically set the value the formatting does not occur. How can I force this to occur?
JFormattedTextField myTextField = new JFormattedTextField(new DecimalFormat("#0.###")...
I'm looking for a java library to work with PSD format(Photoshop). Any ideas?
...
I wanted to know what the community considers the "best practices" in respect to mapping class hierarchies with Spring JDBC.
We do not have the ability to use a full fledged ORM tool, however we are using the Spring JDBC to alleviate some of the tedious nature of JDBC. One class which we leverage very regularly are the BeanPropertyRo...
I cut and pasted the following line in to my Firefox url field :
http://www.baidu.com/s?wd=你
This line was generated by my Java program.
The last Chinese char in the Firefox field sometimes became : %C4%E3 [ Correct ]
Other times it became this : %E4%BD%A0 [ Incorrect ]
I tried to cut and paste the url into IE.
In the url field it ...
Hi,
I'm making a program in Java with Sockets. I can send commands to the client and from the client to the server. To read the commands I use a BufferedReader. To write them, a PrintWriter But now I want to transfer a file through that socket (Not simply create a second connection).First I write to the outputstream how many bytes the ...
Hi,
I have a JTextArea in (multiple) JScrollPane in a JTabbedPane.
I need to access the JTextArea. If I didn't have the JScrollPane, I could do:
JTextArea c = (JTextArea)jTabbedPane1.getComponentAt(i);
How would I get it when in a JScrollPane?
Cheers,
Gazler.
...
I am trying to fill a RealVector (from Apache Commons Math) with values. I tried using the class's append method, but that didn't actually add anything. So now I'm using a double[], which works fine, except I don't know in advance how big the array needs to be.
private void runAnalysis() throws IllegalArgumentException, IllegalAccessExc...
Hello,
I need to put versions of my software in my jsp pages. Can I do it trough XML files? Can Subversion record this in files that has been versioned?
thankful
Daniel Alves da Fonseca Maciel
...
I'm getting "abort preclean due to time" when running Concurrent Mark & Sweep in Java 6.
What does it mean? Is the GC really halting in the middle before it did any real work?
...
I turned on Java's GC log options
-XX:+PrintGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
Which print out these messages to standard output (catalina.out):
314.884: [CMS-concurrent-mark-start]
315.014: [CMS-concurrent-mark: 0.129/0.129 secs] [Times: user=0.14 sys=0.00, real=0.13 secs]
315.014: [CMS-concurrent-preclean-start]
315.0...
Original question
I use Launch4j as a wrapper for my Java application under Windows 7, which, to my understanding, in essence forks an instance of javaw.exe that in turn interprets the Java code. As a result, when attempting to pin my application to the task bar, Windows instead pins javaw.exe. Without the required command line, my appl...
I have a Java app which is packaged up using JarBundler. The app is fairly CPU intensive (lots of big Collection.sort() calls).
On Mac OS, the app runs slow and sluggish when using the 64-bit JavaApplicationStub. This JavaApplicationStub file is launching the Java 64-bit VM.
I found an old JavaApplicationStub file which is 32-bit onl...
Hello, I currently have create an application and need some help with writing my javadoc for it.
Here is the code:
import java.lang.*;
import java.util.*;
import java.io.*;
import java.net.*;
/**
*@author Name HERE
*@version 1.0
* The Assignment2App public class represents a menu application that will form
* the base of the other sou...
I've noticed enums introduce many additional class files (Class$1) after compilation bloating the total size. It seems to be attached to every class that even uses an enum, and these are often duplicated.
Why does this occur and is there a way to prevent this without removing the enum.
(Reason for question is space is at a premium for ...
Hi,
what I would like to accomplish is the following:
have autocommit enabled so per default all queries get commited
if there is a @Transactional on a method, it overrides the autocommit and encloses all queries into a single transaction, thus overriding the autocommit
if there is a @Transactional method that calls other @Transaction...
The compiler display warnings if you use Sun's proprietary Java classes. I'm of the opinion that it's generally a bad idea to use these classes. I read this somewhere. However, aside from the warnings are there any fundamental reasons why you should not use them?
...
Java example method:
//Stores the user input into an integer variable called 'choice'
int choice = keyboard.nextInt();
Do I need to write javadoc for a simple method like this or should I only document the main method of any program, if so then what sort of things should I write for the main method?
Thanks,
Chris.
...
I am trying to use a java package from R. Rjava provides a way to call java from R, but wrapping all the methods is impractical. Does anyone know of a script that generates wrappers for a package (say, by processing the relevant javadoc)?
...