Problem about .java file and email

  • Thread starter kant
  • Start date
  • #1
388
0
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?
 

Answers and Replies

  • #2
1,090
6
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.
 
  • #3
388
0
mattmns said:
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.

this "guy" is actually my professor. He doesn t want to copy and paste, because he said so in class.
 
  • #4
robphy
Science Advisor
Homework Helper
Insights Author
Gold Member
6,063
1,366
kant said:
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?

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.

kant said:
this "guy" is actually my professor. He doesn t want to copy and paste, because he said so in class.
Has your professor been successful with submissions from other students but not from you?
 
  • #5
chroot
Staff Emeritus
Science Advisor
Gold Member
10,239
39
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
 
  • #6
0rthodontist
Science Advisor
1,230
0
Maybe he wants you to send it as a compiled jar?
 

Related Threads on Problem about .java file and email

  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
9
Views
8K
  • Last Post
Replies
3
Views
2K
Replies
3
Views
1K
  • Last Post
Replies
3
Views
6K
  • Last Post
Replies
8
Views
3K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
20
Views
4K
Top