• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jenny Question

 
Jeremy Medford
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:



 
Jeremy Medford
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic