Jump to content

Do Java apps need it pre-installed?

- - - - -

  • Please log in to reply
17 replies to this topic

#1
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Hi all.
I want to develop a program, but I want to make it cross-platform and portable. I was gonna use wxWidgets with C++, but I was also thinking of Java.

Do all Java applications need to have Java pre-installed? I want to create an executable, that I can run and test on my PC, and then run it the same way on a fresh installation of the same OS. wxWidgets works the way I mentioned because all the data it needs is in some files that I need to carry with my executable. Is there a way I can do the same with Java?

Thanks, Mike.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#2
Xylyze

Xylyze

    Newbie

  • Members
  • Pip
  • 8 posts
Yes you need to have Java installed to run Java programs/apps.
The closest you can get to an executable with Java is using a .jar file.

How are you going to distribute the program? You might want to look into Java applets.
Hope this helps a bit.

#3
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
There is 3th party software that wraps java jars in an exe.. so on windows systems it doesn't HAVE to be installed if you send your jar trough the software...
Possibly some other software exists for other operating systems... No idea.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
There is also a standalone version of JRE on portableapps.com that you could use.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
lethalwire

lethalwire

    while(false){ ... }

  • Members
  • PipPipPipPipPipPipPip
  • 748 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP
What's wrong with using wxWidgets?
In any case, you said you'll have to also carry around a few extra files to make your c++ run on any platform correct?

It is the same case with a java application except you'll need the Java Runtime Environment (JRE). (Roughly ~10-25MB)

Usually, a 3rd party software that wraps a java application makes a call to the JRE.
If you did want to wrap the application, it would most likely be more complicated and would ruin your portability goal.

As far as portability(Cross-platform'ness), it also depends on what systems you are transferring your applications to.

Edited by lethalwire, 15 December 2010 - 06:42 PM.


#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
In my logs from 2006-2011 reported Java installation rates went up quite a few hundred percent among Windows users, it is safe to say a computer-literate audience will have it installed if they are your target for your applications.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
wxWidgets has a lot of strange bugs. I'm kinda sick of it.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#8
mnirahd

mnirahd

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 330 posts
Hi,

Yes Java is portable, and you can do it in java.

Yes Java needs to have java runtime installed to make its class run properly.

I hope this answers your questions.

Munir

#9
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
Sorry but it doesn't. I said I want something that I can run on a fresh system, without installing any kind of apps to make it work.

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#10
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
You are basically asking "Can I run a python bytecode without a python bytecode interpreter?" , it just does not work out. You can however scrap the bytecode all together (of which JRE has to be there to run) and compile it into nativecode (maybe IBM VisualAge for Java and Visual Café ship with them) although I do not know their costs.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#11
AdvMutant

AdvMutant

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 438 posts
I'm looking for something like MicroASM. It weights only 1.08MB, but it has GUI. I'm looking to compile a program this way, so it'll run without asking for anything to be installed while still begin light. It's possible that it was compiled with VC++ or VB 6.0 or older, those produce great light files that can run on different Windows machines independently. I want a language that can do this on both Windows and Linux. Am I clear now?
Is there a way to compile VB\VC++ 6.0 apps for a Linux target?

Posted Image
There is no problem that cannot be solved by the use of high explosives.


#12
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
You must understand MicroASM relies on VB6 with runtimes that are not installed by default on versions of Windows. VB6 is a scripting language, and it is not a compiled language, it purely relies on external runtimes and libraries from Microsoft and hense is not portable without something like Mono. You can use C++ and a static library such as libGTK, this is all people have done to do minimal porting work, but no dependencies other than the in-place DLL.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users