Skip to content

CJX CLI can be used to setup your JavaFX development environment using VS Code as your IDE.

License

Notifications You must be signed in to change notification settings

dagimg-dot/cjx-cli-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CJX - CLI for JavaFX

GitHub release (latest by date) GitHub GitHub All Releases GitHub Repo stars

This is cjx cli. It can be used to setup your JavaFX development environment using VS Code as your IDE.

Don't forget to star the project if you like it and find it useful ✌️

Prerequisites

  1. Java 11 or higher
  2. VS Code
  3. VS Code Java Extension Pack
  4. JavaFX SDK
  5. Git
  6. Scene Builder Extenstion for VS Code

JavaFX SDK

  1. After downloading the JavaFX SDK, extract the zip file in a place where you can easily access (C:/ is recommended)
  2. Remember the path of the extracted folder, you will need it later

CJX Installation

  1. Download the latest release from here
    • Download the zip file in the assets section
  2. Extract the zip file
  3. Open the cjx folder inside the extracted folder
  4. Open terminal (command prompt is recommended ) inside the cjx folder and type cjx init to initialize your CJX CLI. You should see the following output:
    • CJX CLI initialized successfully
    • CJX CLI path successfully set to <Your current directory>
    • CJX CLI added to the environment variables successfully
  5. Open a new terminal and type cjx to check if it is installed correctly. If it is installed correctly, you should see the following output: CJX CLI and other paragraph that explains how to use the CLI.
  6. You can type cjx -h to see all the commands available.
  7. Now you can use cjx to setup your JavaFX development environment

Setup your JavaFX development environment

  1. Open terminal from any directory you want.
  2. type cjx setup <JavaSDK Dirercory>
  3. The JavaFX SDK directory is the path of the extracted JavaFX SDK folder you downloaded earlier. You should see the following output: JavaFX SDK path set successfully to <JavaFX SDK Directory>
  4. Now you can use cjx to create a new JavaFX project
  5. Run cjx doctor to check if everything is setup correctly
  6. If there is any error, go back and check if you have done everything correctly

CJX Commands

1. cjx init

This command initializes the CJX CLI. You should run this command only once inside the cjx folder.

2. cjx set-path deprecated

This command sets the path of the CJX CLI. You should run this command only once inside the cjx folder.

3. cjx setup <JavaFX SDK Directory>

This command sets the path of the JavaFX SDK. You should run this command only once.

4. cjx create

This command creates a new JavaFX project. You can use this command to create a new JavaFX project.

1. Simple Project

cjx create simple <Project Name>

2. jfxml Project

cjx create jfxml <Project Name>

5. cjx clone <Project URL>

This command clones a JavaFX project from a git repository and set it up for offline development in your local machine and configures all the needed settings for VS Code.

6. cjx doctor

This command checks if everything is setup correctly. You can use this command to check if everything is setup correctly.

Updating CJX CLI

  1. Open the cjxupdate folder inside the zip file you downloaded
  2. Open command prompt inside the cjxupdate folder
  3. Type cjxupdate -c to check for updates
  4. If there is an update, you will see the following output: A new version is available
  5. Type cjxupdate -u to update the CJX CLI
  6. You can check the version of the CJX CLI by typing cjx -v after the update is complete

Caution: If you are currently using v2.2 or less, you should update to v3.0 manually by downloading v3.0 from the releases page.


Common Errors

Error: cjx is not recognized as an internal or external command

If you face this problem when trying to run the command cjx init inside the folder you extracted the cjx zip file. Try to add the path of the cjx folder to your PATH environment variable. You can follow this tutorial to add the path to your PATH environment variable.

Error: cjx sdk path is not set

If you face this problem when trying to run the command cjx create simple <Project Name> or cjx create jfxml <Project Name>. Try to run the command cjx setup <JavaFX SDK Directory> to set the path of the JavaFX SDK. You can find the JavaFX SDK directory in the Prerequisites section.

About

CJX CLI can be used to setup your JavaFX development environment using VS Code as your IDE.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages