2007/Jun/14

หลังจากทำความรู้จักกับ Java มาได้อาทิตย์นึง วันนี้ระหว่างเรียน OOP เลยคุ้ยๆเล่น ก็เจอ jdk binary ที่ไว้ compile/run ได้อยู่หลายตัว เลยเอามาลองเล่นๆดู

หลักๆก็มีโปรแกรมอยู่สองตัวคือ java.exe กับ javac.exe ตัว java.exe นั่นเอาไว้รัน ส่วน javac.exe เอาไว้ compile วิธีก็ง่ายๆเลยเวลา compile ก็สั่ง javac classname.java ส่วนตอนรันก็สั่ง java classname

วิธีเซ็ทลงใน editplus ก็
  1. Tools > Preferences > User tools
  2. กด Group name แล้วใส่ไรก็ได้
  3. Add Tools >> Program ส่วนช่องข้างล่างกรอก...
    • Menu text: Run Java
    • Command: ใส่ path ไปที่ตัว java.exe ปกติมักจะอยู่ใน C:\Windows\System32\java.exe หรือไม่ก็ใน C:\Program Files\Java\<version>\bin\java.exe ลองหาดูละกัน
    • Argument: $(FileNameNoExt)
    • Initial dir: $(FileDir)
  4. Add Tools >> Program อีกที กรอกตามนี้
    • Menu text: Compile Java
    • Command: ใส่ path ไปที่ตัว javac.exe ซึ่งจะอยู่ใน C:\Program Files\Java\<version>\bin\javac.exe
    • Argument: -verbose "$(FilePath)"
    • Initial dir: $(FileDir)
  5. กด OK มาให้หมดก็ใช้ได้ละ เวลาเขียนๆแล้วจะ compile ก็กด Ctrl+2 ตอนรันก็ Ctrl+1
ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
เอาหนังสือมาปล่อยด้วย อิอิ
#1  by  book At 2007-06-16 20:26, 
เป็นประโยชน์อย่างยิ่ง โอ้ว เก็บไว้ๆๆๆ
#2  by  ch_a_m_p At 2007-06-19 22:07, 
พอดีว่าไม่มี editplus อ่ะ
แล้วจะใช้โปรแกรมไรทำแทนดีอ่ะ Textpad ได้ป่ะ
#3  by  phonclub (203.157.16.245 /203.157.29.159) At 2007-06-25 22:19, 
I want to know How to set up EditPlus text editor for working with Java source files which are in packages. ex: com.xyz.HelloWorld.java
#4  by   (125.17.4.66 /192.168.1.86) At 2007-07-20 19:35, 
ดีดี
#5  by  ณรรจ (203.113.45.100) At 2007-08-08 20:17, 
it not work with my pc, it apear that c:\Program\....not the right command or bad file.
who can fix this problem!!help me !!
#6  by  da (202.137.153.203) At 2007-10-08 16:37, 
sorry, it appear like this "c:\Program\ is not recognized as internal or external command, operable program, or batch file .
Press any key to continue....." in DOS prompt.
How can i fix it?
#7  by  da (202.137.153.203) At 2007-10-08 16:43, 
c:\Program\ is not recognized as internal or external command, operable program, or batch file .
Press any key to continue....." in DOS prompt.

เจอปัญหานี้ทำไง มันไม่สามารถ run dos ได้
#8  by  tk (203.107.158.179) At 2007-12-12 10:04, 
ใครรู้ช่วยบอกที หามานานแล้ว จะขอบพระคุณมากๆ
#9  by   (203.107.158.179) At 2007-12-12 10:06, 

<< Home