Menu

Tree [r35] /
 History

HTTPS access


File Date Author Commit
 bin 2009-11-16 nova20 [r29] Added beansbinding-1.2.1.jar so gui will compile
 graph 2009-12-01 baropue [r35] graph have been changed
 gui 2009-12-01 dbmdb [r34] All new
 record 2009-10-16 nova20 [r24] Oops! Had to fix an issue with package stateme...
 resources 2009-11-16 dbmdb [r28] Added /resources;may hold refs;can be deleted;2...
 Makefile 2009-10-16 nova20 [r23] Making records/README which outlines the use of...
 README 2009-10-16 nova20 [r21] Fixed bugs in my code. Records functionality i...

Read Me

----- UPDATE 10/16/2009 11:48am by Tim -----
The data retrieval/update code is complete!  I've also moved my code
from sqlite/ to record/.  I've also placed a "README" file in there
that explains the functionality of the class... right now it's fairly
sparse, but I'll be working to get that documentation running.

For more info, check out record/README
----- END UPDATE -----
----- UPDATE 10/8/2009 11:49am by Tim -----
I've added a Makefile to the project root to make it easier to compile
stuff.  In order to use it, you have to have GNU make installed (under
Debian or Ubuntu, installing it is as simple as running "sudo apt-get
install make" on the command line).  Here's how to use it:

"make" all by itself compiles java files from graph/, gui/, and sqlite/.

"make sqlite" compiles java files in sqlite/

"make graph" compiles java files in graph/

"make gui" compiles java files inside gui/

You can also pass the package name of an executable to make to run that
package under the JVM.  For example, "make pdp.sqlite.PdpRecordModifier"
will run the package "pdp.sqlite.PdpRecordModifier" (it should print out 
"Hello, World!").
----- END UPDATE -----
----- UPDATE 9/30/2009 11:48am by Tim -----
I've added a sqlite directory and a Test file for sqlite compatability.

The test creates a database, puts data into it, and spits it back out.
To run it (after compiling), try:

java -cp bin/:bin/* pdp.sqlite.Test
----- END UPDATE -----
----- UPDATE 9/29/2009 3:00pm by Tim -----
I've changed a few things here, guys, and I've set up a few simple rules
to keep everything orderly.

Whenever you start writing a .java file, make sure the first line of
your code is "package pdp;".  I've updated existing files to
include this line.  If you have your code in a subdirectory of the root,
append the name of that directory to your package argument, like so:

I put a file named "Epp.java" in the subdirectory "graph", my package
line would be "package pdp.graph;".

It may not seem like much, but when you use packages in conjunction with
the "-d" switch in javac, it keeps your code directories nice and clean.

Also, additional .jar files and java libraries (like the sqlitejdbc jar
file) should go in the ./bin/ directory. That way, they're easy for the
java compiler to find when we use the "-cp" switch to javac.

I've talked about switches and that kind of craziness, and I'd like a
chance to explain that.  When you call javac to compile your code,
you'll want to do so from the project root and use the following command
line:

javac -cp bin/:bin/* -d bin/ [path/to/source.java]

The "-cp bin/:bin/*" tells the compiler to look in the bin folder
(and inside any .jar files in the bin folder) for any libraries or .jar
files it needs, and the "-d bin/" tells the compiler to dump the .class
files into the bin/ folder (creating directories to honor the package
argument).

To run your java code, again from the project root, use this command
line:

java -cp bin/:bin/* [package.path.Classname]

The "-cp bin/:bin/*" tells the vm to look in bin for the executable
.class file, and the "package.path" is the argument applied to the
"package" command in the source file.

Confused yet?  Here's an example.

Let's say I want to write a HelloWorld example.  I'd create
"HelloWorld.java" in the project root and the first line of that file
would be "package pdp;".  I'd write the rest of my code normally and
save the file.  To compile my program, I'd do:

javac -cp $CLASSPATH:bin/ -d bin/ HelloWorld.java

The path to my compiled program would be "bin/pdp/HelloWorld.class".  To
run that program, I'd do:

java -cp $CLASSPATH:bin/ pdp.HelloWorld

I know it's a lot of command-line-fu, but when we're ready for a release
we'll make it all into a .jar file and make it so all the user has to do
is double-click it and it'll do all this good stuff by itself... but
that's down the road.

To alleviate dealing with long command-lines, I'd suggest using shell
files (batch files for windows) or aliases.  If you need help with that,
I'll see what I can do about writing a tutorial or two.

Let me know if you have any questions.

/tim
----- END UPDATE -----