Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2011-10-20
5
Medium Priority
?
319 Views
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).
0
Comment
Question by:snajalm
  • 2
  • 2
5 Comments
 
LVL 86

Expert Comment

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

Expert Comment

by:Pramod Kumar
ID: 36999193
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.
0
 

Accepted Solution

by:
snajalm earned 0 total points
ID: 37080959
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("javax.net.ssl.trustStore", "jssecacerts");
System.setProperties(systemProps); 

Open in new window

0
 

Author Closing Comment

by:snajalm
ID: 37098990
I found the answer to the question by googling around!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37082017
>>In my case these few lines of code solved my issue

That's not a good way of doing things btw
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

580 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