wood burning stoves 2.0*
The moose likes Cattle Drive and the fly likes Jenny Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Jenny Question" Watch "Jenny Question" New topic
Author

Jenny Question

Jeremy Medford
Ranch Hand

Joined: Jan 16, 2007
Posts: 44
Hi Ya'll,

I have a fairly simple question that may be a little difficult to explain. But I'll give it a try.

When specifying properties for Jenny (The JDBC Facade library), you must specify a Destination and a Package. The descriptions for each are as follows:

Destination:
# Base directory where the generated files will be put.
#
# Everything in this directory will be deleted when Jenny starts. Then the generated facade class and all the
# generated table classes will be created here, in a subdirectory appropriate to the package.
#
# Make sure you include the trailing slash.
#
# This property is required.

Package:
# The package name to use at the top of all the generated files.
#
# This property is required.

When I compile using the following properties I get a strange directory structure:

Destination=src/java/com/javaranch/drive/db/
Package=com.javaranch.drive.db

Resulting directory path:

src\java\com\javaranch\drive\db\com\javaranch\drive\db

Resulting Package description at the top of generated Jenny source files:

package com.javaranch.drive.db;

It appears to be taking the Package and adding that on to the Destination. But the comments state that the Package property is only for the bit of text at the top of the generated files. And of course when I try to compile my java code, I get errors saying 'cannot find symbol' for the classes in that package.

Is there a bug in the Jenny code?

- Jeremy

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

From what I understand of this comment:

Jeremy Medford wrote: The descriptions for each are as follows:

Destination:
# Base directory where the generated files will be put.
#
# Everything in this directory will be deleted when Jenny starts. Then the generated facade class and all the
# generated table classes will be created here, in a subdirectory appropriate to the package.
#

The "Destination" value should not include the package name.

When I compile using the following properties I get a strange directory structure:

Destination=src/java/com/javaranch/drive/db/
Package=com.javaranch.drive.db


The Destination value should be:




[My Blog] [JavaRanch Journal]
Jeremy Medford
Ranch Hand

Joined: Jan 16, 2007
Posts: 44
Ha! That was the trick.
I could have sworn I had done that before and it didn't work.
Well either way, I understand now and am getting the desired results.

Cheers!

Jeremy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jenny Question