Results 1 to 17 of 17
Like Tree2Likes
  • 1 Post By JosAH
  • 1 Post By gimbal2

Thread: New To Java

  1. #1
    john007 is offline Member
    Join Date
    Jun 2015
    Posts
    6
    Rep Power
    0

    Default New To Java

    I hava little bit of knowlodge in VBA.. I hava a small project related to processing large data.. I need to create a GUI.. I have installed Eclipse software
    My progest requie
    1.Creating a GUI
    2.I need show data folder(consisting 100s of files) from GUI and all files in folder should be moved to each folder with same name as of file name.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: New To Java

    You have two separate problems here: a GUI that doesn't seem to do much and the file copying stuff; the GUI only needs to display the files in a folder (directory) and it needs a 'go' or 'do it' button which activate the copying process. Keep those two problems as separate as possible.

    kind regards,

    Jos
    john007 likes this.
    Build a wall around Donald Trump; I'll pay for it.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: New To Java

    Step 1: Learn Java?
    john007 likes this.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    john007 is offline Member
    Join Date
    Jun 2015
    Posts
    6
    Rep Power
    0

    Default Re: New To Java

    Can any one help me in creating a GUI with a button linking the program to it as we do in VBA. The code consists of a browse button by which i will locate path(Path which consists fo number of files) and those files should move to folders(folders should be created with same name as of Files).

    I already hava a script to move each file to each folder(Folder with same name as File). But the same thing i need to do with JAVA.

  5. #5
    john007 is offline Member
    Join Date
    Jun 2015
    Posts
    6
    Rep Power
    0

    Default Re: New To Java

    Hi JosaH,
    Thanks for your response.

  6. #6
    john007 is offline Member
    Join Date
    Jun 2015
    Posts
    6
    Rep Power
    0

    Default Re: New To Java

    Hi gimbal2,
    Thanks,
    No as of now I donot know the basics of java. Only thing i have is EClipse software installed in my system.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: New To Java

    Then I would ignore Eclipse and use something like Notepad++ to write your code (at least initially) and compile on the command line.

    Java is not a "pickup and run" language.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: New To Java

    Quote Originally Posted by Tolls View Post
    Java is not a "pickup and run" language.
    Indeed, Java is a "crawl until your knees bleed" language; it doesn't shoot you in the foot though, as C does, nor does it stab you in the back as C++ does. It's a well defined language and a fair fighter. If the language specification claims it works, it should work; if the specification says it doesn't work, don't try to make it work because "it works in VB" or whatever other abomination of a language.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  9. #9
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: New To Java

    Out of honest interest: how does C++ stab you in the back?

    Quote Originally Posted by john007 View Post
    Hi gimbal2,
    Thanks,
    No as of now I donot know the basics of java. Only thing i have is EClipse software installed in my system.
    So if you don't even know the basics of the language, how can a) anyone help you and b) you have any clue what to do at all? Other than other people writing all the code for you, at this point there is nothing to be done.

    Get a good book, start learning the language. It will take time so this little project will need to be put on hold for now.
    Last edited by gimbal2; 06-05-2015 at 02:26 PM.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: New To Java

    Quote Originally Posted by gimbal2 View Post
    Out of honest interest: how does C++ stab you in the back?
    I lulls you into thinking it's not actually C with lipstick...
    ;)
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  11. #11
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: New To Java

    Quote Originally Posted by Tolls View Post
    I lulls you into thinking it's not actually C with lipstick...
    ;)
    But then one of its cleverly disguised user defined overloaded operators comes around and stabs you. After that, one of the slicing prone multiple inheritance of implementation classes rip your intestines out as well as your eyeballs and leave your bleeding carcass for all to laugh at.

    kind regards,

    Jos

    ps. typed in bright sunlight, so I can't see anything overhere ...
    Last edited by JosAH; 06-05-2015 at 04:01 PM. Reason: stupid sun light ...
    Build a wall around Donald Trump; I'll pay for it.

  12. #12
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: New To Java

    Jeez, you'd think C++ was invented by the Texas Chainsaw Programmer.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  13. #13
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: New To Java

    Quote Originally Posted by gimbal2 View Post
    Jeez, you'd think C++ was invented by the Texas Chainsaw Programmer.
    No he is Danish and his name is Bjarne Stroustrup (with those funny rolling r-s); he wanted to stick to the semantics of C as close as possible and it introduced a lot of peculiarities and a programmer has to know them all at all times, otherwise C++ will bite your head off. Bjarne dislikes some of his own design decisions nowadays but it's too late: Standardization committees have the language in their claws now so you can't undo certain decisions anymore ... mulitple inheritance of implementation (causing that silly dangling this pointer) and user defined operator overloading and value semantics (slicing of objects) are just a few of the horrors brought to us by C++ *shudder* ...

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  14. #14
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: New To Java

    Agreed they suck, so I just never used those features. Its moderately possible to write C++ code like you would Java code, with certain limits of course. "In the beginning" I did use operator overloading quite a bit - and I always ended up with code I eventually had no clue about why and when it did things. Its the exact opposite of self-documenting code to me.

    C/C++ evangelists massively disagreed with me though, operator overloading was just an incredible power that not everyone was capable to wield properly.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  15. #15
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: New To Java

    Quote Originally Posted by gimbal2 View Post
    Agreed they suck, so I just never used those features. Its moderately possible to write C++ code like you would Java code, with certain limits of course. "In the beginning" I did use operator overloading quite a bit - and I always ended up with code I eventually had no clue about why and when it did things. Its the exact opposite of self-documenting code to me.

    C/C++ evangelists massively disagreed with me though, operator overloading was just an incredible power that not everyone was capable to wield properly.
    A lot of people forget that if they overload operator 'o', then they also have to overload the assignment operator '=' because C++ thinks it's smart and allows expressions such as 'lhv o= rhv'; but then again (if you're smarter than C++) you mustn't forget to implement the copy constructor if you don't want to end up with a lot of spurious copies of objects getting lost (C++ doesn't have garbage collection); C++ is a hell of a language ...

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  16. #16
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: New To Java

    Its only a language though, its still programmers doing all the damage ;)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  17. #17
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: New To Java

    Quote Originally Posted by gimbal2 View Post
    Its only a language though, its still programmers doing all the damage ;)
    Yep, and then the following question boils up: how weak and how strong should a language be? Weak as in: no hidden semantics that can be a (deadly?) trap to the unaware programmer and how strong as in: what can 'easily' be programmed in that language. C++ isn't weak enough and it is quite strong; Java is a weak sissy language but can be quite strong (although a bit verbose); those language qualifications seem contradictory but they aren't; an ideal language would be extremely weak (read: safe and so soft for your hands) and extremely strong, i.e. you can do whatever you want in that language. I think that Java comes closer as an ideal language then C++.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •