• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how can we make a swing application executable for windows?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can an application developed using swings can be made executable?
And is it possible to upload it on an internet server?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best way to make a Swing Application or and JAVA app executable is to use JAR files. java.sun.com has a tutorial on making JAR files.
Currently, there is no solid way of making an EXE out of a group of CLASS files.
Someone may tell you that Symantics IDE allows you to do this, but I have looked at the IDE and have not seen a way.
------------------
Happy Coding,
Gregg Bolinger
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dare I say it? Microsoft Visual J++...
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what about using any of the Java installers that installs ( atmost copy files) & then starts java *...which eventually opens the app ?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to distrubute my java app so that the end user doesn't have to have a jvm installed?
Just a self contained exe?
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In the absence of making Windows executables (which detract from the cross-platform nature of Java anyway) I tend to just use a batch file to start my Java apps on Windows, than all you have to do is double click to run it. eg: save following as "myapp.bat" or whatever...

I think it sort of defeats part of the objective to avoid using the Virtual Machine doesn't it? Why not just code in C++ or something platform specific?
regards,
Ben
 
K Glenn
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From my experience a lot of windows users have difficulty in running java apps.
I would like the option to distribute without the jvm for windows.
I use Java for it's cross platform abilites for server side applications (write on windows - run on unix) - but I would like platform specific options for desktop applications.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are currently only three ways of producing an exe ( that I know of... ) :

  • Translation to C/C++ - the Gnu Java compiler works this way. Unfortunately, I think it is for Unix only and doesn't support some of the newer stuff like Swing...
  • Wrapping everything together - Most of the java "compilers" packaged with IDEs work this way. They don't really compile the class... all they do is have a small JVM, add all the classes as resources to it, and have the exe launch the JVM inside it with the classes specified.
  • Other ways - Some other high end ( i.e. really expensive ) Java compilers do other things to get a java executable... unfortunately, most don't put the details of how they accomplish this on their web sites, and are too expensive for me to try out...


  • From my experience a lot of windows users have difficulty in running java apps.



    LOL!!! That's because a lot of windows users are stupid...

    Why not include the JRE with your app? It'll make the download a little bigger, but at least you'll know that the user will have an up-to-date JVM... then just include a .bat file like Ben suggested above for the icon on the desktop to start it up...

    I've heard that InstallShield works pretty good for this type of thing...

    -Nate
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, there are a few decent JAVA to Binary converters out there. They are, for the most part, pretty expensive.
Basically, what they do, it compile all the JAVA class files that come with the JDK to a type of DLL. Then they compile your class files to an EXE but take all your library imports and include them as DLL's in the package that you would release and distribute.
As far as I know they work pretty good, but like I said, they aren't cheap.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by K Glenn:
Is there any way to distrubute my java app so that the end user doesn't have to have a jvm installed?
Just a self contained exe?


use installanywhere (www.zerog.com)
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't really have to install the JRE, just include it in a subdirectory with your application.
Then, create a batch file that launches your app using the subdirectory, and includes the -Xbootclasspath variable to specify the location of the system class files.
batch file start command:
./jre/bin/java -Xbootclasspath:./jre/lib/rt.jar <application>
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does VisualAge for Java support native compiling?
 
reply
    Bookmark Topic Watch Topic
  • New Topic