Java html renderer wrapper & crossplatform issues

Java html renderer wrapper & crossplatform issues

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Java html renderer wrapper & crossplatform issues

Post by AF »

Recently I looked around for replacement html renderers that supported CSS for java and I wasnt impressed by the pure java solutions I saw.

However I noticed that the JDesktop project has a Java renderer setup that makes use of a native browser embedded in a java component. The problem here is I am not sure.


But:
Note: To run this demo, you must use Internet Explorer or Mozilla (1.4 or a higher version) on Windows platforms; use Mozilla (1.4 or a higher version) on Linux/Unix platforms.
Opinions? This would solve my problem but it may mean problems for Mac and I'm not sure mozilla 1.4 will be available on every non windows setup........
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Post by HAARP »

I'm pretty sure every modern browser is Mozilla-1.4-"compatible"
Even Mac has a browser based off the Gecko engine (used in Firefox)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

https://jdic.dev.java.net/

Thats the library
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Depends on user setup...

KDE got there own built-in html rendering, believe u can choose a different backend though last time i checked.

Also i believe Mac used the same code from kde html rendering for thier own web browser.

And then u got those Opera browser peep :twisted:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Q. What are the supported platforms?
A. Briefly, Windows, Linux and Solaris. Refer to the JDIC System Requirements for specific versions and distributions. Some contributors provided patches and binaries for the support on Mac OS X, FreeBSD and other platforms. Refer to the Release Notes of 0.9 and Mac OS X and FreeBSD support discussion threads for more information. There are still gaps for Mac OS X support waiting to be closed. We'd very much welcome any volunteers or effort on that.

Max OS X support it seems is JDIC 0.8.4, and doesnt include support for the things I need it for.......
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

I just checked, I got Mozilla 1.7.12 installed here on Ubuntu Dapper 64 bit (so it's available at least), but I'm pretty sure not everyone on linux has it.

I don't think it was installed by default though, probably some other program I installed depends on it.
Word
Posts: 80
Joined: 12 Jun 2006, 09:59

Post by Word »

Same deal with me as Tobi.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

I dont understand why you couldnt simply open the user's default browser inside of the window?

For some systems (IE Linux which i havent really spent time with) that may not necessairly support this, maybe you coudl have a prompt upon first-time running saying "please specify browser location") ?
User avatar
mehere101
Posts: 293
Joined: 15 Mar 2006, 02:38

Post by mehere101 »

That raises problems with interfacing between Java and god knows what. The best Idea is still to use a java based html rendering system.

I don't actually know of any that I tested a while back that had a full html 4 implementation
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Openign the users default browser inside the window is a commonly used ActiveX trick. This lobby has to be crossplatform and such tricks be ti using ActiveX or not rely on Native code, aka bounding AFLobby to specific platforms.

In this case it would break Mac OS X compatability.

Whats more not everyone on linux may have mozilla browsers installed which would break the setup. Some may use konqueror instead or Opera....
User avatar
mehere101
Posts: 293
Joined: 15 Mar 2006, 02:38

Post by mehere101 »

I think the first question is: what platforms do you want to support? Using a gecko emedded renderer I see it possible to reach Linux/Unix, Mac OS X, Windows, Solaris, etc.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Actually, a gecko renderer only means linux+windows.

You see your not embedding the gecko renderer at all, your embeddins the specific browser that uses it.

Also the code has to call c/c++ code to do so which means OS specific embedding implementation.

So I need to write c/c++ to embed the mozilla browser in Mac OS X and solaris and every OS but windows and linux.

Then I have the problem that theres a very good chance the user wont be running firefox on Mac OS X and they might not be doing so on linux either.

So I need to support safari too and konqeuror and all the other browsers.

So I've done all this and suddenly I look at the forum and realize spring 2.0 has been released, people are comparing screenshots with the next supcom expansion pack and I've missed masses of time, my AI is years behind schedule, and the other lobbies are so far ahead I would be best dropping AFLobby alltogether.


As I think people have gathered I dont think this is the option right now and I am thinking I should move away from html driven components for most things, not that I dont have a use for it.
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

I use spring gui as only launcher, but I don't see why anyone would want to have full webbrowser functionality in a spring related application.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

AFLobby is as its obvious by now, a complete Lobby client, and a lot of integration is planned with certain sites and features.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Why not just get the sites in question to throw together a xml file for lobby clients ?

More simply for various lobby clients to display the data & will look nicer on various lobby clients.

Not to mention alot more light weight, than having a web browser running aswell. i.e its a lobby client that prob be running while u are playing spring online, dont want it to eat up resources were possible IMO

Also the new settings program will have a xml file for options data for the particluar version of spring. If u implentment using this, u already got xml parser code in your lobby client.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

java already ahs built in xml parsers.

And resorting to xml to avoid loading html, parsing it, then formatting it into html and displaying it is a bit of a loop?

However I've been discussing things and there will be simple data export available such as the xml you mentioned.
Post Reply

Return to “Linux”