Eclipse -> New Project
After creating the project, Eclipse -> New Class
On the left hand side in the Project Explorer (Java Perspective)...
right click on the Project -> New Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE the folder "lib" in your project's folder (already has src , build , WebContent )
COPY any .jar files you will need imported/included into Eclipse\workspace\projectname\lib
ECLIPSE right click and refresh the project, you'll see the lib appear...
THEN Left pane in the Java perspective with the tree with the name of your project (and classes)
Right-click the name of the project -> properties
Java Build Path -> Libraries (tab) -> Add JARs (button) -> Browse (tree view of project dirs)
Select .jar files and click OK
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.jar files that need to be included:
emcesu.jar (depends on the ones below!)
commons-codec-1.3.jar
jdom.jar
log4j-1.2.15.jar
security-1.1.jar
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PREREQUISITE - SETUP AN ATMOS ONLINE ACCOUNT
email@domain.com / password
(port 80)
https://accesspoint.atmosonline.com (port 443)
* default token
: Full Token ID: subtenantid/uid
: Shared Secret: ****
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
import java.io.*;
import java.util.Iterator;
import com.emc.esu.api.EsuApi;
public class Start
{
public static void main( String[] args )
{
EsuApi esuAPI = null;
String HOST="accesspoint.emccis.com";
int PORT=80;
String FULLTOKENID="subtenantid/uid";
String SECRETKEY="****";
displayConnectionCredentials( HOST , PORT , FULLTOKENID, SECRETKEY );
} // end main
private static void displayConnectionCredentials( String HOST , int PORT , String FULLTOKENID , String SECRETKEY )
{
System.out.println( "Connecting to: " + HOST );
System.out.println( "Full token ID: " + FULLTOKENID );
System.out.println( "Secret Key " + SECRETKEY );
}
} // end class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TROUBLESHOOTING
ERROR Caused by: java.lang.ClassNotFoundException: org.jdom.JDOMException
*Means you most likely are referencing objects that you do not have the .jar files...
e.g. "jdom.jar