Results 1 to 18 of 18
Like Tree1Likes
  • 1 Post By Norm

Thread: Please help Thank you.

  1. #1
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Please help Thank you.

    Hello guys I am very in need of your help with this project. If you help me i will be grateful to u for my whole life .
    Can you tell me how to proceed with creating this. If anyone can help me throughout out creating this ill be very very thankful. I would be even more thankful if u can assist me via msn or some other messenger. :) Thank you for reading this


    Building a Java Applet that will provide a console styled interface to java console applications loaded via URL

    Goal:
    To create a way for Java console applications to be run in the web-browser.
    I envision this project as a Java applet that loads a jar containing a java console application via a URL. Once loaded the console application can be interacted with through a console/terminal styled user interface defined in the applet.

    Challenges:
    Hooking up the interface of the applet to the System.in and System.out of the console application. This may require some parsing and manipulation of Java bytecode, but maybe not.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,040
    Rep Power
    10

    Default Re: Please help Thank you.

    What have you tried? Where are you stuck?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    i don't know how to proceed with this so if nyone can give me a break down of steps in order to make this ill be gratefu

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,040
    Rep Power
    10

    Default Re: Please help Thank you.

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    I thought i would be helped here instead being criticized for my question posting skills.

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,040
    Rep Power
    10

    Default Re: Please help Thank you.

    Where did I criticize you? Did you follow the directions in the link I gave you? If you aren't going to bother reading the suggestions you receive, why should people spend time posting them?

    Break this up into smaller pieces. What is the very next, smallest piece you know you have to do?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    Ok sorry about that. The smallest piece that i think i have to do first is load a jar file containing a java console application via a URl.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Please help Thank you.

    Putting all this in an applet will require that the applet have permissions. Is that acceptable?
    Perhaps JNLP will help with that issue.

    Having an applet read a jar file from its server should be easy. What you do with the jar file will be harder.
    One approach would be to have your own classloader that reads from the jar file.

  9. #9
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    Can you recommend me any resources that i should read before carrying on with this.

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Please help Thank you.

    Sorry, I don't have any. Each part will require specific research on how to do it.
    Here's a link to a zip file with some programs I wrote that has some classloader stuff in it:
    http://users.mo-net.com/normandpaula...oolsSource.zip
    Last edited by Norm; 11-07-2011 at 09:00 PM.
    rafeh likes this.

  11. #11
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    thank you a lot. Can you tell me what topics should i be researching. :)

  12. #12
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Please help Thank you.

    Write a list of your program's required features and work from that.

  13. #13
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    step 1 create java applet

    Creating the initial window in which all the other console apps would load

    step 2 load and run jar files containing the java console app in the java applet
    -takes the link from the user
    -Uses that link to breakdown the jar files
    -via the resources in jar file runs the code in the app

    step 3 show results

    show result of the loaded console apps in the initial window

    (Thats the break down of the steps i have got so far)
    wht do u think ?

  14. #14
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Please help Thank you.

    I have no idea how to create a "console window" for executing a java app in? That is handled by the OS.
    Can you use a java class like a textarea to simulate it? System in,out and err can be trapped/redirected.

    breakdown the jar files
    What does that mean? Read the contents of the manifest file to get the Main-Class entry?

  15. #15
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    yes norm a textarea can also be used to simulate it .

    By breaking down jar files i mean to read the code inside the jar file , and then running that code so it gives a system out in the java applet for the results of the java console app.

    so basically i m trying to do the following

    set up display applet
    input jar file
    search jar file for code
    run the code
    display results of the code in the display applet

  16. #16
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Please help Thank you.

    Sounds doable so far.
    The jar processing would be to read the manifest file and get the Main-Class entry.
    The classloader would then be responsible for reading the class files from the jar as they are requested by the app.

  17. #17
    rafeh is offline Member
    Join Date
    Oct 2011
    Posts
    10
    Rep Power
    0

    Default Re: Please help Thank you.

    so the classloader will basically run the code for me ?

  18. #18
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Please help Thank you.

    Not exactly. A classloader will make class files that are NOT on the classpath available so you can execute them.
    Your driving code will work "normally" in the way it creates instances of classes and calls their methods.

Posting Permissions

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