Knute Snortum wrote:If your Maven project builds a jar file, it's pretty simple.
1) build jar
2) copy jar file to new computer
3) from the command line, type java -jar name_of_jar_file
David Henstridge wrote:How can a 4.5 M .jar file run an app that took a 98 M executable to install and then run a .jar?
Campbell Ritchie wrote:Where does that jdesktop class come from? The commonly used group layout class is this one. I can think of two possible explanations:-
1: You need a JEE/JDesktop class, in which case you will need to install JEE/JDesktop on the other computer. 2: An IDE has misled you into by presenting you with an enormous dropdown list of potential imports and it is very easy to click the wrong one. I have done that many times myself. I notice that group layout does actually have a Group inner class. There may be other explanations.
Campbell Ritchie wrote:If you look on the downloads page, you will see that the JRE8u73 download for Windows® x64 is 54.45MB. I don't know what the other parts of the unicentaopos program were. I always use that sort of download link for my Java® updates.
You get a lot more than the JVM when you install a Java® runtime. You get 4240 compiled classes in the rt.jar file, and lots of other tools which you may not be using at the moment.
David Henstridge wrote:
Campbell Ritchie wrote:If you look on the downloads page, you will see that the JRE8u73 download for Windows® x64 is 54.45MB. I don't know what the other parts of the unicentaopos program were. I always use that sort of download link for my Java® updates.
You get a lot more than the JVM when you install a Java® runtime. You get 4240 compiled classes in the rt.jar file, and lots of other tools which you may not be using at the moment.
When I installed unicentaopos (from the installer) on a third machine and ran the app, all was OK. It ran. But it didn't have the modified code that I programmed (a few lines).
So I guessed what to do. I copied over the new (modified) .jar file into the app's main folder and tried running the app. It ran the old code.
I tried copying over some other .jar files, but still it ran the old code.
I stopped my experimenting at that point (on this third machine).
So now I am working with the second machine that only has JRE on it, not the unicentaopos installer.
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Les Morgan wrote:I have found NetBeans to be superior in may things, including the run-ability across platforms of the executable JAR's it makes. In every case that I have used NetBeans, I have only had to take the JAR to an other computer that has had a compatible JRE installed properly and double click the file, it runs seemingly as double clicking on an EXE file would, or entering the name of the JAR from the command line and hitting enter.
The IDE you use is your preference, but I've been banging around these things since pre '99 and I've not found a more convenient IDE.
David Henstridge wrote:I just tried double-clicking on a couple of .jar files that were created and neither is working.
Paul Clapham wrote:
David Henstridge wrote:I just tried double-clicking on a couple of .jar files that were created and neither is working.
It's normal for that to happen in Windows systems, because that's the default which Windows sets up for executing files with .jar extensions. Apparently installing Netbeans changes the setup so that executing a .jar file does what you'd expect it to do, but you can do that change yourself if you like. (Only I don't remember how to do it, because I haven't had to do it for many years.)
All things are lawful, but not all things are profitable.
David Henstridge wrote:
Les Morgan wrote:I have found NetBeans to be superior in may things, including the run-ability across platforms of the executable JAR's it makes. In every case that I have used NetBeans, I have only had to take the JAR to an other computer that has had a compatible JRE installed properly and double click the file, it runs seemingly as double clicking on an EXE file would, or entering the name of the JAR from the command line and hitting enter.
The IDE you use is your preference, but I've been banging around these things since pre '99 and I've not found a more convenient IDE.
Thanks for jumping in Les.
It's encouraging to learn that my NetBeans .jar should run as long as JRE has been properly installed.
I just tried double-clicking on a couple of .jar files that were created and neither is working.
I'm thinking back to last week when I did the coding with Netbeans.
It took some amount of finesse to get the program to work properly.
Until I had the Windows environment set up perfectly with paths set to Maven and few other things, it wouldn't work.
So I'm wondering if the Windows environment needs to be configured on the 2nd PC before this .jar will run?
Does it need to know anything about Maven and its files?
What exactly is supposed to happen if the .jar file is working?
Will it create the entire working environment that was created when I ran the 98Meg unicentaopos-3.91.3-windows-installer.exe?
The environment included the c: folder for the unicenta files and the c:\user\unicenta folder with its database files.
TIA
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
All things are lawful, but not all things are profitable.
Knute Snortum wrote:From what I can see, Derby is a lightweight, small-footprint DB, while MySql is a full-blown DB. So the main differences are likely that Derby is easy to use and doesn't take up a lot of memory. MySql is better when you have lots of people hitting the DB all at once or you need features that aren't in Derby.
Can you think of a business that doesn't need a Profit Report?
All things are lawful, but not all things are profitable.
David Henstridge wrote:Can MySql be used as a stand-alone also, and if so what would the benefits be over Derby?
All things are lawful, but not all things are profitable.
Knute Snortum wrote:"Does not run" means what exactly?
David Henstridge wrote:do not function/run/work.
Knute Snortum wrote:
Can you think of a business that doesn't need a Profit Report?
A non-profit?![]()
Paul Clapham wrote:
David Henstridge wrote:do not function/run/work.
Meaning what, exactly?
Paul Clapham wrote:Have a look at our FAQ entry It Doesnt Work Is Useless and hopefully you'll understand what people are asking here.
Dave Tolls wrote:OK, so it's the case when you run the installation thing and then try and replace the existing jar file (wherever it was installed) with a new version you've cobbled together that it doesn't run.
So....where has the code been installed?
What is the directory structure?
How do you execute the code?
Is it a batch file?
Command line?
Double click on something?
I'm hazarding a guess here, but I expect whatever it is that's used to launch the app is not using the jar files you think it should be, in fact that's the only answer. It's possible something has been tucked away inside APP_DATA.
David Henstridge wrote:You my dear sir are a very smart man.
![]()
Consider Paul's rocket mass heater. |