Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: NetBeans vs .JAR

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    5
    My Mood
    Bored
    Thanks
    0
    Thanked 1 Time in 1 Post

    Post NetBeans vs .JAR

    Hi there
    I'm not going to post any source code, but I have a little question. See if you can answer it.
    The program is programed to have a little encryption in it to store passwords. When I run my program in NetBeans, it works perfectly and the encryption works the way it should, but as soon as I run bould the program with NetBeans and run my .jar file, then the encryption works different.
    Can anyone explain why it is doing that and how to solve my problem.
    Thanks <\>


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: NetBeans vs .JAR

    Quote Originally Posted by Gavin Fraser View Post
    Hi there
    I'm not going to post any source code, but I have a little question. See if you can answer it....
    Is this post a game, kind of like "I'm thinking of a color and I want you to guess it" sort of thing?

    Why make your question harder to answer than it needs to be? Why not post enough information so that folks have a decent chance of being able to help?

  3. #3
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: NetBeans vs .JAR

    One potential difference is that files don't really exist in jars, and so if you're trying to get information from a resource held by a Jar and you're trying to do so as if the information were held in a file, you could be messing things up, but again, this is nothing more than a SWAG, and if you want better help, you'll need to ask a better question. What sort of debugging have you done so far? Have you used logging or println statements to find out the state of your program during its run in order to isolate the problem?

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: NetBeans vs .JAR

    How is the encryption different? ...specifically?
    Is it still functional or does it no longer work? ie when you decrypt you fail to get your original password...
    Do you get any errors? or crash? other?
    "...and how to solve your problem" I am having a hard time understanding what the problem is. Perhaps you can explain a little better about what the difference is between running via IDE vs JAR.

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: NetBeans vs .JAR

    One basic difference when running the code those two different ways would be the values of the classpath and the current directory.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Netbeans GUI help
    By kprofgold in forum AWT / Java Swing
    Replies: 1
    Last Post: February 26th, 2012, 08:02 AM
  2. NetBeans help please!
    By JuLiAnc in forum AWT / Java Swing
    Replies: 4
    Last Post: January 9th, 2012, 06:16 AM
  3. Netbeans 6.8
    By selmaky in forum Java IDEs
    Replies: 1
    Last Post: May 14th, 2011, 03:08 PM
  4. New to NetBeans
    By _lithium_ in forum Java IDEs
    Replies: 0
    Last Post: March 1st, 2011, 08:48 PM
  5. Netbeans help
    By [Kyle] in forum Java IDEs
    Replies: 2
    Last Post: September 20th, 2009, 06:32 PM