Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THE CODE DOESNT GET EXEXUTED #1303

Open
amkma opened this issue Apr 3, 2024 · 13 comments
Open

THE CODE DOESNT GET EXEXUTED #1303

amkma opened this issue Apr 3, 2024 · 13 comments

Comments

@amkma
Copy link

amkma commented Apr 3, 2024

Type: Bug

I HAVE BEEN TRYING TO USE VISUAL STUDIO CODE FOR JAVA FOR COLLEGE AND IT NEVER RUNS. THE TERMINAL THAT IS SUPPOSED TO APPEAR WHEN PRESSING RUN JAVA DOESNT APPEAR, AND WHEN I GO IN( RUN AND DEBUG) TAB IT SAYS THAT THE CODE IS RUNNING WHILE THERE IS NOTHING APPEARING TO ME AND WHEN I PRESS (DEBUG JAVA) THE LITTLE CONTROL PANEL THAT USUALLY APPEARS DOESNT APPEAR UNTIL A WHILE AND I CAN NOT CHOOSE ANYTHING FROM IT EXCEPT RERUN AND STOP RUNNING. IT JUST KEEPS LOADING AND LOADING AND LOADING.
I IMPORTED A PROFILE FROM A FRIEND THAT HAS EVERYTHING WORKING BUT THE ISSUE IS STILL THERE.
I FACTORY RESETED MY WHOLE COMPUTER AND THE ISSUE WASNT SOLVED.
this thing will get me insane.
SORRY FOR MY LOUDNESS BUT I TOOK LIKE MORE THAN 48 HOURS I GUESS FOR LAST TWO WEEKS TRYING TO FIX IT (CODE RUNNER EXTENSION FIXES THE RUN THING BUT NOT THE DEBUG AND IT IS NOT OFFICIAL).

Extension version: 0.25.15
VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.73GB (4.55GB free)
Process Argv --crash-reporter-id b5dbed00-2873-4d13-bcc7-e64fedbc51fe
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627cf:30244335
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
gd77d436:30999572

@jdneo
Copy link
Member

jdneo commented Apr 5, 2024

Could you share your project?

@amkma
Copy link
Author

amkma commented Apr 5, 2024

@amkma
Copy link
Author

amkma commented Apr 10, 2024

can anyone help??

@testforstephen
Copy link
Contributor

Can you try to open the Terminal view manually using the menu "View -> Terminal"?

image

@amkma
Copy link
Author

amkma commented Apr 11, 2024

-.Clipchamp.mp4

still didn't work.

@amkma
Copy link
Author

amkma commented Apr 11, 2024

i make a java project and when i run it, the terminal doesn't appear nor anything but when i go to the "run and debug" icon and make a .json file it says that the code is running and when i spam run java the .java file that I'm running appear more than once in the running list but the code never get executed all in all.

regarding the following problem i want to mention some things

the (lib) folder in the project folder doesn't contain anything
2.the code that I'm trying to run is very simple (sout)
3.i have installed an IDE which is IntelliJ IDEA and everything runs smoothly in it so i suppose the problem is not in the JDK
4.i imported a profile from a friend that has everything working and it didn't solve it
i tried to run a python code on visual studio code and it worked, a simple code which is print as well
Extension version: 0.26.0
VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z)
OS version: Windows_NT x64 10.0.22631

@testforstephen
Copy link
Contributor

No idea what's wrong. Opening terminal behavior is controlled by VS Code, not by Java extension. Java extension is only responsible for generating the command line and provide it to VS Code, it's VS Code that opens a terminal and runs the given command line. You can change the user setting "java.debug.settings.console": "internalConsole", this will use the DEBUG CONSOLE to print the output, but the DEBUG CONSOLE has limitation and doesn't support user input.

@amkma
Copy link
Author

amkma commented Apr 11, 2024

thanks, also update
i tried to run a java code on a windows 10 virtual box but surprisingly, it still didn't work, i don't know what that information will add, i think it is the way of installation but i install it like everybody.

@aeschli
Copy link

aeschli commented Apr 12, 2024

When you launch a program from the Run And Debug View, the output of the program goes to the Debug Console view, not the terminal.
Can you verify this?
See https://code.visualstudio.com/docs/java/java-tutorial#_running-and-debugging-your-program

@amkma
Copy link
Author

amkma commented Apr 12, 2024

it doesn't work not anything work not with debug console nor with terminal...
However, when i open a terminal then type the following:
javac App.java
java App

the code does get executed
but still when i press run java nothing works

@amkma
Copy link
Author

amkma commented Apr 13, 2024

I found the cause,
It is the language of the computer...
Apparently, java pack doesn't function normally when the windows language is in ARABIC (i said java not vs code because it functions normally on python as i said above), i tried it in a virtual box that has an English version of windows 10 set up and the run java worked normally, so you would suggest that all i have to do is just to set the windows language to English, but no that would not solve it because the windows language is in English the problem is that the windows was set up in Arabic then converted to English so the only brutal solution is to factory reset the laptop which i won't be able to do it so if anyone could help after detecting the problem i would appreciate, an update or something that i do would be helpful...

@testforstephen
Copy link
Contributor

Apparently, java pack doesn't function normally when the windows language is in ARABIC

In your previous description, you saided the terminal is not popped up when launching Java app. I don't understand how it's related to the language of your Windows. Could you check the Java logs via "Java: Open All Log Files"?

@amkma
Copy link
Author

amkma commented Apr 17, 2024

it's the numerical system
visual studio code doesn't function properly when the numbers that windows use to operate are eastern Arabic numerals which are the following:
١٢٣٤٥٦٧٨٩٠
but functions normally when it's the western Arabic numerals.
anyways i changed it from region from control panel then open visual studio code then change it back to eastern Arabic numerals and it works.

so, if there would be an update for the extension that runs java that will support the eastern numerals or make vs code works properly on eastern that would be very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants