Running java without installing jre? - deployment

As asked and answered here, python has a useful way of deployment without installers. Can Java do the same thing?
Is there any way to run Java's jar file without installing jre?
Is there a tool something like java2exe (win32), java2bin (linux) or java2app (mac)?

You can use Launch4j for this. Well documented and easy to use. While the resulting program still needs a JRE to run, you don't have to install the JRE on the target system. You can just copy it with your application and tell Launch4j were to find it or just wrap it up with everything else.

For creating native executables, you can use Excelsion Jet, which compiles Java to native code. We used it for a project at work, and we had to perform zero modification to the original source code (which targetted Sun's JDK).

you can embbed the JRE inside your application and create a setup or installation for your application.

You can have a look at
http://www.bearcave.com/software/java/comp_java.html
You might get it what you want.

You might want to check out how Eclipse does it - it has a native .exe that can use a local (to the installation) JRE.

You might be able to get some luck with GCJ - haven't tried it myself.

You can do it with NetBeans and a couple of tools. The result is a standalone installer that packages everything you need, so your software can run without installing JRE. It is also completely portable, because it install your software on AppData, that is, it does not need privileges to be installed. Maybe you can even configure the installation path, or you can install it on your own PC, locate the folder and copy it to distribute your software in that way.
Check the Answer I made on different post

You can use jlink to create your own customized jre which would contain only those dependencies which are needed for execution. This deployment method is really efficient. please follow **this**link for one such example.

Related

How to get the executable from Github

How to get the exe from https://github.com/tsenart/vegeta/releases in order to test in windows?
This says I could find the .exe in this link but I don't.
I am trying to load test the apis in windows, as a start.
I do no know Golang and this project is developed using Go.
I would appreciate any directions on how to go about this. Thank you
For this version they didn't provide an executable for windows. If you check one minor version lower you find a .zip with an executable in it. If you need v12.8.4 you could write the people of the repository or just compile the code by yourself.
It looks like they only have executables ready to download for MacOS and linux on the newest version.
Version 12.8.3 however has a windows download.

JavaFX exe bundling for x86 windows systems

usually I deploy my Java apps as a bundle which contains the JVM, so there's no need to install a JVM on the system.
Btw: This is no jnlp applet, this is a normal Swing Application.
I did this using ant's fx:deploy. This already works for 64bit systems.
My problem is, that I want to deploy this application to a 32bit system and don't get it to work.
Here's what I did:
I've set up a clean Windows 7 (32bit) instance and installed a 32bit JVM. Now i ran my ant script to build a bundled Java app and it built a App.exe.
But when I tried to start this exe by double clicking, I get the following message box
If I click OK, I get another message box
After this the app is terminated.
I did not find anything searching the web relating to bundling for 32/64 bit systems.
So I would be very glad if someone can point me in the right direction.
Many thanks in advance!
Greetings, -chris-
Looks like a known bug fixed for an upcoming JavaFX version (currently known as 2.2.40):
RT-25715 The Windows launcher generated by the packager fails to load msvcr100.dll on 32-bit OS
RT-22610 .exe created by fx:deploy can't be executed due to missing msvcr100.dll
On the bug case, the user mentions a work-around:
If I give a try to the workaround documented in RT-22610, which is to copy runtime\jre\bin\msvcr100.dll side to my application's launcher binary, it fixes it.
I think the bug is fixed in JDK 8, so another possible work-around is to download a JDK 8 early access release and use the packaging tools from there to package a Java 7 application (though I have never tried that and am not sure if it would work).
Just a small modification to #jewelsea's Fix:
copying msvcr100.dll into the app/ folder instead putting it right next to the exe also works, and at least it is somewhat hidden away then.
If you're generating an MSI you can hack the WXS file used by WIX to automatically copy msvcr100.dll into the app folder. Making FX Deploy verbose will tell you where it's putting the temporary WXS file you can copy and modify and use to override the WXS like you would the program icon for example.

How to enable autocomplete in GoClipse?

The instructions how to install GoClipse have been followed.
I'm not getting any autocomplete stuff happening at all, either for local packages that I write, for built in stuff, or for GAE stuff (I have downloaded Go src to the SDK folder as the wiki states).
Are there any settings that I can check to ensure it is set up correctly? Is autocomplete supposed to work in the current version?
As the GoClipse with AppEngine article you linked to says:
We assume the reader has a working copy of GoClipse running in their Eclipse environment.
so that’s not the article you want to refer to. Instead, check for GoClipse.
The auto completion is named content assist in eclipse. The GoClipse features state:
Now delivered with content assist via Gocode for Windows, OS X 64bit, and Linux 64bit.
Gocode is an auto-completion daemon. So you will also have to install and run that one besides your eclipse + GoClipse.
There is a bug in the current version of Goclipse for the Linux platform. It currently delivers a prebuilt version of gocode for Windows, 64 bit OS X, and 64 bit Linux. I have only been able to test it locally with limited resources, so I really depend on users to report the problems they find at:
http://code.google.com/p/goclipse/issues/list
If you are having problems, I urge you to download and install gocode into your $GOROOT/bin directory and see if that helps. Otherwise, the fix will come in the next release in a few days.
Also, sorry for causing you any trouble and thank you for trying Goclipse.
If you are not using a gocode upstream (but the one shipped with Eclipse) on Linux you are also no be able to build your application with CRTL+F11, although just clicking in Run->Run is going to work.
So, I strongly recommend to update your gocode on Linux, as simple as:
$ sudo GOPATH=/opt/go/ go get -u github.com/nsf/gocode

netbeans c++ deployment

I had developed a small program in netbeans using c++. I need to know how can i deploy/run the package on another linux system
Abdul Khaliq
I have seen your code, you probably missing XML files in the current folder... where the executable is located... paste then and then run as ./your-executable
I recommend that you use a makefile to recompile on your target machine which will ensure that your program is deployed properly.
You should use a makefile as suggested. I know that NetBeans can generate one, but it's been a while since I last did so. Maybe this can help: http://forums.netbeans.org/topic3071.html
Typically, once compiled, your executable will need several libraries. Chance is that those libraries will also be available on the target linux system.
Thus, you can simply copy your executable over to the other system. If you run ldd on your executable, you should see the list of libraries your executable is dynamically loading. Those libraries should be available on the target system as well.
In case your executable makes use of resources such as images and other binary files, you can use a resource system (e.g. Qt Resource System) and compile those binary files into your executable.
The easiest way to test is to do the copy, run
ldd yourExecutable
on the target system. It will tell you if you are missing any library. Install those libraries using the system package manager.
Of course, you also have the option to statically build all libraries into your executable. However, this is not recommended since it makes the executable too large and complicates matters.
What type of package is your netbeans compiler creating? deb,rpm? If you are moving the package to a different linux install you will need to use that distributions package type. Ubuntu - deb
Fedora/Redhat - rpm
etc...
I'm not sure how you change this in netbeans but I'm pretty sure it has the ability to. A google search could help you more.

Launching an arbitrary executable over a file on Netbeans

We want to add command-line support to Netbeans, as in being able to run any program (using the full path of the current file as the argument) directly from the IDE. The same way you can do it already on Notepad++ with the Run tool.
Apparently there is a plugin called VCS Generic Command-Line Support that offers this functionality, but when we try to install it we get this error message:
Some plugins require Master Filesystem to be installed
The plugin Master Filesystem is
requested in version >= 1.1 but only
2.15.2 was found.
Any ideas?
EDIT
I Did some googling as you got me interested pretty much everything i found was in refernce to NetBeans 5.x or below... Im thinking maybe its not compatible with 6 - but thats just a guess.
Looks like a version incompatability with "Master Filesystem". Maybe they are checking the version improperly or perhaps they really mean it needs to be 1.x >= 1.1. Do you have the newest version of VCS Plugin?
As an aside if Im going to have to chek this out... ive been dying for external tool support like in my beloved Eclipse :-)