Using an older jar file with my classes. Suddenly some of my students are getting auto-upgraded to nix environment and projects won’t run. I have been teaching this unit for years. How can I get jar files to work in new environment?
https://replit.com/@P3SILV23/003B-Polygons-CTree-1-NudiaReyes-Vasq#Main.java
If anyone can get this working again, it would be appreciated! Worked perfectly until they were “upgraded”
Yes it does but its a hidden file. To view it press the 3 dots at the top of the file explorer then click Show hidden files
1 Like
So under the new nix environment, I cannot add a jar classpath to the .replit:
run = "javac -cp ./jars/acm.jar: Main.java && java -cp ./jars/acm.jar: Main"
How can I get this jar to work?
This is the new .replit
:
compile = "javac -classpath .:target/dependency/* -d . $(find . -type f -name '*.java')"
run = "javac -cp ./jars/acm.jar: Main.java && java -cp ./jars/acm.jar: Main"
entrypoint = "Main.java"
hidden = ["**/*.class"]
[packager]
language = "java"
[packager.features]
packageSearch = true
[languages.java]
pattern = "**/*.java"
[languages.java.languageServer]
start = ["jdt-language-server"]
[unitTest]
language = "java"
[nix]
channel = "stable-21_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"
https://replit.com/@P3SILV23/003B-Polygons-CTree-1-NudiaReyes-Vasq#Main.java
If anyone can get this working again, it would be appreciated! Worked perfectly until they were “upgraded”
Got it to work! changed compile line in .replit to match run