Skip to content

UsersGuide

Mehdi Mohammadi edited this page Dec 29, 2013 · 1 revision

janett distribution contains janett.exe in Bin directory. The only requirement is .Net framework

Calling janett without any parameters:

> janett.exe

returns list of parameters:

Usage: janett <InputFolder> <OutputFolder> [/Mode|/m <value>] [/Solution|/s <value>] 
[/Package|/p <value>] [/Namespace|/n <value>] [/ReferenceFolder|/r <value>]
[/PreserveChanges|/pres] [/CreateProjects|/proj] [/Diagnostics|/diag]

<InputFolder>               Input folder
<OutputFolder>              Output folder
/Mode <value>               [IKVM](IKVM.html)/DotNet
/Solution <value>           Solution name
/Package <value>            Java package. Flatten directories
/Namespace <value>          namespaces renamed from 'Package' to this
/ReferenceFolder <value>    Where assemblies are referenced (relative)
/PreserveChanges            Preserve changes in re-translation. (default)
/CreateProjects             Create Visual Studio projects. (default)
/Diagnostics                Diagnostics mode.

To start with, pass directory containing .java files:

> janett E:\Workspaces\Classifier

default output will be in E:-DotNet unless you pass output folder:

> janett E:\Workspaces\Classifier E:\Workspaces\NClassifier

Other parameters are named and can be prefixed with / (DOS style) or - (Unix style).
All of them have alternative (shorter) names.
For example passing /Mode, /m, --Mode, and -m have the same meaning.

The most important parameter is Mode (See JanettMode for more information). Currently, value can be DotNet or IKVM

> janett E:\Workspaces\Classifier E:\Workspaces\NClassifier /m [IKVM](IKVM)

If you specify Package parameter janett, will flatten your directory hierarchy (package.sub-package....). For example:

> janett E:\Workspaces\Classifier /p net.sf.classifier4j 

will remove 4J from directories, so 4Jdirectory will be at . It would be standard in .Net and more convenient

If you specify Namespace parameter at the same time, default namespace will be replaced by it. All following sub-packages are capitalized. For example:

> janett E:\Workspaces\Classifier /p net.sf.classifier4j /n NClassifier

will replace net.sf.classifier4J.bayesian with NClassifier.Bayesian

By default, Janett creates Visual Studio solution and projects in output. All files in output folder will be included in default project. The name for default solution and project can be specified as Solution parameter:

> janett E:\Workspaces\Classifier /s NClassifier

You can create multiple projects specially for splitting production classes and test cases with TranslateXml. We recommend to use TranslateXml over passing parameters in command-line You can disable project creation with CreateProjects parameter

> janett E:\Workspaces\Classifier /proj-
Clone this wiki locally