Application compiles and builds on Netbeans but not as an independent jar file?

Posted on 2011-10-20
Last Modified: 2012-05-12
Is it possible that your application compiles and builds flawlessly in Netbeans but when you build it and run it outside of Netbeans you get heaps of Exceptions??!  (keeping in mind that the all the libraries and dependencies are ported along with the actual jar file).
Question by:snajalm
    LVL 86

    Expert Comment

    I've already covered this in your previous (still open) question. Why did you open a new one?
    LVL 10

    Expert Comment

    by:Pramod Kumar
    If you are getting error outside related with: missing classes, then surely there are some library missing.
    I can put more comment if i know exact issue you are getting.

    Accepted Solution

    With this one, what I got was that the Netbeans does not take the VMOptions in the compile time and therefore one would need to either hard code these parameters inside the application or create a configuration file that would pass the parameters to the application!  In my case these few lines of code solved my issue,

    Properties systemProps = System.getProperties();
    systemProps.put("", "jssecacerts");

    Open in new window


    Author Closing Comment

    I found the answer to the question by googling around!
    LVL 86

    Expert Comment

    >>In my case these few lines of code solved my issue

    That's not a good way of doing things btw

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now