Problem about .java file and email

  • Context: Java 
  • Thread starter Thread starter kant
  • Start date Start date
  • Tags Tags
    Email File
Click For Summary

Discussion Overview

The discussion revolves around the challenges of sending a .java file as an email attachment and ensuring that the recipient can open it directly in a Java compiler. Participants explore various methods and technical considerations related to email attachments and file handling.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant expresses a desire for the recipient to automatically invoke their Java compiler upon opening the email attachment, rather than seeing the code in plain text.
  • Another participant suggests that the recipient could copy the code from the email and paste it into a text editor, but notes that the recipient, who is a professor, prefers not to do this.
  • A participant mentions that the webserver might need to be configured with a MIME type for Java files, and that the recipient's web browser may need specific settings to handle Java files correctly.
  • Concerns are raised that some email clients may view the ability to invoke a Java compiler as a security risk, potentially preventing the desired functionality.
  • One participant asserts that the sender cannot control how the recipient opens the .java file, emphasizing that only the recipient can set their preferences.
  • A suggestion is made to send the file as a compiled JAR instead of a .java file.

Areas of Agreement / Disagreement

Participants generally agree that the sender cannot dictate how the recipient handles the .java file, but there are differing opinions on potential solutions and the feasibility of achieving the desired outcome.

Contextual Notes

Limitations include the dependence on the recipient's email client settings, web browser configurations, and security considerations that may restrict the execution of Java files.

Who May Find This Useful

Individuals interested in email file handling, Java programming, and technical communication may find this discussion relevant.

kant
Messages
388
Reaction score
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?
 
Technology news on Phys.org
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.
 
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.
 
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?
 
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
 
Maybe he wants you to send it as a compiled jar?
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 3 ·
Replies
3
Views
7K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 3 ·
Replies
3
Views
15K