সহায়তা খুঁজুন

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to open .java file as text in firefox instead of downloading it?

  • 6 উত্তরসমূহ
  • 3 এই সমস্যাটি আছে
  • 2 দেখুন
  • শেষ জবাব দ্বারা stasalcatraz

more options

I trying to view file content in http://jogamp.org/jogl-demos/src/jbullet/src/javabullet/dynamics/ page Which mime type i should write in mimeTypes.rdf to open file internally in firefox instead of downloading it? I've tried those lines, but it does not work:

 <RDF:Description RDF:about="urn:mimetype:handler:text/plain"
                  NC:fileExtensions="java"
                  NC:handleInternal="true"
                  NC:description="исходный код Java"/>

Firefox version 39.0, OS Ubuntu 14.04.02

I trying to view file content in http://jogamp.org/jogl-demos/src/jbullet/src/javabullet/dynamics/ page Which mime type i should write in mimeTypes.rdf to open file internally in firefox instead of downloading it? I've tried those lines, but it does not work: <RDF:Description RDF:about="urn:mimetype:handler:text/plain" NC:fileExtensions="java" NC:handleInternal="true" NC:description="исходный код Java"/> Firefox version 39.0, OS Ubuntu 14.04.02

All Replies (6)

more options

Try this extension:

more options

Extension is perfect, thank you. But is there way to do such things by editing mimeTypes.rdf or another way without extensions?

more options

You can open a file in a Firefox tab via the location/address bar by prefixing the link with the view-source: protocol. So you would have to right-click and use "Copy Link Location" instead of left-clicking the link to copy the link to the clipboard.

more options

Yes, but question is how to make Firefox open text/x-java or another specified mime type internally as plain text.

more options

That is not possible in case the server is sending the file with a MIME type that makes Firefox showing the open with dialog. If you get the dialog then the only way to open the file in Firefox is an extension or using the view-source: protocol. If Firefox was able to open the file then you wouldn't get the open with dialog.

more options

So, mime types 'text/plain' and 'text/html' is hardcoded and I can't tell Firefox to open 'text/x-java' as text? mimeTypes.rdf does not provide that functionality?