Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Problem about .java file and email

  1. Jul 14, 2006 #1
    I am trying to send a .java file as an attachment in my email. the problem is that when guy who received my email open his email, all he see s is the java code in plan text format. I want the person who received my email to open the attachment, and automatically invoke his java compiler, and my java code in his java compiler screen. what do i need in order to do this?
  2. jcsd
  3. Jul 14, 2006 #2
    You could always have your friend copy the "text" (your code) from the e-mail, and then open the program notepad (or another text editor), paste the text, and then save it as a .java file.
  4. Jul 14, 2006 #3
    this "guy" is actually my professor. He doesn t want to copy and paste, because he said so in class.
  5. Jul 15, 2006 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The webserver might have to be set with a mime type for java.

    In addition, the recipient's webbrowser might have to be configured to handle specific filetypes with specific programs.

    Some email-clients might regard the ability to invoke a java compiler like that as a security violation. (Java programs are more dangerous than java applets.)

    As far as I can tell, there is nothing that you, the sender, can do alone.

    Has your professor been successful with submissions from other students but not from you?
  6. Jul 15, 2006 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    There's no way for YOU, the sender, to mandate that the receiver open your .java file with a Java compiler. Only the RECEIVER can set such preferences.

    - Warren
  7. Jul 15, 2006 #6


    User Avatar
    Science Advisor

    Maybe he wants you to send it as a compiled jar?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook