1

I want to run a JavaFX application on replit and the main file there is App.java , I want to properly link the application as there is a module-info.java file also.

My replit directory structure

Can someone edit(or give me some sources from where I can learn) my .replit file such that when I run the application it starts from App.java , module-info.java is also properly linked and the JDK version should be <16.

I tried understanding the .replit file but I can't understand how to edit it.

Here's the code inside file:

.compile = "javac --module-path javafx-sdk-18.0.2/lib --add-modules javafx.controls Main.java"
run = "java --module-path javafx-sdk-18.0.2/lib --add-modules javafx.controls Main"

entrypoint = "Main.java"
hidden = ["**/*.class", "javafx-sdk-18.0.2"]

[unitTest]
language = "java"

[nix]
channel = "stable-22_11"

[debugger]
support = true

[debugger.compile]
command = "javac -classpath .:/run_dir/junit-4.12.jar:target/dependency/* -g -d . $(find . -type f -name '*.java')"

[debugger.interactive]
transport = "localhost:0"
connectTimeout = 60
startCommand = "java-debug"

[debugger.interactive.initializeMessage]
command = "initialize"
type = "request"

[debugger.interactive.initializeMessage.arguments]
adapterID = "cppdbg"
clientID = "replit"
clientName = "replit.com"
columnsStartAt1 = true
linesStartAt1 = true
locale = "en-us"
pathFormat = "path"
supportsInvalidatedEvent = true
supportsProgressReporting = true
supportsRunInTerminalRequest = true
supportsVariablePaging = true
supportsVariableType = true

[debugger.interactive.launchMessage]
command = "launch"
type = "request"

[debugger.interactive.launchMessage.arguments]
classPaths = ["."]
mainClass = "Main"
Snell
  • 89
  • 8
  • You might get some insight by examining the recipes for other IDEs seen [here](https://openjfx.io/openjfx-docs/). – trashgod Apr 30 '23 at 12:16
  • @trashgod all I need to know how to edit `.replit` file as it's storing the configurations. I don't know what all editing is required in that file I'll be really thankful if you can share how to change those configurations accordingly as I mentioned. – Snell Apr 30 '23 at 14:26
  • 2
    maybe try checking out docs for .replit file, it may help configuring, https://docs.replit.com/programming-ide/configuring-repl#replit-reference – Arnav Kumar Apr 30 '23 at 14:50
  • From the replit site: “Write code with Ghostwriter, an AI-powered pair programmer.” -> can your pair not help you with your question? (honest question). – jewelsea Apr 30 '23 at 16:20

1 Answers1

0

Sure, you can make change like so.

run = "java --module-path javafx-sdk-18.0.2/lib --add-modules javafx.controls Main" -> run = "java --module-path javafx-sdk-18.0.2/lib --add-modules javafx.controls App"

Please note Main was updated to App.

keep it real!

user3206627
  • 39
  • 1
  • 6