It is currently Thu Apr 18, 2024 8:16 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 18 posts ] 
Author Message
Offline
 Post subject: Alternative Java Runtimes
Post #1 Posted: Fri May 02, 2014 2:24 am 
Lives in gote
User avatar

Posts: 310
Location: Deutschland
Liked others: 272
Was liked: 126
Rank: EGF 4 kyu
This might be an overly optimistic question but are there any alternative Java runtimes for Windows that will...
  • Run KGS
  • ... with stone sounds (without big-ugly-hack)
  • ... without requiring me to faff about with white-lists and security settings.
  • Not ruin my PC by subjecting me to endless, weekly updates and shiteware from Ask.com

I do not have any version of Java on my new-ish laptop and refuse to install the distribution that Oracle serves.

Oh... and what's happening with the mythical browser-based KGS thing that has been promised for so long?


This post by Charlie was liked by 2 people: Hong Ny, LuckyJim
Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #2 Posted: Fri May 02, 2014 4:21 am 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
Charlie wrote:
[..]
I have no answer to your Java-related questions, but …

Quote:
Oh... and what's happening with the mythical browser-based KGS thing that has been promised for so long?
see William Shubert’s dev blog on Google plus https://plus.google.com/u/0/+Gokgs/posts

Latest post there:
Quote:
Shared publicly - 24 Apr 2014

It's been a while since the last update so I just thought I'd post here to say that I'm still working daily on the Android client. It's one of those things where the last 10% of the work takes 90% of the time - connecting up all the dialogs, minor functions, etc. needed. I have started on the game window but still haven't come up with a new look for it that I really like. I'll post here when I do.


Greetings, Tom

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)


This post by Bonobo was liked by: Tanana
Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #3 Posted: Fri May 02, 2014 5:16 am 
Lives in sente
User avatar

Posts: 842
Liked others: 180
Was liked: 151
Rank: 3d
GD Posts: 422
KGS: komi
Charlie wrote:
This might be an overly optimistic question but are there any alternative Java runtimes for Windows that will...
  • Run KGS
  • ... with stone sounds (without big-ugly-hack)
  • ... without requiring me to faff about with white-lists and security settings.
  • Not ruin my PC by subjecting me to endless, weekly updates and shiteware from Ask.com

I do not have any version of Java on my new-ish laptop and refuse to install the distribution that Oracle serves.


You can try openjdk, but the degree to which it works on Windows seem dubious. The lack of downloads from the openjdk site itself is telling. http://stackoverflow.com/questions/5991 ... windows-os

I too am horrified at the ask.com nonsense that Oracle uses by default. You can avoid it, however: http://www.zdnet.com/if-you-need-java-u ... 000010157/

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #4 Posted: Fri May 02, 2014 7:32 am 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: KGS 10 kyu
KGS: Level1Dev
OGS: LevelOneDev
Online playing schedule: Whenever.
You can have more than one version of Java installed on your machine. I don't understand why people won't just install Java 6 and stop complaining. There are other interpreted languages that have a sharded user base because they won't move on from a major version. (Python, PHP, Ruby....)

http://www.oracle.com/technetwork/java/ ... 37-oth-JPR

It might ask you to sign up for an account. If it does just use https://www.guerrillamail.com/ to sign up for one and then forget about the account! It's not like you'll need it ever again or Oracle really needs your information.

You get stone sounds! You have no security settings to faff about with.

Once you install this I would run ONLY KGS with this JDK/JRE (Which is easy to default everything to the new version anyways). You'll need to download the cgoban.JAR from their website and then use javaw.exe to launch it with a shortcut.

If you have any questions I'll be glad to help.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #5 Posted: Thu May 08, 2014 8:57 am 
Lives in gote
User avatar

Posts: 310
Location: Deutschland
Liked others: 272
Was liked: 126
Rank: EGF 4 kyu
I have had some success running Cgoban and Cgoban-h under Zulu™: A Commercialized OpenJDK™ for Windows and Linux

http://www.azulsystems.com/products/zulu

Zulu can be downloaded as a Zip file requiring absolutely zero installation and allowing javaw.exe to be executed directly and, in my opinion, that is just perfect. (It's 64-bit only but that is not a problem for me.)

Sadly, even with version 1.6, nothing I can do will make KGS stone-click sounds sound. I have tried to get big-ugly-hack to work with Zulu, I have tried the `-Dsun.sound.useNewAudioEngine="false"' trick and I have tried two different versions of Cgoban-h (found via Google)

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #6 Posted: Thu May 08, 2014 1:03 pm 
Lives in sente
User avatar

Posts: 842
Liked others: 180
Was liked: 151
Rank: 3d
GD Posts: 422
KGS: komi
Charlie wrote:
I have had some success running Cgoban and Cgoban-h under Zulu™: A Commercialized OpenJDK™ for Windows and Linux

http://www.azulsystems.com/products/zulu


Interesting find, and interesting model. I was intrigued about it's possibilities for the product I work on in real life, but sadly, Zulu is only supported on Linux and Windows, not AIX and HPUX. Should be enough for most desktop O/S's, tho.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #7 Posted: Fri May 09, 2014 1:58 am 
Lives in gote
User avatar

Posts: 310
Location: Deutschland
Liked others: 272
Was liked: 126
Rank: EGF 4 kyu
I did some more hacking with Zulu and KGS, last night, attempting to resurrect the stone sounds. I ended my struggle with the `testaudio.jar' that was used in the old KGS-stone-sound thread.

In Zulu's Java SE 6, 7 or 8, without big-ugly-hack, I get output similar to this:

Code:
C:\<redacted>\Downloads\KGS>zulu1.7.0_55-7.4.0.5-win64\jre\bin\java.exe -version
openjdk version "1.7.0_55"
OpenJDK Runtime Environment (Zulu 7.4.0.5-win64) (build 1.7.0_55-b13)
OpenJDK 64-Bit Server VM (Zulu 7.4.0.5-win64) (build 24.55-b03, mixed mode)

C:\<redacted>\Downloads\KGS>zulu1.7.0_55-7.4.0.5-win64\jre\bin\java.exe -jar testaudio.jar
Unable to open Java mixer.
You have the following mixers available:
  Primary Sound Driver
  Speakers (2- High Definition Audio Device)
  Speakers (2- High Definition Audio Device)
  S241HL (High Definition Audio Device)
  Port Speakers (2- High Definition Au
  Port Speakers (2- High Definition Au
  Port S241HL (High Definition Audio D
Played audio file at volume 0.0


With big-ugly-hack in ..\jre\lib\ext I get the following promising output but no sound actually plays:

Code:
C:\<redacted>\Downloads\KGS>zulu1.7.0_55-7.4.0.5-win64\jre\bin\java.exe -version
openjdk version "1.7.0_55"
OpenJDK Runtime Environment (Zulu 7.4.0.5-win64) (build 1.7.0_55-b13)
OpenJDK 64-Bit Server VM (Zulu 7.4.0.5-win64) (build 24.55-b03, mixed mode)

C:\<redacted>\Downloads\KGS>zulu1.7.0_55-7.4.0.5-win64\jre\bin\java.exe -jar testaudio.jar
Played audio file at volume 0.9300098


Testing on the KGS board shows similar behaviour - no sound under either environment. I tested some other features of the KGS client and did achieve sounds. (Specifically: the test-microphone feature replayed my voice correctly.) This behaviour is consistent with the stone-click-sound bug.

Stone click sounds are the missing piece, the final unknown. If I can solve it, I will put up a simple tutorial ("How to KGS!!") explaining a minimal footprint, malware free and portable installation of this dratted client.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #8 Posted: Fri May 09, 2014 4:01 am 
Lives in gote
User avatar

Posts: 314
Location: Germany
Liked others: 10
Was liked: 128
Rank: KGS 4k
Charlie wrote:
If I can solve it, I will put up a simple tutorial ("How to KGS!!") explaining a minimal footprint, malware free and portable installation of this dratted client.

Didn't levelonedev do exactly that?

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #9 Posted: Fri May 09, 2014 11:49 am 
Lives in sente
User avatar

Posts: 842
Liked others: 180
Was liked: 151
Rank: 3d
GD Posts: 422
KGS: komi
The levelonedev solution is, I think, a perfectly fine solution, but it does require the installation of (multiple versions of) Java, so is hence not a portable solution. I gather Charlie is hoping to get a solution where you can just unzip a zip file containing java, the kgs, binaries, and the appropriate launch command.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #10 Posted: Sat May 10, 2014 8:47 am 
Lives in gote
User avatar

Posts: 313
Liked others: 36
Was liked: 63
Rank: KGS dan
KGS: Toge
levelonedev wrote:
You can have more than one version of Java installed on your machine.


- I have Java 6 update 26 and Java 6 update 31 (64-bit). KGS works fine with stone sounds too. If I install the latest Java then CGoban loads Java 7 where stone sounds are missing.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #11 Posted: Sat May 10, 2014 7:18 pm 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: KGS 10 kyu
KGS: Level1Dev
OGS: LevelOneDev
Online playing schedule: Whenever.
Toge wrote:
- I have Java 6 update 26 and Java 6 update 31 (64-bit). KGS works fine with stone sounds too. If I install the latest Java then CGoban loads Java 7 where stone sounds are missing.


When you install Java 7 it will set your default Java version to launch any Java program in the Java 7 VM. You can configure it to launch all your programs in 1.6 if you default it to that, but I wouldn't suggest that.

SO what you need to do is modify the shortcut for KGS to launch only that program in a Java 6 VM.
Download the JAR file so you don't web start it every time.
Step 1: Save this file somewhere sensible. "C:\Program Files\KGS\" Perhaps? http://files.gokgs.com/javaBin/cgoban.jar
Step 2: Right click Desktop -> new shortcut
Step 3: Right click shortcut -> properties
Step 4: Edit the target field so that it points to the Java.exe with the new audio parameter false and the cgoban.jar. For example

"C:\Program Files\Java\jdk1.6.0_38\bin\java.exe" -Dsun.sound.useNewAudioEngine="false" -jar "C:\Program Files\KGS\cgoban.jar"

Tada! Now only KGS runs with the out of date Java.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #12 Posted: Sun May 11, 2014 4:07 am 
Lives in gote
User avatar

Posts: 313
Liked others: 36
Was liked: 63
Rank: KGS dan
KGS: Toge
I've been opening KGS with cgoban.jnlp from desktop (it shows Java 6 splash screen). Cgoban.jar opens KGS too without the splash screen.

I assume that the Java executable it's pointing to is this:
C:\Program Files\Java\jre6\bin\Java.exe

I'm not sure if that's the correct executable. There's java.exe, javacpl.exe, javaw.exe and javaws.exe
Anyway, when I made the shortcut as you said, there was a dos box that flashes briefly on the screen and cgoban didn't launch.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #13 Posted: Sun May 11, 2014 11:36 am 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: KGS 10 kyu
KGS: Level1Dev
OGS: LevelOneDev
Online playing schedule: Whenever.
Can you post your shortcut target strings for both?

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #14 Posted: Mon May 12, 2014 6:39 am 
Lives in gote
User avatar

Posts: 313
Liked others: 36
Was liked: 63
Rank: KGS dan
KGS: Toge
I put shortcut target as follows:
"C:\Program Files\Java\jre6\bin\java.exe" -Dsun.sound.useNewAudioEngine="false" "C:\Program Files\KGS\cgoban.jar"

It flashes a dos box and ends without launching CGoban.

Edit: I forgot -jar in the middle. Now it keeps that annoying dos box open and also opens CGoban. If I close the box CGoban closes too.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #15 Posted: Mon May 12, 2014 12:04 pm 
Gosei

Posts: 1494
Liked others: 111
Was liked: 315
I would have thought you could have closed the dos prompt without killing cgoban. Strange that they seem to be linked..

Actually, I've been thinking of including this solution in the help wiki for KGS - but is it too technical?

_________________
North Lecale

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #16 Posted: Mon May 12, 2014 12:27 pm 
Lives in sente
User avatar

Posts: 842
Liked others: 180
Was liked: 151
Rank: 3d
GD Posts: 422
KGS: komi
Toge wrote:
I put shortcut target as follows:
"C:\Program Files\Java\jre6\bin\java.exe" -Dsun.sound.useNewAudioEngine="false" "C:\Program Files\KGS\cgoban.jar"

It flashes a dos box and ends without launching CGoban.

Edit: I forgot -jar in the middle. Now it keeps that annoying dos box open and also opens CGoban. If I close the box CGoban closes too.


Use javaw.exe - that doesn't open the dos box.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #17 Posted: Mon May 12, 2014 12:34 pm 
Lives with ko

Posts: 159
Liked others: 5
Was liked: 36
Rank: EGF 3d
Alternatively, I think you can use javaws.exe on cgoban.jnlp file, without the -jar option.

Top
 Profile  
 
Offline
 Post subject: Re: Alternative Java Runtimes
Post #18 Posted: Tue May 13, 2014 1:48 am 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: KGS 10 kyu
KGS: Level1Dev
OGS: LevelOneDev
Online playing schedule: Whenever.
Thanks quantumf! I forgot to add javaw.exe to the shortcut, because I do everything from command line while developing more often.

kivi wrote:
Alternatively, I think you can use javaws.exe on cgoban.jnlp file, without the -jar option.


I remember fixing this on my Desktop and having problems with javaws "fixing" my shortcut on the desktop and I ended up on Java 7 again anyways. I could be wrong but I seem to remember there being problems using javaws and the shortcut remaining relevant.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group