Skip to main content

Posts

Upload File with Form Data in Java

This is simple Java code to upload file with form data  Jar file Used: Apache Http Client   package com.james.util.file.upload; import java.io.File; import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.entity.mime.content.FileBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; public class FileUpload {             public static void main(String[] args) throws ClientProtocolException, IOException {                  ...
Resetting Panel in Ubuntu joel@joel-desktop:~$ gconftool-2 --shutdown joel@joel-desktop:~$ gconftool --recursive-unset /apps/panel joel@joel-desktop:~$ rm -rf ~/.gconf/apps/panel joel@joel-desktop:~$ pkill gnome-panel joel@joel-desktop:~$

How to Build Ephesoft in Ubuntu

Download Source file from Ephesoft Site using the following URL http://www.ephesoft.com/images/Ephesoft/source-code-release-cummunity.zip Extract to any folder for e.g <home_dir>/source-code-release-community Download Repository bundle from EpheSoft site using the following URL http://www.ephesoft.com/images/Ephesoft/community-repository-maven-dependencies.zip Extract to any folder for example <home_dir>/source-code-release-community/community-repository Now go to maven Installation directory modify settings.xml under MAVEN_HOME/conf by adding these following line <localRepository><home_dir>/source-code-release-community/community-repository</localRepository>. modify pom.xml file under <home_dir>/source-code-release-community/dcma-root/parent comment these Following lines <!-- <repositories> <repository> <snapshots> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy...