Are jython & coldfusion compatible? I mean, can I run both at the same time without trashing my server? Are there any overlapping conflictions with java?
What is the difference between Service Provider Interface (SPI) and Application Programming Interface (API)?
More specifically, for Java libraries, what makes them an API and/or SPI?
Hi all, i am currently working on a web application that needs to accept video uploaded by users in any format (.avi, .mov, etc.) and convert them to flv for playing in a flash-based player.
Since the site is OpenCms-based, the best solution would be a ready-made plugin for OpenCms that allowed to upload and play videos doing the transcode operation in background, but just a set of Java classes to do the transcode would be great and then i could make the uploading form and playback part on my own.
I'm having trouble setting the command-line arguments in Eclipse.
I've searched around the Internet but can't find anything that helps people with invisible textboxes. I even tried pressing the help button and nothing came up.
How does one set the command-line arguments in Eclipse for a Java project?
Is there a way (or an editor) that allows me to link an image/files/http links from within a source file (*.java for instance), sort of like a rich text document ?
This way, while reading the code I can quickly look at the appended image (augmenting the comments), instead of opening the browser etc.
I have an array of strings plus one additional string. I want to use this string and values of array to get a set of string. Then I want to order the set of string alphabetically and extract the string which is the first in the list. What is the easiest way to do it in Java?
Is it correct that if we have a BufferedImage object in java, we could potentially write it out in ANY format using ImageIO.write (if we have a Writer object for the same)? I tried writing a BufferedImage object into a jpg file, it outputted an empty image file however when i tried writing it in to a png file, it worked fine.
Hi, how do i order a given set of colors from the rainbow in VIBGYOR order. say i input the seven colors in the following order { red, blue, green, yellow, indigo, violet, orange} and i should print the output as {violet, indigo, blue, green, yellow, orange, red}, irrespective of the order i give the output should be as above. Can someone suggest me about implementing this in java program?
Thanks,
-Vijay
I know that NoSQL databases are very new. I am also new in this point. But exist already tools/libraries to make the life easer like for SQL databases?
I think on tools for managing, maintaining, viewing or reporting of the data. There can also be libraries for easer working with the database or an abstract database layer to change the database later.
I would prefer Java libraries but also other are interesting.
I need to find the value of ncr- the number of ways of selecting r objects out of n.
if i first find the numerator then the denominator. i get an exception.
i am using java.
how to do it for example for 44 C 42
I am having a database in .dbf (FoxPro) format.
How to retrieve data from FoxPro using Java?
If the data can be migrated to MySQL, How to do the conversion?
I'm trying to think up a good hash function for strings. And I was thinking it might be a good idea to sum up the unicode values for the first five characters in the string (assuming it has five, otherwise stop where it ends). Would that be a good idea, or is it a bad one?
I am doing this in Java, but I wouldn't imagine that would make much of a difference.
I am working on a project (Java, Swing) in which i have to pop a frame on clicking a hyperlink. but the coding for the frame and all its components is done in a different class and that hyperlink exists in a different class. what shall i do to pop that frame on clicking of the hyperlink please tell. thanks.
Hi! I am trying to develop a portlet in Liferay that operates on a Bonita workflow, but I keep getting the exception in the title. I am not particularly familiar with the Java world, so I have no idea what to bang my head against :)
A short question: My eclipse project is set to use the "sun-java-6-openjdk"-supplied JDK library, but I cannot Ctrl-click to view source (no source attached), as I can do out-of-the-box on Windows. How do I make this work?
Hi,
I am looking for an open-source iTunes style media player that I can use as a base for functionality I would like to develop. I am quite keen on Flex/Air, or C# or Java will do for languages.
Does anyone know of any projects?
we are trying to re-direct the output of the list to a file using the below cmd(java) in ubuntu,
Pls let us know if this works or not ?
Process p = Runtime.getRuntime().exec("ls -l /home/blah blah/new.txt")
I know this is probably possible using Streams, but I wasn't sure the correct syntax.
I would like to pass a string to the Save method and have it gzip the string and upload it to Amazon S3 without ever being written to disk. The current method inefficiently reads/writes to disk in between.
The S3 PutObjectRequest has a constructor with InputStream input as an option.
import java.io.*;
import java.util.zip.GZIPOutputStream;
import com.amazonaws.auth.PropertiesCredentials;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.model.PutObjectRequest;
public class FileStore {
public static void Save(String data) throws IOException
{
File file = File.createTempFile("filemaster-", ".htm");
file.deleteOnExit();
Writer writer = new OutputStreamWriter(new FileOutputStream(file));
writer.write(data);
writer.flush();
writer.close();
String zippedFilename = gzipFile(file.getAbsolutePath());
File zippedFile = new File(zippedFilename);
zippedFile.deleteOnExit();
AmazonS3 s3 = new AmazonS3Client(new PropertiesCredentials(
new FileInputStream("AwsCredentials.properties")));
String bucketName = "mybucket";
String key = "test/" + zippedFile.getName();
s3.putObject(new PutObjectRequest(bucketName, key, zippedFile));
}
public static String gzipFile(String filename) throws IOException
{
try {
// Create the GZIP output stream
String outFilename = filename + ".gz";
GZIPOutputStream out = new GZIPOutputStream(new FileOutputStream(outFilename));
// Open the input file
FileInputStream in = new FileInputStream(filename);
// Transfer bytes from the input file to the GZIP output stream
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
// Complete the GZIP file
out.finish();
out.close();
return outFilename;
} catch (IOException e) {
throw e;
}
}
}
What is the behaviour of nested transactions.
I am using java + jdbc ?
Eg:
tx1.begin
do stuff1
tx2.begin
do stuff2
tx2.commit
do stuff1.1
tx1.rollback
tx2 is basically inside another function. Will the results from tx2 be persisted ?
In case behaviour is db specific, what is it in case of Sql server 2005 ?
What's the best method for performance testing Flex applications with a BlazeDS/Java severs backend. We're looking at JMeter but can it be used with the amf the protocol at a more sophisticated level where values in a request can be manipulated?
Is it true that the only configuration file I need to bother with is pom.xml ?
It seems to me that Java guys live xml more than any other stuff,is that true?
I'm learning Java for a course this month, and this question is just one I thought of that I'd like to know.
What are the main differences between these two? I know KVM is targeted for mobile devices, correct?
I am trying to do webservice (I am quite new in Webservice under java). I am using netbeans.
Axis2 is having problem trying to locate the the xml configuration file for mybatis
Anyone can tell me how to successfully deploy mybatis configuration. Should I manually copy the configuration under .netbeans\6.8\apache-tomcat-6.0.20_base\webapps\axis2\WEB-INF\classes or there is any other setting?