Post

Replies

Boosts

Views

Activity

Xcode set run to run java but java said can't find java
I wan't to use Java in Xcode the class file is Main.class. So I set scheme -> run to a script like this: #!/bin/sh java -cp $(dirname $0) Main But when I run it, java said : Error: Could not find or load main class Main Caused by: java.lang.ClassNotFoundException: Main How can I fix this problem? And: It's really helpful to answer in Chinese if you know it.
1
0
516
May ’24
macOS look in /usr/local/Cellar/python*/*/ for Python.app, Python Launcher 3.app, IDLE 3.app
This is two vidoes of my experiment. 1 https://www.icloud.com/iclouddrive/07ej0mpZrbSNBOs19Oe2aBJdA#1 2 https://www.icloud.com/iclouddrive/0374kZzcwF769LtxzsSCfkl8A#2 Havn't test on Apple Silicon Macs
Replies
1
Boosts
0
Views
348
Activity
Sep ’24
Xcode set run to run java but java said can't find java
I wan't to use Java in Xcode the class file is Main.class. So I set scheme -> run to a script like this: #!/bin/sh java -cp $(dirname $0) Main But when I run it, java said : Error: Could not find or load main class Main Caused by: java.lang.ClassNotFoundException: Main How can I fix this problem? And: It's really helpful to answer in Chinese if you know it.
Replies
1
Boosts
0
Views
516
Activity
May ’24