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?
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 :)
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'm having trouble finding a regular expression that matches the following String.
Korben;http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind?format=xml;1
One problem is escaping the question mark. Java's pattern matcher doesn't seem to accept \? as a valid escape sequence but it also fails to work with the tester at myregexp.com.
Here's what I have so far:
([a-zA-Z0-9])+;http://([a-zA-Z0-9./-]+);[0-9]+
Any suggestions?
Is it possible to upload single files to the Appengine installation instead of the full project every time. This question is related to the Java version of Appengine.
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 Guys
How can I write a java application with Pocket Pc?
could you please suggest me an IDE and JDK for PPC?
Thanks a lot ...
My PPC : Xperia X1
My OS : WindowsMobile 6.1
My Cpu : 528 Mhz
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 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?
I'm trying to optimize the startup time/class loading time of my Java web app because its on the Google App Engine and startup time is important.
Is there a way I can turn on some sort of class loading debug messages or someway to see where time is being spent while class loading? I want to see if any specific libraries take a while to load and then get rid of them if they aren't essential.
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 need to run some method in Swing application in separate thread. What is the difference between using SwingWorker and SwingUtilities.invokeLater. Which one should I use to run a thread in Swing application? I couldn't find exact info in the tutorial at
http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html
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;
}
}
}
Could someone provide an example of how to dynamically create an image in Java, draw lines et cetera on it, and then draw the image so that areas not painted will remain transparent in the drawing process?
After the introduction of Java Memory Model, the Swing guidelines were changed to state that any Swing components need to be instantiated on the EDT in order to avoid non-published instance state.
What I could not find anywhere is whether the classloading is also mandated to be on the EDT or can we pre-load key Swing classes in a background thread? Is there any official statement from Sun/Oracle on this? Are there any classes that are known to hold non-threadsafe static state, hence need to be loaded on EDT?
Hi,
I have a regex like the following:
.{0,1000}(?!(xa7|para(graf))$)
using Java.
I was expecting that it would cause the following text to fail:
blaparagraf
because paragraf is found at the end
I have a small server application I wrote in Java running on my web server. The client application I wrote can connect to the server and it receives data, but the server does not receive any data sent by the client. Any idea what the problem could be? The two communicate fine on my local machine.
Can I bind a table name in a Java Prepared Statement?
i.e.
PreparedStatement pstmt = aConn.prepareStatement("SELECT column FROM ? ");
pstmt.setString(1, "MY_TABLE");
Nope, no I can't. New question, anyone know how to delete a question?
Hello,
I'm using the JMS API to send messages to a Websphere MQ server.
The application that pulls the messages i create want's me to set up the ApplicationID field
in the MQMD structure to constant value.
I could not find a way in the JMS API to access the MQMD structure
The question: Is there a way doing this? if yes then how? If no, then is my only option
is to use the MQ java API, instead of JMS API?
Thanks
Hi everyone,
I would like to know how can I generate a random pre-master key PMK in java? (related in key exchange and authentication)
Is it similar with other randam key generating? What particularly is a pre master key?
Thanks,
Sebby.
Hi, is there something like API built atop the standard ProcessBuilder for calling system programs? I won't argue that scripts can be ported to Java but utilities like arping and netstat are good-to-go in Linux.
In the article Using Java DB in Desktop Applications the Address Book demo have a method disconnect which have a try-catch block that catch and ignores the exception. If you add a printStackTrace you can see that the exception always occur.
What's wrong here? The JavaDB should not throw this exception, or they should fix something in the example program?
hi.
I'm wondering if any of you have some ideas of a small application i can work on , just to get familiar with any of the Ajax Frameworks specially if it's related to Java like JMaki or ECHO 2
thanks .