Where can I get an opensource library written in java, especially for imap protocol.
For Example:
there is imaplib in python
likewise is there anything else in
javato replace that "imaplib"
Unfortunately, Java has no syntax for multi-line string literals. No problem if the IDE makes it easy to work with constructs like
String x = "CREATE TABLE TEST ( \n"
+ "A INTEGER NOT NULL PRIMARY KEY, \n"
...
What is the fastest way to paste a multi-line String from the clipboard into Java source using Eclipse (in a way that it automagically creates code like the above).
The database has data in UTC and when I try to get data
java.util.Calendar cal = Calendar.getInstance();
cal.setTimeZone(TimeZone.getTimeZone("UTC"));
java.sql.Timestamp ts = resultSet.getTimestamp(PUBLISH_TIME);
cal.setTime(ts);
Is there anything wrong with this?
Hello there
I'm facing problem with getting start with the Open Social API in java. I already google and bing it but still didn't found a sample to POC the usage of API for console or desktop based application. Can anybody suggest any link, forum or if possible explain the tedious flow of working of this API.
You can try this link to try this API http://code.google.com/p/opensocial-java-client/
Thank You
i have a java program executing 3 separate sqls with a same inline view - it takes about 20 minutes each time to build the inline view when the sqls are executed - is there a way to cache or reuse it ? - trying to avoid temporary table solution because it needs to be delegated to a plsql since the java program does not have rights to create schema objects.
ps: oracle 10g
Is there any java libraries that is similar to unix's command file?
ie:
$ file somepicture.png
somepicture.png PNG image, 805 x 292, 8-bit/color RGB, non-interlaced
The file command is such a nice tool. I need something that can tell me if the file is really what I want it to be. (ie a picture, document etc)
I know I can run the command file, but I am looking for a java library, not running the actual unix command.
I am working on java swing application in which i have to give html files to the client to browse them in swing API.
Now i want to create the setup for the project so that user could install the software on their computer and i want to include html files , java classes some jar files and ms access database also how could i use the path of directory created after the installation of software.
Please suggest the code if possible
We are about to roll out a client server application build with java web start. Our main server is located in a country in Europe and we will have many users downloading our client the first day from all over the world. Since the client application is quite big in MB our wan will be utilized a lot. Is there a way to cache or pre- distribute java web start clients to servers "closer" to the user (for example a local server)?
Thanks.
I need to call an API that's all in java from an existing .NET codebase. What's the best approach here? Writing a webservice in java that basically just forwards the calls to the API - or going with something like JNI4NET?
hi
I have a aggregate column present the microsecond, a report(with jasper) have to show HH:mm:ss of this indicator
What I did is using SEC_TO_TIME(sum(col)/1000) , but when mapping tojava.sql.Time, i doesn't work when the value of hour in result pass over 24(ex:36:33:33)
Then I think another way, not using sec_to_time, just mapping the microsecond as Bigdecimal,
but dunno what java class shoud i use to format date as the default format of hh:mm:ss is limit to 24...?
Some times whenever I restart the application, which is built on
Java
Struts
Mysql and Jboss 4.05 Version
I get the error as Address already in use: JVM_Bind
Only fix that i know is to restart the machine and try again, it will work.
Else Some times I do Ctrl-Alt-Del and Stop all the process related toJava, some times this also works.
But what is the exact reason and how can we prevent this problem ?
I have a rather simple form in JSP that looks like this:
<form action="response.jsp" method="POST">
<label>First Name:</label><input type="text" name="firstName" /><br>
<label>Last Name:</label><input type="text" name="lastName" /><br>
<label>Email:</label><input type="text" name="email" /><br>
<label>Re-enter Email:</label><input type="text" name="emailRe" /><br>
<label>Address:</label><input type="text" name="address" /><br>
<label>Address 2:</label><input type="text" name="address2" /><br>
<label>City:</label><input type="text" name="city" /><br>
<label>Country:</label>
<select name="country">
<option value="0">--Country--</option>
<option value="1">United States</option>
<option value="2">Canada</option>
<option value="3">Mexico</option>
</select><br>
<label>Phone:</label><input type="text" name="phone" /><br>
<label>Alt Phone:</label><input type="text" name="phoneAlt" /><br>
<input type="submit" value="submit" />
</form>
But when I try and access the value of the select box in my Java class I get null. Ive tried reading it in as a String and an Array of strings neither though seems to be grabbing the right value.
The response.jsp looks like this:
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%!
%>
<jsp:useBean id="formHandler" class="validation.RegHandler" scope="request">
<jsp:setProperty name="formHandler" property="*" />
</jsp:useBean>
<%
if (formHandler.validate()) {
%>
<jsp:forward page="success.jsp"/>
<%
}
else
{
%>
<jsp:forward page="retryReg.jsp"/>
<% }
%>
I already have Java script validation in place but I wanted to make sure I covered validation and checking for non-JS users.
The RegHandler just uses the name field to refer to the value in the form.
Any Idea how I could access the select box's value?
Hello everybody..
I have small problem..I created a java App in windows and my .jar consist of whole app..i copied this jar file to mac and executed it from there it works fine..
Java App consists of bonjour code if i execute .jar on windows it works fine and bonjour starts advertising...But,for mac the app runs fine but doesnot advertise the bonjourservice..
I am not understanding the difference..can anyone explain me y it is so?
I have came from another question to this one:
How can one start with Java (JVM) ecosystem? What are beginner, intermediate and advanced knowledge-bases (bags!)? To be honest Java ecosystem was always a bit confusing to me, so it would be very helpful to provide some "reference references" and "defacto tutorials" for learning (curve!) JVM.
I am a C# developer (WPF, Windows Forms, ASP.NET, Web Services, ... like that).
I've tried implementing various methods from around the internet, all seem to be providing the same solution. But it just won't work and I'm unsure why, it creates the file, however, it's blank and if I try loading that file, it has an error.
Main.java contains the code to save and load the file: 190-224.
Rooms.java contains the object.
Code
Any help is greatly appreciated, I've been trying for almost a week now! Thanks in advanced!
I've just inherited a java application that needs to be installed as a service on XP and vista. It's been about 8 years since I've used windows in any form and I've never had to create a service, let alone from something like a java app (I've got a jar for the app and a single dependency jar - log4j). What is the magic necessary to make this run as a service? I've got the source, so code modifications, though preferably avoided, are possible.
Hi All,
I want to import contact list from Yahoo and MSN by giving user name and password in Java.
I can do this with Gmail easily. Can anybody give me code sample in Java for this? Any type of help we be appreciated.
Thanks
I am attempting to convert Java code to Jython and am using the apache Log and LogFactory imports. I am attempting to emulate Foo.class in Jython The chunk of code is as follows:
in Java
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class MyClass {
private static final Log log = LogFactory.getLog(MyClass.class);
public MyClass(Document dom)
{ //code
}
How can I emulate this same behavior of MyClass.class in Jython/Python?
I just read this statement in a java book saying Objects in java reside on a heap.
Is a heap used because it is the best way to store data and retrieve data fast ?
I only have an idea about data structures being a beginner. I mean why not stack or something else ?
i want how to follow the link...
for example the link : http://example.com/hi.php
this will redirect another page to http://example.com/vi.php
then this will redirect another page to http://example.com/ji.html
so i need to get the page link "http://example.com/ji.html"
i think, i cant in java.. so have possible in java curl?
thanks advance
In the Java source from http://download.java.net/jdk6/source/ I get a jar of size ~130mb. The jar don't attach to Eclipse, and inside it has a file called "X_X" of size ~130mb.
Does anyone know what's happening?
what is your java 1.6 favorite feature?
Java 6 has some nifty feature:
SeriveLocator
Support to Scripting language
Acess to Compiler
APT enhancement (Annotation)
And more...
What is the one you like the most, and found it very useful?
Hi Everyone,
I'll be working on a project for instrumenting a relatively complex java application, and I'm planning to use java.lang.instrument to hook into the JVM and redefine classes before they're loaded.
What is your take on this package? Is it well supported across JVMs? Does it work well with Hotspot?
Thanks!
Is there a way to resize a control, a JTextfield for example, at runtime in java? I want my textfield to have the resize cursors (just like when you point your cursor on the corner of a window) and will be able to resize on runtime. Ive read on the internet that vb6 and C# have those capabilities, is there anything for java? A sample code or a link to a good tutorial will be very much appreciated. Thank you.
I am looking for a Java equivalent to .NET's Snippet Compiler. Is there any such utility out there? That or a really light weight Java IDE for Windows? Eclipse and NetBeans seem too heavy-weight to practice basic syntax.