Hi !

thanks for the tutorial.

I think you can use some shortcut : you drag/drop sources when you could
have done something quicker : declare your project to point to your
source directory, then right-clik on the project, and select "refresh".
Eclipse will map all your files to its internal structure.
Then, you'll have to explain eclipse that the source folder is, say,
src. So right click again on the project name and "new" -> "source
folder".

Your are really true about the fact that eclipse could be very
destructive ! Think about CVSizing your project BEFORE adding it to
eclipse. As Eclipse has a pretty good CVS capability, it will also give
you an oppoturnity to mess with your project with no trouble.

You could explain Eclipse that it must use a JRE for all your projetcs :
windows->preferences->Java->Installed JRE -> set the default JRE that
you need. WARNING : this JRE will the be used by all the projects in
your workspace. I don't know if there is a way to use a specific JRE for
a simple project (I don't think so)

Sorry, I can't answer your question about Javadoc. I'm using Ant to do
it, as it's a kind of packaging task to me.

Le lun 31/05/2004 ` 10:06, Eric Wang a icrit :
> I am a relative newbie in Jess, a total newbie in Eclipse, and a
> newbie in Java.
> Still, programming is programming.  If you're good in any language,
> you're good,
> modulo syntax.
>  
> Here I give a walkthrough for building Jess 6.1p7 using Eclipse.
> You'd need a Jess source license to use this.
> Apologies if this is old hat for the experts out there.  It took me 8
> whole hours
> to figure this stuff out the first day I ever laid my eyes on Eclipse
> :)
>  
> One of my goals is to gain feedback on this process.  If you spot
> anything I'm
> doing wrong, or less effectively than I could, please let me know.
>  
> ===============
> A.  Overview: Config
> ===============
>  
> My current configuration is as follows.
>  
> - Windows XP (also works on 2k)
> - Eclipse 3.0 M9
> - Java 2 SDK 1.4.2_04 (for Eclipse itself, per Eclipse's own
> recommendations)
> - Java 2 SDK 1.5.0 Beta 2 build 51 (what I use for all other dev,
> including Jess)
> - Jess 6.1p7
> - Emacs for Windows 21.3.1 (see section D for my fix for jess-mode.el)
>  
> If you use a different Java compiler or development environment, the
> details will
> differ, but the workflow should be similar.  I am following Ernest to
> the dark side
> of Emacs and Eclipse ^_^
>  
> ===============
> B.  Java and Eclipse
> ===============
>  
> B1.   Install a stable Java 1.4.2_x.  I use the latest Sun release,
> 1.4.2_04.
>         Eclipse recommends that you don't use the 1.5.0 Beta for it
> (yet).
>  
>         (I actually did use Eclipse with 1.5.0 Beta 1 for a month,
> with no
>         problems, but better to be safe.)
>  
> B2.   Install Eclipse 3.0 M9.
>  
> B3.   Make a shortcut to the eclipse.exe executable.
>         Edit its properties, and in its Target field, append the -vm
> arg to specify
>         your pre-1.5.0 Java MV, e.g.
>  
>             "C:\Program Files\Eclipse\eclipse.exe"
>                 -vm "C:\Program Files\Java\j2re1.4.2_04\bin\javaw"
>  
> B4.   Move the shortcut somewhere nice.  I put it in my IE Quick
> Launch bar,
>         which is in C:\Documents and Settings\$Me\Application
> Data\Microsoft\
>         Internet Explorer\Quick Launch\.
>  
> Note that I've already made the decision to use Java 1.5.0 for
> everything else.
> I am happy to be a guinea pig.  (Also, I love how Java 1.5 felt the
> need to add
> generic types, using essentially the same angle-bracket syntax as C++
> templates.
> Some wheels are just too good to not reinvent.)  If you prefer to use
> stable Java,
> just set your  $CLASSPATH and $PATH to point to your #B1, and skip to
> section C.
>  
> B5.   Install Java 1.5.0 Beta 2.
>         Edit your $CLASSPATH and $PATH to point to 1.5.0 only.
>         Then you'll use 1.5.0 for everything ese, but Eclipse will
> still use 1.4.2_04
>         (as long as you always launch it using the shortcut in #B4).
>         My env vars are set to:
>  
> CLASSPATH
> C:\Program
> Files\Java\j2re1.5.0\lib\rt.jar;D:\Develop\Sandia\Jess61p7;.
>  
> PATH
> C:\Program Files\Java\j2re1.5.0\bin;C:\Program
> Files\Java\j2sdk1.5.0\bin 
>  
> ===============
> C.  Eclipse and Jess
> ===============
> Eclipse stores local copies of .java source files in its own
> workspace.
> It can "deliver" its compiled .class files to a different output
> folder.
> (You can see my output folder in my $CLASSPATH variable above.)
>  
> C0.   Eclipse manages a "workspace", which is a hierarchy of projects
>         and files. This is directly mimicked as a file hierarchy on
> your disk.
>         Basically, what you see (in Eclipse) is what you get (in
> Windows
>         Explorer).  File operations done in either domain tend to be
> reflected
>         in the other domain automatically.
>  
>         Let $Eclipse/workspace denote my default Eclipse workspace.
>         (By default, Eclipse will create this in its own installation
> directory,
>         but I pointed mine elsewhere.)
>  
> C1.   In Eclipse, click File | New > Project....
>         Select Java Project.
>  
>     a)  Name it.  I called mine "Jess 61p7 Swing".
>     b)  In "Java Build Path", at the bottom, for "Default output
> folder",
>          click Browse...
>         i)  In "Folder Selection", click your top-level folder, then
> click
>             "Create New Folder..."
>         ii) In "New Folder" | Folder name:, type any name string.
>             I used a convention of mimicking a file path, using
> hyphens
>             instead of backslashes, so D-Develop-Sandia-Jess61p7.
>         iii)  Click "Advanced >>".
>         iv)  Check the "Link to folder in the file system" box.
>         v)  In the text box below the check, enter your output
> directory's
>             path name.  This can point to any folder on any disk,
> regardless
>             of your Eclipse workspace's hierarchy.
>  
> (_)     WARNING: Make sure nothing valuable lives at your output
>          directory path name!  Eclipse will BLOW IT AWAY QUIETLY
>          if it already exists, without prompting or warning.  (Guess
> how I
>          know that ...)
>  
>         vi)  When you return to the "Default output folder" field,
> Eclipse
>              may prepend a front-slash '/' to the front of your output
> path.  I think
>              this messes it up, and causes output to fail.  If it does
> insert a '/',
>              just backspace over it manually.
>  
>         The net result of (b) is that "Default output folder" should
> be:
>  
>             Jess 61p7 Swing/D-Develop-Sandia-Jess61p7
>  
>         modulo your project name and output tag.
>  
>        The net result of #C1 is that Eclipse creates a file hierarchy
> in your
>         workspace with the same name as your project name, e.g.
>  
>             $Eclipse/workspace/Jess 61p7 Swing/
>  
>         with src/ and bin/ subdirs, and some of its own config files.
>  
> C2.   As a result of #C1(b) above, your Eclipse project will no longer
> use its
>         default bin/ folder.  Just delete it.  It's empty.
>  
> C3.   Unzip Jess source to anywhere *except* your intended output
> folder.
>  
> C4.   (optional) I don't bother to add Jess's jess/examples/ folder to
> Eclipse.
>         So I just drag-and-drop it into Jess's examples/ folder, to
> get it out of the
>         way.
>  
>         Then my Jess61p7/jess folder has subdirectories awt/ and
> factory/ only.
>         To this, I add my own swing/ folder, with some Swing listeners
> I wrote.
>  
> C5.   Maneuver your windows so that Explorer and Eclipse are both
> visible.
>         From Windows Explorer, start dragging the Jess61p7/jess
> folder.
>         Drag it into the Eclipse window, and drop it into your new
> Java project
>         folder's src/ subfolder.
>  
>         Eclipse interprets a file-tree drop as "add files".  It
> promptly fresh-copies
>         the entire file tree into that project's src/ folder.  This
> creates a duplicate
>         copy of Jess's jess/ folder tree under
>  
>             $Eclipse/workspace/Jess 61p7 Swing/src/jess/*
>  
>         (Thereafter, Eclipse's copies of these source files are
> disjoint from your
>         #C3 source files.)
>  
> C6.   Eclipse automatically background-compiles Jess, and places the
> .class
>         files into your output folder from #C1(b).
>  
>         I don't know if you need to do anything to prod Eclipse to
> compile.
>         Maybe it does it as soon as you drop files, or you might have
> to open
>         any file in the editor.
>  
>         Compiling all of Jess is blazingly fast.  My new PC does it in
> less than 1
>         minute.  (I can tell because all of the .class files have the
> same timestamp,
>         since Windows timestamps don't show seconds past the minute.)
>  
> C7.   Compiling Jess gives a few Java compilation errors and warnings
> (8 total).
>         This was true for Jess 61p6 using Eclipse 3.0 M8, and it's
> still true
>         for Jess 61p7 using Eclipse 3.0 M9.  (Exactly the same 8
> errors, too.)
>  
>         These appear to be harmless.  I've ignored them for two
> months, and
>         Jess hasn't blown up yet.
>  
> I already had my $CLASSPATH pointing to Eclipse's output directory for
> Jess,
> so Jess is now in business.
>  
> ===============
> D.  Emacs and Jess
> ===============
>  
> I do all of my Jess development work using Emacs and jess-mode.
> In the simple case, M-x run-jess launches a Java VM and loads Jess
> into it.
>  
> I previously used the then-stable build of Emacs for Windows, 20.7.
> Yesterday I upgraded to 21.3.1, which broke `run-jess' with the
> emacs-lisp
> error: "Symbol's value is void".
> I tracked that down to a renamed keymap, caused by the Emacs 21.x
> distribution using a later version of the file
> lisp/emacs-lisp/lisp-mode.el.
>  
> - Emacs 20.7's lisp/emacs-lisp/lisp-mode.el is datestamped 06/28/99.
>   It stores the Lisp keymap in a variable named shared-lisp-mode-map.
>  
> - Emacs 21.3's lisp/emacs-lisp/lisp-mode.el is datestamped 07/03/02.
>   It stores the Lisp keymap in a variable named lisp-mode-shared-map.
>  
> - David E. Young's jess-mode.el hard-coded the name
> shared-lisp-mode-map.
>   This worked for all versions of Emacs up to 20.7.  It breaks in
> 21.3.
>  
> I fixed this by extracting the keymap-lookup knowledge to a separate
> function, jess-get-shared-lisp-map(), which knows how to check both
> variable names.  I call this version 1.3 of jess-mode.  (jess-mode's
> Sourceforge
> project says it's at version 1.2, although its jess-mode.el says 1.1
> from
> 09/14/00.)  I'll forward this to David Young.
>  
> Jess 61p7 now runs fine in Emacs 21.3.1.
>  
> ================
> E.  Newbie Questions
> ================
>  
> [_]  I think I left out the step where you tell Eclipse which JRE to
> use.
>       I don't recall having to tell it to use Java 1.5.0.  Maybe it
> "knew" to do that
>       automatically since it's the only one on my PATH.
>  
> [_]  What is Eclipse's Javadoc build option?
>       Does this build fresh output of Jess's Javadoc files?
>       Or does this let you read Jess's Javadoc files from within
> Eclipse?
>  
> I assume that Charlemagne will comprise one or more Eclipse plugins
> that will
> provide Jess-sensitive knowledge.  Then we'll migrate to doing
> everything
> from within the Eclipse IDE, instead of Emacs.
>  
> [_]  Will Charlemagne add a single-step debugger for Jess functions
> (and/or
>       rules)?  (Does such a debugger exist now?)
> --
> Eric Wang
> CAD Lab, School of Mechanical Engineering, Sungkyunkwan University
> 

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to