JRE on Mac

Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
Installing JRE 1.5 as default

Hi,

I am running Snow Leopard 10.6.6 build.

Anybody know:

1) Where I can find JRE 1.5 for Mac
2) How I can have this run as the default on my Mac

A bit of background, I have had a developer write an application in Java for me, when running it after a while the terminal just freezes, no errors just stops.

We have been running the application in parallel (he uses Windows) using the same data and he is experiencing no freezes and has suggested I try JRE 1.5 instead of 1.6 I have installed.

Does anybody know if this a known issue by any chance?
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
Hi,

I posted this elsewhere but nobody seemed to know.

I am running Snow Leopard 10.6.6.

Anybody know:

1) Where I can find JRE 1.5 for Mac
2) How I can have this run as the default on my Mac

A bit of background, I have had a developer write an application in Java for me, when running it after a while the terminal just freezes, no errors just stops.

We have been running the application in parallel (he uses Windows) using the same data and he is experiencing no freezes and has suggested I try JRE 1.5 instead of 1.6 I have installed.

Does anybody know if this a known issue by any chance?
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
That's bad advice. I would not install the older JDK on your machine without knowing why the application freezes. If you got no output at the console it's because the application is not logging any output. The odds are better it's poor coding on the developer's part, not the JDK on your machine.
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
That's bad advice. I would not install the older JDK on your machine without knowing why the application freezes. If you got no output at the console it's because the application is not logging any output. The odds are better it's poor coding on the developer's part, not the JDK on your machine.

We are running the application in parallel on the same live data and he has said he has experienced no freezes, so I would have thought this would rule out any coding errors.

But yes I agree re the installing JRE 1.5, I am not too keen on that.

I have an old windows machine I can try run it on to see if the freeze occurs, will see if it’s still running.
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
In all my years of writing Java code I can remember many occasions when an application had different runtime behavior on a Windows versus Unix system, even Java applications, and OS X is a Unix system. I can't offer much more advice without understanding the app you are running but I would not install the older JDK. That is not the first step to a solution. Better to profile it or increase the logging to determine where the failure occurs. Freezes usually point to a blocking call that's not returning or a deadlock from poor threading code.

Grant
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
In all my years of writing Java code I can remember many occasions when an application had different runtime behavior on a Windows versus Unix system, even Java applications, and OS X is a Unix system. I can't offer much more advice without understanding the app you are running but I would not install the older JDK. That is not the first step to a solution. Better to profile it or increase the logging to determine where the failure occurs. Freezes usually point to a blocking call that's not returning or a deadlock from poor threading code.

Grant

OK thanks for the advice, makes sense.
 
Joined
Dec 11, 2010
Messages
1,808
Reaction score
40
Points
48
Location
Chicago
Your Mac's Specs
late 2012 mini w/SSD
I don't know if it's a known issue.
You should be able to set JRE 5 as default by using the Java prefs app, either in System prefs or in Applications/Utilities, or in Applications/Java.
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
I don't know if it's a known issue.
You should be able to set JRE 5 as default by using the Java prefs app, either in System prefs or in Applications/Utilities, or in Applications/Java.



Thanks I will give this a try
 
Joined
Oct 27, 2002
Messages
13,172
Reaction score
348
Points
83
Location
Cleveland, Ohio
Your Mac's Specs
MacBook Pro | LED Cinema Display | iPhone 4 | iPad 2
Please don't crosspost or ask your question multiple times in different places.

The Community Guidelines state:

Post appropriately.
Search first, post things in the right place, use descriptive thread titles, and don't crosspost. Those things will help get you more timely responses and help keep our community nice and tidy.

Thanks for understanding!
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
One thing you might want to try is running the Java Preferences app in Utilities and move 32-bit Java above 64-bit if 64-bit is first and run the app again. I'm honestly not sure how to install 1.5 if you don't have the image from Apple. It's not available on the developer site for 10.6 so the challenge is finding it. You can see what JDKs you actually have by looking in /System/Library/Java/JavaVirtualMachines. Chances are you will only find the 1.6 JDK.
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
One thing you might want to try is running the Java Preferences app in Utilities and move 32-bit Java above 64-bit if 64-bit is first and run the app again. I'm honestly not sure how to install 1.5 if you don't have the image from Apple. It's not available on the developer site for 10.6 so the challenge is finding it. You can see what JDKs you actually have by looking in /System/Library/Java/JavaVirtualMachines. Chances are you will only find the 1.6 JDK.

Yes I only have 1.6. I don't see how changing to 1.5 would help anyway so given up on that idea.

OK I moved the 32-bit to the top, running the app overnight and will see how it looks in the morning.

There is also an option to to run applets 'in their own process' or 'within the browser process', default is 'within the browser process'. Could that make a difference?

Spoke to the developer today and he said he run it 15 hours straight without a freeze.

Really appreciate the help btw.
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
I don't think you are running an applet. If you are running a long running process that you start from the command-line it's not an applet. If you do run it from inside a browser then it might make a difference running it outside the browser process but that should not be an option for you unless I'm misunderstanding. Try it with the 32-bit VM, that might make a difference. Whether the developer does or does not have a problem is irrelevant. In your runtime environment there is a problem and I still suspect the code.

As for moving 32-bit above 64-bit it means when you run java from the command line OS X will use the 32-bit version. You can also just uncheck the box next to the 64-bit version to temporarily disable it. I doubt it will change the behavior you observe but it's about the only option you have without debugging the code and that's going to require more logging and thread dumps when the process freezes.
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
OK I'm back, still struggling with this.

Now I am trying to run the solution remotely on this guys server, I am using the below command to try access access it:

sh-3.2# java RemoteShellClient 87.120.209.147 50001 "cmd" "java -jar -Dusername=xxxxxxx -Dpassword=xxxxxxxx -DcCodes=all C:\BetInTime.jar ServiceSF" (the face is a C+:+\)

But getting the below error:

Invalid input data

Looks like a syntax error, any thoughts?
 
OP
J
Joined
Nov 17, 2007
Messages
15
Reaction score
0
Points
1
OK, on further inspection, the shellscript seems to rely on some batch files:

CommandRunner.class
RemoteShell.jar
SockData.class
CommandRunner.java
RemoteShellClient.class
SockData.java
JavaBuild.bat
RemoteShellClient.java
java
JavaClient.bat
RemoteShellServer.class
JavaServer.bat
RemoteShellServer.java

Contents of which are:

set ClassPath=RemoteShell.jar
java RemoteShellServer %1 %2

set ClassPath=RemoteShell.jar
java RemoteShellClient %1 %2 %3 %4

javac -g:none *.java
jar cvf RemoteShell.jar *.class

Do you think it would help to rewrite these as bash files?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top