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 7 of 7

Thread: something cool i can do with java?

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default something cool i can do with java?

    Okay i've learnt the basics but all the programs ive seen or written handle averaging numbers and displaying simple messages. How do i learn to write programs that influence the files on my PC. like a simple program that can password protect files from unwanted access.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: something cool i can do with java?

    programs that influence the files on my PC
    Not many things that you can do to files from a java program: move, rename, delete, rewrite contents
    Password protecting sounds like an OS thing which would require native code that could be call from java via JNI

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: something cool i can do with java?

    For files, I'd recommend reading up on basin IO operations first (Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)). If you are looking to 'password protect' files, you could write a program which encrypts a file, and only decrypts upon the correct password. Although I haven't used them myself I believe java has encryption tools to aid you along. If you wish to do it yourself a simply type of encryption could be to swap the bits of each byte in the file...makes for good practice to learn bit-wise operations.

  4. #4
    Junior Member
    Join Date
    Aug 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: something cool i can do with java?

    you could code an ai for broodwar using bwapi & the java proxy

  5. #5
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: something cool i can do with java?

    Quote Originally Posted by hamsterofdeath View Post
    you could code an ai for broodwar using bwapi & the java proxy
    AI theory is a very advance topic, and I would strongly recommend against getting yourself into something this complex at such an early stage.

    If you want something "cool" while still maintaining some simplicity, program a simple game, maybe a card game like black jack, or if you're feeling ambitious, tetris (this is actually what gamedev.net recommends as a "beginner game", but they also assume you have adequate programming knowledge in the language you are using).

  6. #6
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: something cool i can do with java?

    About a year ago I programmed a card game my friends and I made that we called Poker War. It mixes the two games to make something that isnt that bad. I decided to program it after I got annoyed shuffling the deck...

    The AI I made for the game is very basic, but still kicks the crap out of most my friends.

    I word of advice that I learned while programming the game. Separate the Computer Player AI from the Host AI. At first I had them together because I figured, why not. Then I realized the Computer had a tendency to cheat. Once I separated the two, the cheating stopped. I can't really explain why it cheated, but it did...

    Also, I can create a zip or something of my card class and the jpg images if you need them. I spent alot of time creating the 110 or so images I needed and I'd be happy to pass along the work. Especially if someone thinks they can make it better and give me their improved stuff.

  7. #7
    Junior Member
    Join Date
    Aug 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: something cool i can do with java?

    Quote Originally Posted by helloworld922 View Post
    AI theory is a very advance topic, and I would strongly recommend against getting yourself into something this complex at such an early stage.

    If you want something "cool" while still maintaining some simplicity, program a simple game, maybe a card game like black jack, or if you're feeling ambitious, tetris (this is actually what gamedev.net recommends as a "beginner game", but they also assume you have adequate programming knowledge in the language you are using).
    for beginners, doing a 4pool would be fine