Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Running 32 and 64 bit Apps Written in Java


16 Apr 2013   #1

Windows 7 x64
 
 
Running 32 and 64 bit Apps Written in Java

I've spent a couple of days googling everything I can about Java and searched this forum and haven't found an answer I can understand.

I'm trying to run a subtitling program called Jubler which uses the 32 bit version of Java and a media server called Serviio on the same machine. Serviio apparently can be run on 32 or 64 bit machines but when I install it on my 64 bit pc, it doesn't give the option to install it as a 32 bit app.

Both apps request to install their preferred version of Java and give the option of where to install it. I've tried installing each version of Java in different folders but when the 64 bit version is installed on my machine, the 32 bit app stops working correctly.

From what I've gathered, it appears that there must be some way to point each app to the correct version of Java, maybe in Environment Variables, but I don't see exactly how.


My System SpecsSystem Spec
.

18 Apr 2013   #2

W7 Pro SP1 64bit
 
 

What happens if you...
...uninstall all of the versions of Java
...run JavaRa to make sure that it is all gone
...install the latest 32 bit Java
http://www.filehippo.com/download_jre_32/

Both apps should be able to find the 32bit version of Java without you having to do anything special.
My System SpecsSystem Spec
18 Apr 2013   #3

Windows 7 x64
 
 

Thanks for the reply, UsernameIssues.
I tried what you suggested and tried reinstalling Serviio afterwards. During the install I get a prompt that says that Java 6 was not detected Do You Want To Install? To which I replied No. When the install finishes and I try to open the program it throws this error:

No JVM could be found on your system.
Please define EXE4J_JAVA_HOME
to point to an installed 64-bit JDK or JRE or download a JRE from java.com: Java + You.

As far as I know, Serviio is compatible with 32 and 64 bit systems but on my machine it gives no option as to how to install it.
My System SpecsSystem Spec
.


18 Apr 2013   #4

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by bobhangsit View Post
...I've tried installing each version of Java in different folders but when the 64 bit version is installed on my machine, the 32 bit app stops working correctly....
Let's test this issue another way.

Install the latest 32bit version of Java into the normal Program Files (x86) folder.

Install the latest 64bit version of Java into the normal Program Files folder.

Open a 32bit web browser (maybe Firefox) and visit this page:
http://games.yahoo.com/game/bookworm-applet.html

Open a 64bit web browser (maybe IE10) and visit that same page.
If you use IE10, then you will need 64bit tabs enabled.

Look in task manager to see if all of the IE10 processes are indeed 64bit. Also check that the 32bit and the 64bit versions of Java are running at the same time. Does the game function as expected? It works for me.

If the above works for you - then we need to leave the two installs of Java alone and concentrate on Jubler. What are the errors in Jubler?
My System SpecsSystem Spec
18 Apr 2013   #5

Windows 7 x64
 
 

I've completed all the above steps and I have to assume that unless a process is marked with *32, it must be 64bit. I didn't see any other way to verify. So it appeared that all the IE10 processes were 64bit. The game played on both Firefox and IE10 with 64bit tabs enabled. Both 32 and 64bit versions of Java were running at the same time.

I should say here that I had sent an email to the developer of Jubler the day before I posted here explaining the problem I was having. Since the it looked like the last post in the forum for a similar problem with Jubler was about 2 years ago, I didn't hold out much hope that I'd get a reply. Sometime after I posted here I got a reply about it and was promised that he would look into it. He intimated that it could be a problem with Windows sending the call for Java to the wrong version. I haven't heard any more.

From what I've read so far, more than a couple of versions of Java can be installed on any given system without a problem. So I was hoping there would be some way of controlling its behavior in relation to the app that needed it.

Anyway, with the 32bit version of Java installed (and only the 32bit), there is a video preview pane that normally shows the position of the video at the begin time of the next subtitle. With the 64bit Java installed, the preview pane shows the message, "FFDecode library not active. Using demo image." And the preview of the video being subtitled does not show.

When I uninstall the 64bit Java, the program works normally.

Thanks again for looking into this so far and thanks in advance for any more time you might spend on this.
My System SpecsSystem Spec
18 Apr 2013   #6

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by bobhangsit View Post
...I have to assume that unless a process is marked with *32, it must be 64bit. I didn't see any other way to verify....
That last quoted line may have led to your solution :-)

You are correct out the 32bit vs. nothing in task manager, but to show you how to see more info, I turned on more columns (and turned others off to make the info fit) then I took this screenshot:
Running 32 and 64 bit Apps Written in Java-jubler.png

The command line info within task manager led me to make a shortcut like this:
Code:
"C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar "C:\Program Files (x86)\Jubler\Jubler.exe"
Create a shortcut like that to force the OS to start Jubler using the 32bit version of Java. Use that shortcut to start Jubler.

Let us (and Jubler's author) know if that solved it for you.


My System SpecsSystem Spec
18 Apr 2013   #7

Windows 7 x64
 
 

I don't know how that worked but it did! My hat is off to you, sir/madam.

If you have a screenshot of Jubler in a task manager window, you must have gone to the trouble to install it on your system to duplicate the problem. My deepest gratitude goes out to you.

I checked to see what would happen when I started Jubler with the desktop shortcut the program places and the behavior is the same as what I complained about even though the entry in task manager for Java appears to be the same as the code you provided.

So I have just a couple more questions. When you say to create a shortcut do you mean that I would have to keep a text file with that code to start the program from command line whenever I want to use the program or is there a way to create an actual desktop shortcut to do this?

Some people I know swear by other subtitling apps and I've tried a couple other but I've always found that Jubler works best for me. Thanks again for helping me to be able to continue using it
My System SpecsSystem Spec
18 Apr 2013   #8

Windows 7 x64
 
 

btw I was hoping that if I found a solution to this problem, the knowledge gained would help me solve any problems of a similar nature in the future. So any explanation you could provide would also be greatly appreciated. Thank, bob.
My System SpecsSystem Spec
19 Apr 2013   #9

W7 Pro SP1 64bit
 
 

Please read thru the entire post (including the warning at the end) before you take any actions suggested by this post.


Quote   Quote: Originally Posted by bobhangsit View Post
....I checked to see what would happen when I started Jubler with the desktop shortcut the program places and the behavior is the same as what I complained about even though the entry in task manager for Java appears to be the same as the code you provided....
Please check that again.
If you start Jubler using the shortcut that the Jubler installer creates...
...then there should be two Jubler related entries within Task Manager:
One for the Jubler process from the 32bit \Program File (x86)\ folder.
And another one for Javaw.exe from the 64bit \Programs Files\ folder.

Notice that the (x86) is missing from the folder name for the javaw process. Both Jubler related entries are shown in the screenshot in my earlier post. Look at that screenshot again and notice the row that is selected (highlighted in with a light blue line). All that I did was copy that whole command line and add the (x86) part to the path so that we could use the 32bit version of Javaw to run Jubler.

Normally, 32bit apps install into the program files folder with this name
\Program File (x86)\
Normally, 64bit apps install into the program files folder with this name
\Program File\
You should have these folders:
\Program File (x86)\Jubler
\Program File (x86)\Java
\Program File\Java


While I was writing this long post. You posted this:
Quote   Quote: Originally Posted by bobhangsit View Post
btw I was hoping that if I found a solution to this problem, the knowledge gained would help me solve any problems of a similar nature in the future. So any explanation you could provide would also be greatly appreciated. Thank, bob.
Now I will not have to apologize for being long winded :-)

To explain the way this Jubler app is starting is going to take working thru some very basic stuff and some not so basic stuff. Add to that the fact that I'm guessing on some things because I'm no expert on Java apps.

Before we go further, please use this tutorial to show certain file extensions:
File Extensions - Hide or Show

Your desktop is shown to you by the Windows (file) Explorer app. Double clicking on a file on your desktop is the same as double clicking on the same file from within the Windows (file) Explorer window.

When you double click on a text file named test.txt, Explorer looks in the registry to see what app should open a file ending in txt. The default app would be notepad.

When you double click on a file named test.sub, the Explorer looks in the registry and sees that you want Jubler to open a file ending in sub. (As you know, there are several other file extensions associated with Jubler.)

Explorer then starts the Jubler app. Explorer also passes the path of the file that you double clicked on to the Jubler app so that the Jubler app can open that file for you. However, the Jubler app will not create a window that you can see. Instead, that Jubler process asks the registry where Java is. The registry tells Jubler to use the 64bit version of Java. :-(

The Jubler process starts Java with these command line parts...
...path to 64bit javaw.exe
...a java switch (-jar)
...path to Jubler
...path to the file that you clicked on
Then Java works its magic and a Jubler window appears.
(But Jubler is somewhat broken because of the 64bit Java.)

So - why did I bore you with all of that?
Because the work around that I posted earlier jumps in the middle of the process. It does not fix the whole process. Let me try to explain that by summarizing my ramblings above with the 5 steps below.

1) Explorer shows you your desktop.
2) You double click on test.sub
3) Explorer starts Jubler.
4) Jubler starts Java and Jubler (again?) and opens the file you double clicked on.
5) Jubler does not work well because the wrong Java started.

With the "fix" that I posted earlier, you should not double click on a file that is associated with Jubler, because that part of the process is still broken - but we can fix that :-)

Download the compressed file that I've attached to the bottom of this post.
Open it via the Windows (file) Explorer.
(or use your app for compressed files)
Double click on the reg file named modified.reg.
Say OK to the warning.
Say OK to the success notification.

If you want to put things back the way they were...
...you can re-install Jubler or
...repeat the steps above using the reg file named normal.reg.

What the file named modified.reg changes:
1) Explorer shows you your desktop.
2) You double click on test.sub
3) Explorer starts Jubler.
4) Jubler Explorer starts Java and Jubler (again?) and opens the file you double clicked on.
5) Jubler does not work well because the wrong correct Java started.



You don't need regedit open to make use of those reg files. I just did that for the video.

You should now be able to double click on a file that is associated with Jubler and the correct version of Java should launch. I have no idea what is supposed to be inside a Jubler file, but I figured a few renamed text files would be safe to test with - I just changed the txt file extension to the extensions that you see in this video:






You can delete the shortcuts (desktop & start menu) that the Jubler installer created. You can replace them with the one that you make via the info in the video below.
Quote   Quote: Originally Posted by bobhangsit View Post
......So I have just a couple more questions. When you say to create a shortcut do you mean that I would have to keep a text file with that code to start the program from command line whenever I want to use the program or is there a way to create an actual desktop shortcut to do this?....
Don't let the term "command line" fool you. That does not mean that the code has to be run from a command prompt window. The code can be the target of a normal shortcut:




And if you want to change the icon:



You will probably need to navigate to the folder where the Jubler EXE resides. I had done that once before making the video and the Operating System remembered the Jubler folder from before.


Warning: I do not know if the invisible Jubler window is needed to do stuff other than start Java. Maybe it is important to have it running in the background while you work with these files. The way that I "fixed" things by not using that invisible Jubler window might actually break things. It would be best to ask the author of the app to suffer thru reading this post and maybe let us know if it is okay to use Jubler without starting the invisible Jubler window.

That said, there is not much risk in just testing the registry modifications. As mentioned above, you can always undo them by installing Jubler again or using the reg file named normal.reg.


Attached Files
File Type: zip Jubler32.zip (1.1 KB, 2 views)
My System SpecsSystem Spec
Reply

 Running 32 and 64 bit Apps Written in Java




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:44 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33