You are here

Firefox Portable and Java Portable

36 posts / 0 new
Last post
Mets
Offline
Last seen: 14 years 11 months ago
Joined: 2009-12-18 14:43
Firefox Portable and Java Portable

How do I get Firefox Portable working with Java Portable? The upcoming version of Firefox, 3.6, will only support Java 6 Update 10 and upwards. I installed Java Portable, which is supposed to be Java 6 Update 17, to X:\portableapps\CommonFiles\Java as requested. My Firefox is installed to X:\portableapps\browser. When I load Firefox 3.6 Beta 4, it does not see Java Portable....

computerfreaker
computerfreaker's picture
Offline
Last seen: 13 years 3 months ago
Developer
Joined: 2009-08-11 11:24
I don't think Firefox

I don't think Firefox supports Java portable, and I'm pretty sure it can't (legally) support it... sorry. Sad

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
yes

Unfortunately, Firefox looks in the registry to see if java is available and the portable java (naturally) isnt listed there.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

sourcenetitalia
sourcenetitalia's picture
Offline
Last seen: 14 years 1 month ago
Joined: 2010-11-01 09:20
Firefox supports MOZ_PLUGIN_PATH environment variable

Firefox (both installed version and portable version) may use the environment variable "MOZ_PLUGIN_PATH" to search for plugins, so you can:
1) create a new environment variable in your OS using the above-mentioned name and put as value [current plugins folder];[portable java plugins folder]
2) simply create a batch file (.BAT file), using the "set" DOS command to set the above-mentioned environment variable in the same format:
set moz_plugin_path=[current plugins folder];[portable java plugins folder]
and then insert a new line to run Firefox.
3) using the .INI file of the portable firefox version to include the plugins folder of Portable Java.

The [current plugins folder] is the current folder of Firefox Plugins. If you don't know where it is, open firefox, go to Plugins page, search for "default plugin", you can read the full path where the default firefox plugin is placed.
The [portable java plugins folder] is the current folder of plugins used by portable java. It is placed in "Java\bin\new_plugin" folder (Java is the root folder where Portable Java has been installed). If you still have problem, search for file "npjp2.dll", and take note of the related folder where it is placed.

To check if one of the above-mentioned procedure has gone well, open Firefox and you should have two new items inside Plugins page:
"Java Deployment Toolkit" and "Java Platform SE".

Hope this may be useful for all of you.

P.S. If you use the procedure 1, you must logoff Windows and logon Windows again in order to let Windows load the new environment variable.

Kulmegil
Offline
Last seen: 3 years 6 months ago
Joined: 2009-12-30 14:57
My solution

[ If on some step You won't know what Your doing then stop.
Don't call me responsible if something breaks, goes wrong or explodes. Wink ]

a) Obvious step: have Firefox Portable & Java Portable installed on the same location (device). Let's say it's X:\PortableApps for this example

b) From X:\PortableApps\CommonFiles\Java\bin\
delete (or move to some temporary folder) following files:
- npdeploytk.dll
- npjpi160_17.dll
- npoji610.dll
- npt.dll

c) Move from X:\PortableApps\CommonFiles\Java\bin\new_plugin\
to X:\PortableApps\CommonFiles\Java\bin\
following files:
- npjp2.dll
- npdeploytk.dll
(the second one is Java Deployment Toolkit plugin, so it's probably not really a must)

d) Now is the dirty part - changing FirefoxPortable plugin location.
Create new text file in X:\PortableApps\FirefoxPortable called "FirefoxPortable.ini" with following content:

[FirefoxPortable]
PluginsDirectory=..\CommonFiles\Java\bin

(Unless You already use one - then change only "PluginsDirectory" line)

[!] Keep in mind that changing default plugins directory is not an "elegant" solution. If You want to use different plugins (like Flash) You'll have to drop it to either:
new location now set in X:\PortableApps\CommonFiles\Java\bin\
or Firefox app location in X:\PortableApps\FirefoxPortable\App\Firefox\plugins\

[!!] haven't gave it much of a testing, but currently I'm on vacation and using portableapps only on single home PC.

mr_swede
Offline
Last seen: 14 years 1 month ago
Joined: 2009-10-08 03:18
Wonderful! Works for Firefox Portable 3.6

Just want to say that this solution works like a charm on Firefox Portable 3.6.
Applying the same solution for Google Chrome Dev 5.0.322.2 doesn't seem to work.

mr_swede
Offline
Last seen: 14 years 1 month ago
Joined: 2009-10-08 03:18
Not working in Firefox Portable 3.6.3

Unfortunately, this solution is not working in Firefox Portable 3.6.3.

Kulmegil
Offline
Last seen: 3 years 6 months ago
Joined: 2009-12-30 14:57
 

It does work for me on 3.6.3 and Minefield builds... I think. Tried some demo applets, java plugin test and few games from www.classicdosgames.com.
Had to disable Java Deployment Toolkit on the last one (was forcing java installation).

mr_swede
Offline
Last seen: 14 years 1 month ago
Joined: 2009-10-08 03:18
Not working with FirefoxPortable 3.6.3 and Java 6 Update 19

I just did a fresh JavaPortable install and followed the instructions above.
It is not working. This link is a good test: http://java.com/en/download/installed.jsp?detect=jre&try=2

Kulmegil
Offline
Last seen: 3 years 6 months ago
Joined: 2009-12-30 14:57
...

It's working fine, it's my guide that's lacking.
It was written more like an emotional post rather then complete technical guide.

I suppose it all goes to b) step.I shouldn't "hardcoded" file names to remove as they change with each Java update. Check updated guide somewhere below.

mr_swede
Offline
Last seen: 14 years 1 month ago
Joined: 2009-10-08 03:18
Again working perfectly (FirefoxPortable 3.6.4 and Java 6 v 20)

This is strange - but great!.

I followed the guide above. It did not work with FF 3.6.3 as described above. Today I updated to FF 3.6.4 and now the java.com test link above works like a charm again.

Sigea
Offline
Last seen: 14 years 5 months ago
Joined: 2010-07-02 07:14
Kulmegil's solution worked for me

Followed the steps in his first post and it worked quite well.

Kulmegil
Offline
Last seen: 3 years 6 months ago
Joined: 2009-12-30 14:57
Updated guide
  • (obvious step) FirefoxPortable & JavaPortable
    should be installed on the same device and same root (\PortableApp) folder. Example:
    FirefoxPortable -> X:\PortableApps\FirefoxPortable.
    JavaPortable -> X:\PortableApps\CommonFiles\Java.
     
  • NP*.DLL files to keep/copy
    ..in \CommonFiles\Java\bin\ folder.

    1. Main new Java plugin:
      npjp2.dll from \new_plugin subdir
       
    2. (optionally) Java toolkit plugin:
      I don't think I need it at all and it caused some troubles in the past so You might want to disable or remove it.

      In Java 6 Update 19 it was called npdeploytk.dll
      In Java 6 Update 20 it's called npdeployJava1.dll
      In JavaPortable installers there is a copy of this file in \new_plugin (doesn't matter witch one You keep).

    3. OTHER NP*.DLL files should be removed
      ..from \CommonFiles\Java\bin\
      Those file names change with each java update so I won't list them here.

      [MORE INFO]
      np*.dll files are generally mozilla plugins. In this particular case old java plugin files. Not only FirefoxPortable completely don't need them but they will probably cause it to crash when trying to load Java applet.

    4. Forcing FirefoxPortable to load Java plugin
      from \CommonFiles\Java\bin

      In FirefoxPortable directory (where launcher is located) edit FirefoxPortable.ini and change PluginsDirectory= line:

      [FirefoxPortable]
      PluginsDirectory=..\CommonFiles\Java\bin

      If there is no FirefoxPortable.ini create one or grab a copy from:
      \Other\Source\FirefoxPortable.ini

      [MORE INFO]
      There are several ways how Firefox scans for plugins.
      FirefoxPortable in particular is using the environmental path %MOZ_PLUGIN_PATH% for it's purpose. This can be controlled by PluginsDirectory= line in FirefoxPortable.ini, and by default it's set to it's \Data\plugins subdir.

      !!! %MOZ_PLUGIN_PATH% only accepts single path so it's not possible to keep FirefoxPortable loading plugins from \Data\plugins any longer !!!

      Another quite-so convenient location to drop plugins for FirefoxPortabe to load is in it's own /App/Firefox/plugins subdir.

    Any suggestions (especially on how-to-load-the-plugin-step), guide criticism, etc are more then welcome!

    aboerner
    Offline
    Last seen: 11 years 3 weeks ago
    Joined: 2007-09-12 05:19
    Updated Guide

    Hi Kulmegil,

    thanks for the guide but I must admit (no offense!) that the updated guide was still a bit confusing to me, although I'm tweaking my portable firefox for a couple of years now. Smile

    The first step is obvious indeed (*) but you lost me at the second step: After reading the subsequent steps a couple of times without getting much wiser I grit my teeth and did what I hopefully did understand right.

    In short I ...

    • ... moved all np*.dll files from CommonFiles\Java\bin\ to a backup location (just in case...)

    • ... copied npjp2.dll and npdeploytk.dll from CommonFiles\Java\bin\new_plugin to CommonFiles\Java\bin\
      (for the log: when using Java 6 Update 20 or newer copy npdeployJava1.dll instead of npdeploytk.dll)

    • ... copied FirefoxPortable.ini from FirefoxPortable\Other\Source\ to FirefoxPortable\
    • ... edited the PluginsDirectory line in FirefoxPortable.ini to PluginsDirectory=..\CommonFiles\Java\bin

    This seems to work fine and Firefox finally (!) uses the portable java from my thumb drive.

    Losing the connection to FirefoxPortable\Data\plugins\ shouldn't be a major issue as you may move the plugins located here to FirefoxPortable\App\firefox\plugins\, where Firefox will find them as well.

    ----------

    (*) Although it is not essential for the patch to work that Firefox and Portable Java are installed in the same root folder. If one really want's to use a (portable) java installed somewhere else, he should be fine with setting the appropriate path for the plugin directory in FirefoxPortable.ini.

    ottod
    Offline
    Last seen: 5 years 10 months ago
    Joined: 2010-06-17 19:52
    It works as advertised

    I have been able to not only have a portable JRE for Portable Firefox with the above instructions, but also a portable JDK with support for Maven/Scala/Lift. Thanks.

    defacto64
    Offline
    Last seen: 14 years 1 month ago
    Joined: 2010-09-16 03:56
    Problem with Kulmegil solution

    The solution crafted by Kulmegil works indeed very well... until a newer version of JRE is installed on the PC. From that moment, the USB-local Java Plug-In will always use the PC-local JRE, ignoring the portable JRE on the USB key.

    This has several drawbacks, e.g. when the user wants to use certain Java extensions that are present on the USB drive but not on the PC.

    Anyone can devise a workaround to this annoyance?

    defacto64
    Offline
    Last seen: 14 years 1 month ago
    Joined: 2010-09-16 03:56
    Updated guide (rationale behind)

    Hi Kulmegil,

    I also confirm that your solution works fine, thak you for that.

    Now, I would like to ask you (and all the wise people following this thead) WHY it is so. In other words, could you please explain what is the "mechanics" behind this solution? Why are those steps effective?

    I think that understing the rational could facilitate "engineering" the solution and making it (sort of) "documented" and "official" by PortableApps.com developers, or Mozilla developers, or whoever is willing and able to.

    gris
    Offline
    Last seen: 6 years 1 month ago
    Joined: 2008-10-01 00:42
    jPortable

    I followed Kulmegil's guidelines above and was able to secure FirefoxPortable to work with jPortable, both residing on my machine's local hard disk. Many thanks for Kulmegil's valued advice.

    I have a question: would it be safe then to uninstall an earlier local copy of Java Runtime that I had installed on my machine, and how can I make jPortable available to other applications in general, whether they be portable or localised, if any of them should need Java?

    I would be grateful if you could please give me some advice.

    NiMhurchu
    Offline
    Last seen: 4 years 4 months ago
    Joined: 2007-03-04 03:20
    Confirmed

    Confirmed working.

    1.
    Moved
    "C:\PortableApps\PortableApps\CommonFiles\Java\bin\npdeployJava1.dll" and
    "C:\PortableApps\PortableApps\CommonFiles\Java\bin\npjpi160_25.dll"
    to "C:\PortableApps\PortableApps\CommonFiles\Java\bin\__backup\"

    2.
    Copied
    "C:\PortableApps\PortableApps\CommonFiles\Java\bin\new_plugin\npjp2.dll" to
    "C:\PortableApps\PortableApps\CommonFiles\Java\bin\

    3.
    Copied
    "C:\PortableApps\PortableApps\FirefoxPortable\Other\Source\FirefoxPortable.ini" to
    "C:\PortableApps\PortableApps\FirefoxPortable\"

    4.
    Changed
    PluginsDirectory=\Data\plugins to
    PluginsDirectory=..\CommonFiles\Java\bin

    5.
    Restarted Firefox, opened a Java powered website, confirmed working.

    Thank you very much!

    papps_user
    Offline
    Last seen: 12 years 5 months ago
    Joined: 2011-09-11 01:54
    JPortable webpage is wrong ?

    https://portableapps.com/apps/utilities/java_portable

    Says that
    "jPortable allows you to easily add a Java® runtime environment to your portable device. It automatically works with apps in PortableApps.com Format like LibreOffice Portable and Mozilla Firefox, Portable Edition. No Java® runtime environment needs to be installed on the local machine and no admin rights are required. JARs can be run using our jPortable Launcher."

    I am guessing obviously this is WRONG !! ?

    Can't we modify the firefox source code to look here instead of in the registry for Java and then package as portable app ?

    Aluísio A. S. G.
    Offline
    Last seen: 8 years 4 months ago
    DeveloperTranslator
    Joined: 2010-11-09 17:43
    Hmm...

    Can the solution used in SeaMonkey be used here too?

    Previously known as kAlug.

    John T. Haller
    John T. Haller's picture
    Online
    Last seen: 13 min 35 sec ago
    AdminDeveloperModeratorTranslator
    Joined: 2005-11-28 22:21
    It's Right

    It's right. Install Firefox Portable to X:\PortableApps\FirefoxPortable. Install jPortable to X:\PortableApps\CommonFiles\Java. FirefoxPortable.exe will automatically configure Firefox to use the JRE in jPortable on launch. This requires the current FirefoxPortable.exe launcher (introduced in 7.0 and 3.6.23). If you use the upgrade within Firefox, you won't have the new launcher and it won't work. The current Thunderbird (current and legacy), SeaMonkey and Iron support jPortable automatically as well. Chrome (all 3 channels) will as well shortly.

    Sometimes, the impossible can become possible, if you're awesome!

    toohoo
    Offline
    Last seen: 12 years 9 months ago
    Joined: 2012-03-09 05:34
    Firefox with jPortable not working

    Hello everybody,
    I've downloaded new and installed:

    - PortableApps application
    - Forefox Portable (German)
    - jPortable

    I've tested it with Wuala Webaccess. It says:
    Failed to find Java VM.

    So what can I do? Could please anybody help me?

    Thanks in forehand, Thomas#

    PS: The installed jPortable is not viewable in PortableApps menu.

    ottosykora
    Offline
    Last seen: 22 hours 48 min ago
    Joined: 2007-10-11 17:48
    this is different thing

    >I've tested it with Wuala Webaccess. It says:
    Failed to find Java VM.

    Otto Sykora
    Basel, Switzerland

    getco
    Offline
    Last seen: 3 years 8 months ago
    Joined: 2008-08-03 05:31
    Is there a way to make them

    Is there a way to make them work together with their latest versions if they're not both in the PortableApps folder - i.e. tell Firefox where to look for Java?

    hiteshseth
    Offline
    Last seen: 11 years 7 months ago
    Joined: 2013-04-19 23:52
    FirefoxPortable with TOR

    Hi,

    I am using Tor bundle Browser which uses firefox portable as a browser. The problem is that even after following above mentioned steps, the Java Plugin doesn't show up in "Addons".
    I have already tried copying files from Java Portable as well as another Java installation. Have tried both firefoxportable.ini method and using .bat file method but to no avail.
    Interestingly, I am able to install flash plugin using this method but not Java plugin.

    Any help/direction would be highly appreciated.

    John T. Haller
    John T. Haller's picture
    Online
    Last seen: 13 min 35 sec ago
    AdminDeveloperModeratorTranslator
    Joined: 2005-11-28 22:21
    Unsupported

    The Firefox Portable included with the Tor Browser bundle is heavily modified and completely unsupported by Mozilla and PortableApps.com. Java and other plugins are purposely disabled.

    Sometimes, the impossible can become possible, if you're awesome!

    grantwarkentin
    Offline
    Last seen: 11 years 5 months ago
    Joined: 2013-06-18 17:13
    Java error

    Hi there, I am having a terrible time getting Java to work with Firefox Portable. I am using it on a remote terminal and it works, when I verify Java it works, but when I try and use this Java-powered Ephox EditLive text editor it will not work.

    I posted a screenshot of the error message here: http://i.imgur.com/CzpDhAI.png

    Any suggestions?

    mzelic
    Offline
    Last seen: 10 years 2 months ago
    Joined: 2014-09-17 09:30
    MacOS Firefox and Java

    Has anyone tried Firefox portable with Java on MacOS?
    Java plugin is not picked up by default in CommonFiles/Java.
    I tried to play setting the MOZ_PLUGIN_PATH variable to java/bin but with no luck.

    I would appretiate any suggestions.

    badcom
    Offline
    Last seen: 6 years 11 months ago
    Joined: 2014-10-10 16:00
    Can't get jPortable to work

    Hi guys,

    I have installed jPortable in the same dir as PortableFirefox.exe, however, when I try accessing a website that requires Java plugin, it says I don't have the plugin.

    My dir structure is as follows:

    E:\FirefoxPortable\FirefoxPortable.exe
    E:\FirefoxPortable\CommonFiles\Java

    Any suggestion?

    John T. Haller
    John T. Haller's picture
    Online
    Last seen: 13 min 35 sec ago
    AdminDeveloperModeratorTranslator
    Joined: 2005-11-28 22:21
    Enable?

    Did you manually enable it in your settings? Java is entirely disabled by default within Firefox now for security unless you open up add-ons and manually enable it.

    Sometimes, the impossible can become possible, if you're awesome!

    badcom
    Offline
    Last seen: 6 years 11 months ago
    Joined: 2014-10-10 16:00
    Not listed

    The problem is that it's not listed in neither add-ons nor plugins. I thought it would be automatically listed there once it's installed and I restart the browser.

    Gord Caswell
    Gord Caswell's picture
    Offline
    Last seen: 1 week 1 day ago
    DeveloperModerator
    Joined: 2008-07-24 18:46
    Wrong location

    Jportable should be installed to E:\CommonFiles\Java , not inside Firefox, Portable Edition.

    badcom
    Offline
    Last seen: 6 years 11 months ago
    Joined: 2014-10-10 16:00
    Thanks!

    That did the trick!! =).

    Many thanks!

    guazontsubasa
    guazontsubasa's picture
    Offline
    Last seen: 5 years 11 months ago
    Joined: 2018-12-19 11:44
    Java portable and Java installed

    Hi, I have firefox portable, jportable 6.22 and java 8 installed on my OS.
    FirefoxPortable/FirefoxPortable.exe
    CommonFiles/Java..
    My firefoxportable.ini like this:
    [FirefoxPortable]
    AlwaysUse32Bit=true
    PluginsDirectory=..\CommonFiles\Java\bin
    AllowMultipleInstances=true
    DisableSplashScreen=true

    The problem is that when I activate jportable 6.22 on "addons" It also activates my java 8 resulting on not working..
    I tested this way without having java 8 on OS and works like a charm.

    Does anyone know how to make firefox only load java from portable folder? and not load java installed?

    Sam786
    Offline
    Last seen: 8 months 1 week ago
    Joined: 2024-03-27 10:02
    Portable Firefox to load portable Java not locall installed Java

    Hi All,

    Sorry to jump on an very old thread.

    Was wondering if anyone knew how to configure Portable Firefox to strictly run portable Java and to ignore the addon for local installed Java on the OS.

    Log in or register to post comments