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.
17 replies to this topic
#1
Posted 14 December 2010 - 10:47 AM

There is no problem that cannot be solved by the use of high explosives.
|
|
|
#2
Posted 14 December 2010 - 11:04 AM
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.
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
Posted 14 December 2010 - 11:19 AM
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.
Possibly some other software exists for other operating systems... No idea.
#4
Posted 15 December 2010 - 01:55 PM
There is also a standalone version of JRE on portableapps.com that you could use.
#5
Posted 15 December 2010 - 05:38 PM
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.
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
Posted 15 December 2010 - 07:36 PM
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.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#7
Posted 15 December 2010 - 09:50 PM
wxWidgets has a lot of strange bugs. I'm kinda sick of it.

There is no problem that cannot be solved by the use of high explosives.
#8
Posted 16 December 2010 - 03:51 PM
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
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
Posted 16 December 2010 - 09:18 PM
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.

There is no problem that cannot be solved by the use of high explosives.
#10
Posted 16 December 2010 - 09:28 PM
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.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#11
Posted 16 December 2010 - 09:37 PM
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?
Is there a way to compile VB\VC++ 6.0 apps for a Linux target?

There is no problem that cannot be solved by the use of high explosives.
#12
Posted 16 December 2010 - 10:04 PM
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.
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


Sign In
Create Account


Back to top









