Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: How to compile java code on server side and then send back result to client.

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    11
    My Mood
    Cool
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How to compile java code on server side and then send back result to client.

    I am thinking to build a project for Online Test , in which i'll provide text area and console to candidates with two buttons compile and submit. When user will press compile button the code will be sent to server and compiled there and the result of compilation will be displayed in console area on client side.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    What specific questions do you have about your project?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    11
    My Mood
    Cool
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    Quote Originally Posted by Norm View Post
    What specific questions do you have about your project?
    My question is how compile button will work?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    how compile button will work
    It will send an ActionEvent to an ActionListener when the user presses it.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Nov 2013
    Posts
    11
    My Mood
    Cool
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    Suppose that student is writing code on the editor provided by me, now when he will press compile button at that time i want to copy that code on to text file and then send that file to server.

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    Ok, sending text to a server should be easy. The HTML page should handle that.

    want to copy that code on to text file
    When and where? It would require a privileged app to have code in an html page write a file on a user's disk. That is not a good requirement.
    If you don't understand my answer, don't ignore it, ask a question.

  7. The Following User Says Thank You to Norm For This Useful Post:

    Sahil Arora (November 13th, 2013)

  8. #7
    Junior Member
    Join Date
    Nov 2013
    Posts
    11
    My Mood
    Cool
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    Thanks for replying, i got some solution.

  9. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: How to compile java code on server side and then send back result to client.

    That was quick.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 1
    Last Post: October 7th, 2013, 11:36 AM
  2. Muliple Client Server chat application..how to send message from server..
    By jesroni in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 14th, 2013, 11:17 PM
  3. Replies: 13
    Last Post: August 12th, 2013, 11:20 AM
  4. File transfer from Client to Server side
    By highlander141 in forum Java Networking
    Replies: 1
    Last Post: August 29th, 2012, 08:53 AM
  5. Replies: 0
    Last Post: May 31st, 2012, 05:35 PM