How to setup Java in Sublime Text 3 - (OS - Windows)

preview_player
Показать описание
This presentation will show you "How to setup Java in sublime Text 3".
Рекомендации по теме
Комментарии
Автор

cheers dude.  have spent 3 days trying to learn java + android studio together (achieved only confusion).  finally got some

lancsFrogger
Автор

THANK YOU SOOOO MUCH. I was looking absolutely everywhere how to compile and run Java from sublime text. This should be documented everywhere.

ucheiam
Автор

This is the only tutorial that worked! I'm still using Windows 7. Thanks you! - Java newbie

karinatan
Автор

Hello man! I am from Brazil and my English is very little, but I like your movie.. You use Clean words, and because this, I do large my brain. Tanks

lucashamilton
Автор

This is a most comprehensive guide to setup Java in Sublime Text 3 ... only the part it is lacking is how to set the path for java on your machine. Because sometimes the very command "java -version" and then the "where java" in the beginning of this guide doesn't work because the path is not set for java which is already installed on the pc. Here is a quick guide for windows which already have installed the jdk.
1. MyComputer>> Properties (you get this option when you right click the MyComputer icon or the ThisPC icon in the navigation bar of windows folder)
2. Go to the option Advanced System Settings
3. then a window pops up... go to the Environmental Variables button at the bottom right
4. Clicking it again opens a new window in which again there are two sections.
5.You need to go to the System variable section. Where there is a New button at the bottom. Click it.
6. Enter JAVA_HOME in the Variable name edit box and path to the Java bin folder in the Variable value (e.g. "C:\Program Files\Java\jdk-11.0.2\bin" in my case). Click OK
7. Then under the same System variable section, scroll to find the path variable. Double click it. and in the Variable value, go to the end of the line and add a semicolon ( ; ) and then add the path for the java bin folder (the same path that you have entered above under JAVA_HOME).
Some experts say that entering the path in both the new Variable JAVA_HOME and under the path variable is not necessary and some even say that you can directly enter the JAVA_HOME reference path under the path variable name as a value. But both of these didn't work for me. and I have to do as I have already said above.
Btw... I thank Mr. Bhagat Singh for his excellent guide to add the java to the popular sublimetext editor.

girishkdesh
Автор

quick guide
1. go to tools >> build system >> new build system
2. paste the code
{
"cmd": ["javac", "$file_name", "&&", "java", "$file_base_name"],
"file_regex": "^[ ]*File \"(...*?)\", line([0-9]*)",
"path": "paste_your_path_here",
"selector": "source.java",
"shell": true
}
3.save it (any name you want)

(edited)
Additional Notes: to check the path of your jdk
open cmd
type this code: where java
copy the path and add "\"
like this C:\\Program Files\\Java\\jdk-9.0.1\\bin\

enjoy coding :)

assasin
Автор

Yes ! Finally work ! I at first couldn't see the right path in my command line, I don't know why but I had just ...

hoaxslip
Автор

I am using Windows 10 64bit. The below solution works for me!!

**Open** the file JavaC.sublime-build and replace all the code in the file with the code below:

{
"cmd": ["javac", "$file_name", "&&", "java", "$file_base_name"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"path": "C:\\Program Files\\Java\\jdk1.8.0_60\\bin\\",
"selector": "source.java",
"shell": true
}
Remember to replace "C:\Program Files\Java\jdk1.6.0\bin\" with the path where you put your jdk. And make sure to change the version of java with your java version

prabhjotbjw
Автор

, omg it actually works unlike all the other bullcrap i have tried today!!
+1 sub for youuuu
thanks

nauicalspeed
Автор

✌ Victory! thank you for the video and the folks who posted follow up comments! It worked after a few tries

AneesahYumn
Автор

File Name: MyJava.Sublime-build

P.S: Don't forget to change your path of 'jdk'

junaidtanoli
Автор

For me it only works for simple programs, but it does not handle imports like e.g., Scanner. When I am prompted to enter values it just like ignores it. Could you please give a larger example? Thanks in advance.

franm.e.
Автор

it works perfectly in Sublime Text 3 Build 3103.

Thanks!!

TheBitles
Автор

sir i am getting an error DOSKEY is not recognised as operable program or batch file

harinath_mishra
Автор

When I compile and run it I don't get my "Hello World" output. It just says "[Finished in 0.6s]" and that's all. No errors. What am I doing wrong?

AG-nozq
Автор

Thank you so much for sharing your video.

danielfuentes
Автор

Thank you very much! Just what I was looking for!

catea
Автор

+Auli Consulting I did all this but the running/compiling rectangle thing does not appear.

Pantano
Автор

i can't find folder bin after i type where java
it only show this


thanks a lot

mfrizqi
Автор

I've always felt like a "void man"...nothing to do about it. Thanks for the video anyway!

sunnyhours
visit shbcf.ru