Skip to content

Commit 03cc9a0

Browse files
committedApr 4, 2018
Detailed set up and build guide
1 parent 9cca9e2 commit 03cc9a0

File tree

3 files changed

+67
-2
lines changed

3 files changed

+67
-2
lines changed
 
Loading
75.9 KB
Loading

‎sqldeveloper/extension/setup.md

+67-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,74 @@
11
# [SQL Developer](http://www.oracle.com/technetwork/developer-tools/sql-developer/) Examples
2-
## Java set up
2+
3+
## First things first: Getting the pieces
4+
5+
### Java JDK 8
6+
We are currently using [jdk1.8.0_152](http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html)
7+
8+
### SQL Developer
9+
You'll need a copy of [SQL Developer](http://www.oracle.com/technetwork/developer-tools/sql-developer/) both as a deployment location for testing and as the source for required library files.
10+
11+
### The Examples
12+
Currently the SQL Developer examples are part of a larger set that must be downloaded together.
13+
14+
1. Go to the main [oracle-db-examples](https://github.com/oracle/oracle-db-examples) page,
15+
2. Select the green Clone or download button,
16+
3. and then the Download ZIP button.
17+
4. unzip the file somewhere (we only really need the sqldeveloper folder)
18+
19+
![get examples image](images/get-examples.png)
20+
21+
### Third party libraries
22+
**If** you plan to build the [Dependency Example](https://github.com/oracle/oracle-db-examples/tree/master/sqldeveloper/extension/java/DependencyExample), you will also need:
23+
* [FXDiagram 0.35.0](http://dl.bintray.com/jankoehnlein/FXDiagram/standalone/:fxdiagram-jars-0.35.0.zip "fxdiagram-jars-0.35.0.zip")
24+
* [KIELER KLay Layouters 0.14.0](http://rtsys.informatik.uni-kiel.de/~kieler/files/release_pragmatics_2015-02/klay/klay_2015-02.jar "klay_2015-02.jar")
25+
26+
### The build environment
27+
sqldeveloper/extension is an eclipse project directory but the examples are built using Apache ant. If you don't know or want to use eclipse, you can [download ant](https://ant.apache.org/bindownload.cgi) and do everything simply from the command line.
28+
29+
30+
## Wiring it together
331
### build.properties
432
* extension/build.properties - Update to point to your SQL Developer installation & optionally change the owner info.
533

6-
You need ant or eclipse (or you get to set it up yourself.)
34+
### Third party libraries
35+
**If/when** you plan to build the [Dependency Example](https://github.com/oracle/oracle-db-examples/tree/master/sqldeveloper/extension/java/DependencyExample), see that page for additional set up requirements.
36+
37+
## Making it go
38+
If you are using eclipse, I'm going to assume you know how to import an existing project and run ant tasks but continue reading to learn about the various ant tasks and how they are used.
39+
40+
If you are using ant from the command line, make sure `ANT_HOME` and `JAVA_HOME` are defined for your environment and that ant is on your `PATH` and accessible from the command line.
41+
42+
### Ant tasks
43+
The [XML Packaged](xml/packaged) example and all of the [Java](java) examples use ant to build and deploy the example. The 'heavy lifting' is all defined in buildtools so the individual build.xml files for each example are pretty simple. There only a few targets of interest:
44+
* `_rebuild` cleans and deploys the example
45+
* `_deploy` builds and deploys the example to the target SQL Developer installation (defined in build.properties). Please remember to exit out of SQL developer before running this so you don't confuse yourself. (Which I have great experience with :/ )
46+
* `_cfu` creates a check for updates bundle and associated metadata xml file in the built/cfu directory for the example.
47+
* `resgen` generates the ResourceBundle java files from the .properties files listed in resfiles.properties. Running this manually - and then refreshing the project - is only "needed" if you are using eclipse and want code completion and the error checker to know about new entries when editing java.
48+
49+
### _deploy Example
50+
```
51+
cd <where you put examples>/sqldeveloper/extension/xml/packaged
52+
ant _deploy
53+
cd <where you put sqldeveloper>/sqldeveloper/bin
54+
sqldeveloper -clean
55+
```
56+
57+
### cfu example
58+
```
59+
cd <where you put examples>/sqldeveloper/extension/xml/packaged
60+
ant _cfu
61+
cd <where you put sqldeveloper>/sqldeveloper/bin
62+
sqldeveloper
63+
```
64+
Navigate to Help->Check for Updates
65+
1. Select Install From Local File(s)
66+
2. Browse to <where you put examples>/sqldeveloper/extension/xml/packaged/built/cfu and select the zip file
67+
3. Select Next, then Finish on the next page
68+
4. Accept SQL developer restart
69+
70+
![cfu-install-local image 1](images/cfu-install-local-1.png)
71+
772

873

974

0 commit comments

Comments
 (0)
Failed to load comments.