• 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

Creating executable

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks a newb here!

I have somehow managed to successfully re-build a Mavenized java project, changing a few lines of code.
The new re-build runs nicely on my computer.

I would like to now run the same rebuild on a second computer and don't know how to do this.

I have installed only jre-8u73-windows-i586 on the second computer.

If someone can give me step by step instructions on how to do this I would be very happy!

TIA!
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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




Thanks for your reply Knute!

From all the researching I did before posting here, that is what I already tried (your suggestion above).
I executed it from the command line and got the following result:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.


c:\Users\David\temp>java -jar unicentaopos-3.91.1.jar
Mar 16, 2016 9:37:52 AM com.openbravo.pos.forms.AppConfig init
INFO: Reading configuration file: C:\Users\David\unicentaopos.properties
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesk
top/layout/GroupLayout$Group
at com.openbravo.pos.forms.JRootFrame.initFrame(JRootFrame.java:62)
at com.openbravo.pos.forms.StartPOS$1.run(StartPOS.java:129)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
rivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Gro
up
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
 
David Henstridge
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Besides the fact that the above .jar didn't run properly, here is what I don't understand.

How can a 4.5 M .jar file run an app that took a 98 M executable to install and then run a .jar?

The initial installer was unicentaopos-3.91.3-windows-installer.exe (98 Meg) which was installed on
my first computer.

It hasn't been installed on the second computer.

TIA!
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
    Marshal
    Posts: 79153
    377
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    …and welcome to the Ranch
     
    Saloon Keeper
    Posts: 15490
    363
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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?


    The installer probably came with a copy of the JVM.
     
    Campbell Ritchie
    Marshal
    Posts: 79153
    377
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.




    Thanks for helping out Ritchie and also for the welcome!

    Searching the code in Netbeans I found the following at the top of a long list of jdesktop.layout references:

    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); [position 880:13]

    I don't know if that tells you where the jdesktop class comes from?


    Not sure what I should look for next.

     
    Campbell Ritchie
    Marshal
    Posts: 79153
    377
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    That's a pleasure
    That has obviously been added automatically by the GUI builder in NetBeans. I couldn't find such a file in resources.jar nor rt.jar in my jre/lib installation folder, so I don't know where it comes from. It may have been installed with NetBeans.
    I shall try moving you to our GUIs forum. There is bound to be somebody who knows.
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.

     
    Rancher
    Posts: 1093
    29
    Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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:

    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.

     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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














     
    Marshal
    Posts: 28177
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.)
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.)



    Thanks Paul! So if I understood you correctly, if Netbeans were installed on this second computer the .jar file would open.
    I would prefer to do the 'change yourself if you like' approach if for no other reason than to save disk space on a 32G machine.
    If anyone knows how make the change so the .jar executes, I would appreciate learning the secret.

    When I was just playing with the computer a few minutes ago as I was clicking and holding down on the file I noticed that the file extension changed from .jar to executable (Win 8.1).
    I thought this might wake up Windows and run the file but no such luck.




     
    Paul Clapham
    Marshal
    Posts: 28177
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    "Set windows file associations" is your web search phrase. I used to know how to do that in old Windows versions but I can't find it in Windows 10 which is what I have now, but I'm sure there will be numerous people on the web who want to tell you how.
     
    Knute Snortum
    Sheriff
    Posts: 7125
    184
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Try Settings -> System -> Default Apps.
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Paul and Knute.

    I'm back in business!

    I'm not really sure what happened exactly but here's what I did.
    I checked the file association for .jar files and it was set to Java.

    So I was still puzzled.

    I was trying to run off a USB drive which had the file (.jar), and which shouldn't have been a problem.

    I created a temp folder in c:\program files and copied the .jar over there.
    But I decided to try something else at the same time. I also copied over two folders:
    \data and \Lib which had a ton of data and executables.

    This time the .jar ran perfectly!
    And best of all it ran with my modified code.

    So in the end I'm not really sure what did it.





     
    Les Morgan
    Rancher
    Posts: 1093
    29
    Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
    • Likes 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I am not familiar with that installer, but if you have an executable Jar, then it should have everything in it to hook into the JRE already install on the system--regardless of the OS you are running on. In Windows you have the nicety, and this is one of very few good things I have to say about Windows, that you get default program handlers and the parameter list is set in the registry along with that default program, so when you double click on a JAR, and you have a properly installed JRE, then you get a running app that is seamless to behold it's operation, the same happens if you type it on the command line and hit enter. (BTW: this does not work on many machines because the JRE does not install right--Windows has the dirtiest registry system known to man (IMO), and almost nobody ever cleans up after a failed install, uninstall, or normal registry errors--it just gets dirtier and dirtier)

    For this to happen you have to have an appropriate "classpath" set according to your version of the JRE installed, that is why I always say "properly installed JRE", and also your Windows "path" variable set properly so Windows can find the executable and other needed files for Java.

    Now as far as the environment--No, it does not create your environment. It has everything in it that you declared as a resource--mainly your packages and their contents and any 3rd party packages that you included as part of your project. Your DB and its engine--probably not. JAR's cannot be written to, and believe me I have tried may schemes to all me to do it, so unless your DB is read only, it really doesn't make sense to include it in your JAR.

    If you have DB, then you will need to have that installed on your destination box. Also any destination files will need to be created or copied to, and uncompressed, the destination box.

    I've tried a lot of different installers, and about the only thing I can say for sure is: none of them are going to give you want you need every time. In Java, and other languages, I have just come to the conclusion that as part of the design, I do the analysis of what I will need to include as part of the environment, you can put it in a JAR file that is not executable and just unpack it or use ZIP, and what is my project executables and reference materials--I put them in the executable JAR or if there is a lot of reference material (read only) I will put it in a separate JAR.

    Have fun, deployment can sometimes be more challenging than the project development itself.

    Les

    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














     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks for that detailed reply Les. It was very informative for me, someone who is just getting their feet wet with Java.


     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I had the opportunity to investigate this further, as I am setting up the app on a few computers.

    Because I made a couple of changes at the same time I wasn't sure what it was that did the trick.
    Now I know.

    By simply installing Java (JRE) and the .jar file the app would not run (install).

    Today I added 'just' a /lib folder containing 139 .jar files to the same folder that the main
    .jar file was located and it ran!

    Questions.

    This app can run as a Derby database or MySql database.
    Can someone please tell me the main differences between the two?

    So far I've learned that Derby is the default choice for stand-alone, non-networked machines.
    But what are the other differences? Can MySql be used as a stand-alone also, and if so what would the benefits
    be over Derby?

    Right now, when the .jar fires and loads the program (database files have been created)
    and you go into settings, the field to chose the database type (Derby, MySql etc.)
    is blank!

    Does this mean I can still chose my database type?

    TIA!













     
    Knute Snortum
    Sheriff
    Posts: 7125
    184
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.



    Thanks Knute!

    Yes Derby is certainly a lightweight DB.
    It was the default setting with uniCenta so I just went with the flow.

    For the next year at least there will be just one terminal/operator so it could easily do for us.
    What I have learned the past week or so is that MySQL can be customized a lot more than Derby and most users have gravitated to it.

    The thing that bothers me the most at this stage is that of all the 30+ reports offered with Derby, none is a Profit Report!
    They save that report for the MySQL version!

    Can you think of a business that doesn't need a Profit Report?










     
    Knute Snortum
    Sheriff
    Posts: 7125
    184
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Can you think of a business that doesn't need a Profit Report?


    A non-profit?
     
    Paul Clapham
    Marshal
    Posts: 28177
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    David Henstridge wrote:Can MySql be used as a stand-alone also, and if so what would the benefits be over Derby?



    Well, of course. Can you imagine a database which requires you to connect from a different machine? Or which requires you to have more than one simultaneous connection?

    As for the benefits, I have no idea. I'm using MySQL (standalone, by the way) because I decided to do that ten years ago when Derby didn't exist. I might (or might not) make a different decision today but to my mind there's no point in switching to Derby. That's not because of any benefits of either system, it's just status quo bias.
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    OK folks I'm back and have come full circle with this almost!

    Recall my first post where I was asking how to port my .jar file to another computer so I could take advantage of a few lines of code I added to the app?

    After a bit of trial and error I discovered that what was needed (besides installed JRE files) were the .jar file + a bunch of /lib files in the same folder.

    I will be getting a couple of computers set up with the app tomorrow and want to do it the right/best way.

    So to my mind I have two options:

    1. Run the setup file that installs the app and all required files (BTW I discovered that it does not have the JRE files to install as someone here surmised it might.
    Upon installation it checks for the JRE files and if it doesn't find them it attempts to go online and get them. If that fails, it will still continue with the installation.)

    2. Use the approach mentioned above ( .jar file + a bunch of /lib files copied to the same folder, a specific one.)

    Instinctively I would prefer 1. since it seems it would be more complete.
    But..... after further investigation (trying both approaches) I have discovered a couple of things.

    Apart from a missing .bat file and some other small thing, the net result is basically the same, not matter whether 1. or 2. is chosen.

    But here's the thing I don't understand...

    If I use option 2. the app runs my code (which I want.)
    If I use option 1., regular installation, and then copy the same darned .jar file over to the folder
    my code does NOT run!

    Can someone please tell me why?















     
    Knute Snortum
    Sheriff
    Posts: 7125
    184
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    "Does not run" means what exactly?
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Knute Snortum wrote:"Does not run" means what exactly?



    I mean that the three or four lines of code that I added do not function/run/work.



     
    Paul Clapham
    Marshal
    Posts: 28177
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    David Henstridge wrote:do not function/run/work.



    Meaning what, exactly?
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Knute Snortum wrote:

    Can you think of a business that doesn't need a Profit Report?


    A non-profit?



    You must be thinking of an organization?
    A non-profit business would be an oxymoron.
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Paul Clapham wrote:

    David Henstridge wrote:do not function/run/work.



    Meaning what, exactly?




    Execute, compute, do its thing, etc.
     
    Paul Clapham
    Marshal
    Posts: 28177
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Have a look at our FAQ entry It Doesnt Work Is Useless and hopefully you'll understand what people are asking here.
     
    David Henstridge
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.



    Thanks Paul.

    "When posting, don't say "it didn't work". Rather, post at least the following information:"


    What did happen: The *original* uniCenta code ran and when I pressed the '+' key it raised the quantity by 1.
    What you expected to happen and how it differs from the actual result: If *my* edited uniCenta code ran, when I pressed the '+' key, the quantity would have been raised by .5
    The complete and unedited text of any error message you received (be sure to use UBB code tags to preserve formatting, see UseCodeTags). No error messages whatsoever.

    I gave you the nitty gritty specifics above, but really I don't think it was necessary.
    The important thing that I mentioned was that I knew that uniCenta's original code was running, not my altered code.

    My code could have told uniCenta to put up a splash screen, start blinking after 10 seconds, terminate after 1 minute etc.
    It didn't matter really what my code was. I knew the code running was original, unaltered uniCenta code, not my version.










     
    Paul Clapham
    Marshal
    Posts: 28177
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Okay. So, problem solved then?
     
    Rancher
    Posts: 4801
    50
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    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.



    Thanks for helping out Dave!
    You my dear sir are a very smart man.

    I figured out the problem last night before I read your reply.

    Here's what happened.
    I use Total Commander (TC) as my main file manager. It shows two panes, with files/folders in each pane, making copying/moving files a breeze, NORMALLY.

    For the last couple of weeks whenever I copied my custom-coded main .jar file from my desktop (computer A) to my computer B, I thought I was doing just that,
    copying the .jar file.

    But last night I discovered that for some strange reason, Total Commander was showing a created folder and the main .jar file in this folder BUT.....
    when I looked in Window's file manager the folder and file were NOT there in reality!

    I don't know why this happened. I tried copying some other small files and they worked with TC, (showed up in Window's file manager).

    So to make a long story short, my main custom-coded .jar file worked all along. It's just that when I thought I was executing it, I was really executing
    the original .jar file!!!






     
    Dave Tolls
    Rancher
    Posts: 4801
    50
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    David Henstridge wrote:You my dear sir are a very smart man.



    I'll pass that onto Mrs Tolls, it'll give her a laugh.


    Good on getting it working.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic