nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

`.jar` file cannot be launched via double click #195

Open celeschai opened 2 months ago

celeschai commented 2 months ago

Hi all, any idea why my code can be run via

java -jar "/Users/celeschai/Library/Mobile Documents/com~apple~CloudDocs/Current Modules/CS2103T/ip/build/libs/bee.jar"

but not via double click of the .jar file...

you can check out my version 2.0 release for the mentioned files! the error that is shown in the terminal is:

TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
zaidansani commented 2 months ago

Works fine for me (tested on Windows). Seems to be a problem unrelated to Java, but CapsLock input?

This video illustrates a similar problem. Seems like a Mac issue?

Could you try double-clicking on it with your CapsLock off?

yisiox commented 2 months ago

Hi @celeschai , I'm from your senior batch. Hazarding a guess since I'm on windows as well: if you're using MacOS, under Preferences > Keyboard > Input Sources, try unchecking "use the caps lock key...". Just realised it coincides with the video @zaidansani linked as well.

NeoHW commented 2 months ago

HI @celeschai, popping in from your senior batch, a quick search on the error reveals the following discussions which might be helpful in finding where to get the suggestions from! Hope it helps! https://stackoverflow.com/questions/67613071/how-do-i-solve-adjustcapslockledforkeytransitionhandling https://stackoverflow.com/questions/68218983/tsm-adjustcapslockledforkeytransitionhandling-issetphysicalkeyboardcapslockle

jinhanfromNUS commented 2 months ago

Hi @celeschai, I am from your senior batch.

I am uncertain if the rule has been changed, but the most correct way to open a jar file (for both individual project and team project) is by running java -jar... in your terminal.

Double clicking the file might lead to unexpected outcome, so try to use the terminal option instead!

Ella-e commented 2 months ago

Hi @celeschai, I am from your senior batch.

I read from this term's website that you can assume people only run the jar file using "java -jar" command. Therefore, it should be okay to not be able to run the jar file by double-clicking. image (Can find it in week 3 - Project tab)

yadobler commented 2 months ago

If you're on linux, you can check your desktop environment's Default Association (xdg-mime). Or use a .desktop file to launch. Honestly in linux, more often than not it will just open a archive extractor (like 7zip) to extract the files.

nus-se-bot commented 2 months ago

@celeschai A gentle reminder to close this issue if the problem has been resolved. If not resolved yet, please post a comment explaining which part of the problem/question remains unresolved.

damithc commented 1 month ago

@celeschai You have not replied to multiple responses others have given here. A thread cannot get resolved if the original poster does not actively engage in the thread. Is this issue resolved? As others have pointed out, there is no need for the jar file to be able run by double-clicking, as the course only requires them to be runnable using the java -jar command.