Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

native converters for Swing java applications

Posted on 2002-06-18
23
Medium Priority
?
396 Views
Last Modified: 2013-12-29
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
0
Comment
Question by:borbjo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 3
  • +5
23 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7089778
listening...
0
 
LVL 4

Expert Comment

by:pellep
ID: 7090976
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.
0
 
LVL 92

Expert Comment

by:objects
ID: 7091657
> 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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 92

Expert Comment

by:objects
ID: 7091694
If it runs on a web interface then the following may help:

http://creamtec.com:30422/webcream/
0
 

Author Comment

by:borbjo
ID: 7091880

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
0
 
LVL 92

Expert Comment

by:objects
ID: 7091898
> 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.
0
 

Author Comment

by:borbjo
ID: 7091901

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
0
 
LVL 92

Expert Comment

by:objects
ID: 7091905
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.
0
 

Author Comment

by:borbjo
ID: 7091909

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
0
 
LVL 92

Expert Comment

by:objects
ID: 7091920
> 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.
0
 

Author Comment

by:borbjo
ID: 7091923

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
0
 

Author Comment

by:borbjo
ID: 7091928

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
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 7092171
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.
0
 

Author Comment

by:borbjo
ID: 7092250

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
0
 
LVL 2

Expert Comment

by:mariuso
ID: 7092301
gcj 3.1 can be a solution. But is not working for windows (if i'm well informed.)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 7092303
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
0
 
LVL 92

Accepted Solution

by:
objects earned 102 total points
ID: 7094171
> meaning IE (which are "most browsers") don't come with
> any Java support at all

It's been dropped from XP, but all other Win versions still have one.
Hopefully not delivering XP with Java support will result in people installing the plugin and provide some decent Java support :)

> besides, this is an application, not an applet.

They still have JVM (albeit a shitty one).

> So, we're kinda stuck it seems :/

You are a bit, I doubt a native compiler will help you for the reasons discussed above. And if you go to any Java forum you'll find page of discussions about it, but no silver bullet.

One option may be to lobby your client on the values of installing Java and convince them that it's the way to go. As a Java company this is your duty :-)
And if their running the app on an intranet, then the plugin can be made available locally on their intranet and web based install setup which would cut the download time right down. You could also make your app available via WebStart to make the Java option more attractive.

Failing this I don't see any way around a rewite, sorry.
0
 
LVL 1

Assisted Solution

by:wgilster
wgilster earned 99 total points
ID: 7174805
You mentioned this:
>An alternative may also be doing it in some .NET way, but I don't want that.
But it really doesn't make sense to me.
Instead of installing the JDK, they are installing the .NET run times.  It seems like your not gaining any ground by going that route.

The only way that you KNOW that .NET is installed is if ALL your clients own XP.  Any other OS is not garenteed to have the .NET runtimes installed.  Just because .NET can be packaged into your application doesn't mean that your going to have a leaner program.  Remember the days where 2 line VB programs were 3Mb.  .NET only makes things worse.

Every modern development language today has library requirements, Java is just another one of them.  

>haven't found anyone that can handle Swing independently of Sun's JRE yet.
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?
0
 

Author Comment

by:borbjo
ID: 7184507
>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
0
 
LVL 16

Assisted Solution

by:heyhey_
heyhey_ earned 99 total points
ID: 7184528
> They all support the AWT, but not Swing.

Swing 1.0.3 is implemented in pure Java so you can compile it like any other Java .class files.
0
 
LVL 1

Expert Comment

by:wgilster
ID: 7185237
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.
0
 
LVL 35

Expert Comment

by:girionis
ID: 8860514
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
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question