Results 1 to 5 of 5

Thread: ถามเรื่องการรันโปรแกรมที่เป็น command

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    15


    สังเกตุจากที่ว่า เวลารัน javac.exe มันจะมี command ดำๆขึ้นมาด้วย
    แต่โปรแกรมอย่าง jbuilder หรือ netbeans มันไม่มี
    แต่ผลมันไปขึ้นที่หน้าต่าง output หรืออะไรซักอย่างแทน

    ผมแค่อยากได้วิธีที่รัน โดยไม่แสดง หน้าต่าง command ขึ้นมาน่ะครับ
    ใครเคยทำ หรือพอรู้บ้างครับ

  2. #2


    ลองดูเอกสารประกอบ javac.exe ของ java sun ครับ
    http://java.sun.com/j2se/1.4.2/docs/tooldo...dows/javac.html

    -Xstdout filename
    Send compiler messages to the named file. By default, compiler messages go to System.err. [/b]

  3. #3
    Junior Member
    Join Date
    Feb 2008
    Posts
    15


    ผมหมายถึงในโปรแกรมอื่นด้วยน่ะครับ
    ผมเห็นใน .NET ก็ทำ
    เอา source code ลากไปใส่ใน cl.exe มันก็ขึ้นหน้าจอดำๆมา

    แต่ถ้า build ผ่าน visual studio มันกลับไม่มี ถ้ามันเกี่ยวกับ argument ของ command line
    ก็แปลว่า โปรแกรมอื่นๆไม่สามารถทำวิธีนี้ได้ใช่รึเปล่าครับ

  4. #4
    Jedi Global Moderator Gen0TypE's Avatar
    Join Date
    Jan 2008
    Location
    Khonkaen
    Posts
    312


    ผมว่าถ้า java ทำได้ .net ก็น่าจะทำได้เหมือนกันนะ แต่อาจจะใช้ command line argument ต่างกัน

    แต่ถ้าจะเขียนโปรแกรมใช้เอง ลองดูโปรแกรมตาม link ข้างล่างครับ ไม่แน่ใจว่าใช่ที่้ต้องการรึป่าว แหะๆ :P

    http://www.codeproject.com/KB/threads/redi...59901&fr=51

  5. #5
    Junior Member
    Join Date
    Apr 2009
    Posts
    17


    ผมหมายถึงในโปรแกรมอื่นด้วยน่ะครับ
    ผมเห็นใน .NET ก็ทำ
    เอา source code ลากไปใส่ใน cl.exe มันก็ขึ้นหน้าจอดำๆมา

    แต่ถ้า build ผ่าน visual studio มันกลับไม่มี ถ้ามันเกี่ยวกับ argument ของ command line
    ก็แปลว่า โปรแกรมอื่นๆไม่สามารถทำวิธีนี้ได้ใช่รึเปล่าครับ
    [/b]
    คือเรื่องJava ผมไม่ค่อยรู้นะครับ แต่คาดว่าคงเป็นแบบเดียวกัน แต่ในตระกูล.NET ที่เขียนโดย Visual Studio มันเกี่ยวกับLinker ครับ ตอนที่เลือกสร้างProjectถ้ามันเป็นแบบConsole Linker จะสร้างหน้าจอConsole ให้ตอนทำงาน

    สำหรับถ้าProject ที่ทำการเลือกเป็นConsoleแล้ว อย่างเอา command line ออกทำได้ดังนี้ครับ (ตัวอย่าง C# กะ C++win32 นะ)
    **Hidden Content: To see this hidden content your post count must be 1 or greater.**


Similar Threads

  1. Dos Command
    By codark in forum บทความ คอมพิวเตอร์ ทัวไป
    Replies: 2
    Last Post: 10-10-2007, 10:36 AM
  2. Open Command DOS Here
    By khawtaan in forum Computer Tip & Trick / Tutorial
    Replies: 1
    Last Post: 24-09-2007, 03:22 PM
  3. MS-DOS net command
    By fulloption in forum Computer Tip & Trick / Tutorial
    Replies: 0
    Last Post: 05-09-2007, 03:03 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •