Link to home
Start Free TrialLog in
Avatar of borbjo
borbjoFlag for Norway

asked on

native converters for Swing java applications

We have a problem; the JRE is too big for our customers.

(yeah, I know, the smallest version is only 5.7mb - but they still feel that this is a "huge barrier" for them).

So, we are looking at some solutons to this problem.

1. Convert our .class files to a native .EXE application, and pack all needed libraries with it (haven't found anyone that supports Swing independently of Sun's JRE - ex; Excelsior JET).

2. Strip the JRE - which is illegal, so we can't do that :|

3. Alternative, smaller VM's; haven't found anyone that can handle Swing independently of Sun's JRE yet.

suggestions?

- bjorn
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

listening...
I seem to recall reading a whitepaper on the latest VisualCafe including a native compiler/linker that supported Swing as well. No guarantees, but check it out.
> the JRE is too big for our customers.

Then why were you developing in Java in the first place?

Only other alternative I can think of besides the ones you already mentioned are to rewrite as a native application.
If it runs on a web interface then the following may help:

http://creamtec.com:30422/webcream/
Avatar of borbjo

ASKER


Webcream? .. I think Google's comment is appropiate:
"Claims to convert Java GUI client-side applications to HTML/JavaScript-based front end with no recoding. [Commercial]"

Claims to .. I don't think so ..

pellep; we're developing in Java because we are a java company. But when our customers heard they needed that plugin, they started backing out ...

An alternative may also be doing it in some .NET way, but I don't want that.

- bjorn
> Claims to .. I don't think so ..

I agree they are bold claims.
I believe they have a trial version if you want to try it out.

> But when our customers heard they needed
> that plugin, they started backing out ...

First thing you should be making a client aware of :-)

> An alternative may also be doing it in some .NET way,
> but I don't want that.

ie. rewrite it.
Avatar of borbjo

ASKER


sorry, my previous comment was to objects, not pellep..

I checked out Visual Café, and yes it does have a native compiler.

From the features matrix:
"Native JDK 1.3 and Java 2 x86 compiler with support for dynamically loaded classes. "

.. doesn't say anything about Swing though.
I'll try to find out more about it and post it here..

- bjorn
You could try porting it to AWT/1.1. Gotta be less work than rewriting in another language.
Or perhaps just getting it working with 1.1 so they only need to download Swing classes.
Avatar of borbjo

ASKER


It's a graphics program.

The program uses Java2D heavily for rotation, scaling, etc. of images and shapes.

so, we kind of need JDK 1.4.0 ...

Also, last I checked the JDK 1.1 download was 11 MB(!) .. maybe I found some strange version or something, but it was on Sun's site ..

- bjorn
> last I checked the JDK 1.1 download was 11 MB(!)

They don't need the JDK, only a runtime.
Plus most browsers come with 1.1 support.
Avatar of borbjo

ASKER


It's a graphics program.

The program uses Java2D heavily for rotation, scaling, etc. of images and shapes.

so, we kind of need JDK 1.4.0 ...

Also, last I checked the JDK 1.1 download was 11 MB(!) .. maybe I found some strange version or something, but it was on Sun's site ..

- bjorn
Avatar of borbjo

ASKER


woops, sorry about that .. I did a refresh to view your message and then it posted mine over again :|

anyway, most browsers - meaning IE (which are "most browsers") don't come with any Java support at all as far as I know - after the lawsuit from Sun. (You know, the whole "Microsoft Virtual Machine" blabla)

besides, this is an application, not an applet.

So, we're kinda stuck it seems :/

- bjorn
Avatar of heyhey_
heyhey_

native compiler will include almost the same amount of code as JRE does. If your app uses java.utl.Vector and javax.swing.JFrame, these classes will have to be included in some form or another with the final distribution.
Avatar of borbjo

ASKER


Hey hey hey :)

which native compiler are you talking about here?

I've testes Excelsior JET, which says it depends on Sun's JDK if your application uses Swing or AWT.

Others I've had a look at have the same problem.

- bjorn
gcj 3.1 can be a solution. But is not working for windows (if i'm well informed.)
I've used (in past) IBM HPJC and Symantec native compilers. Both of them used something like "precompiled" core Java libraries. For example application compiled with HPJC mut be distributed with
- util.hll (for example 1Mb) - it your app uses java.util.* classes
- awt.hll (for example 3Mb) - it your app uses java.awt.* classes
and so on
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of borbjo

ASKER

>I would like to know which VM's don't support Swing.  
>Swing is 100% pure java, based on the AWT, but still pure
>java.  Apparently your looking at VM's that also don't
>support the AWT?

I wrote: "independently of Sun's JRE"  ... and the topic here is "native compilers".

They all support the AWT, but not Swing.

- bjorn
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with heyhey, this statement is immpossible:
>They all support the AWT, but not Swing.

Swing is pure java, that's really all there is to it.  I can see if a native compiler didn't support the AWT it wouldn't also support Swing.  But by it's very definition it must support Swing if it supports all facets of the Java language.  That's why 100% pure Java programs are so beneficial.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this
question is:

- split points among objects, heyhey_ and wgilster.

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer