# ArcObjects(Java) - register table to geodatabase ESRI 10.3

We are in need of connecting to the Oracle SDE schema for registering Tables to the sde schema using only ArcObjects(Java) is it possible to do that with no dependency. Assume the geodatabase was created from ArcDesktop tool installed on the WIN OS. However our need is to use ArcObjects Java SDK to connect to the sde schema from Linux OS.

## bumped to the homepage by Community♦3 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

• You may take a look at this question: gis.stackexchange.com/questions/208073/… – Schuller Tom Nov 22 '16 at 7:06
• There is no need to connect as the SDE user (and, in fact, it violates several best practices). Please edit the question to clarify what you mean by "no dependency", since obviously there is a huge dependency in the form of ArcObjects Java. – Vince Nov 22 '16 at 12:19

There are a couple of ways to connect to the geodatabase and targeting a specific schema using the SDEWorkspaceFactory class. One can build up a PropertySet of the connection properties or provide a path to an existing SDE connection file using the desired credentials. Both of these methods are described in the link provided by Vince above.

SdeWorkspaceFactory workspaceFactory = new SdeWorkspaceFactory();
IWorkspace workspace = workspaceFactory.openFromFile("C:\Path\to\connection_file.sde", 0);


To register spatial tables as feature classes in a geodatabase, one could use the Geoprocessing package and fire off the Register With Geodatabase geoprocessing tool.

String inputConnString = "C:\\Temp\conn_to_gdb.sde";
String fcName = "MySpatialTable";
String featureClassPath = inputConnString + "\\" + fcName;

ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironment();
ISpatialReference srs = srFactory.createGeographicCoordinateSystem(wkid);

GeoProcessor geoProcessor = new GeoProcessor();

VarArray parameters = new VarArray();