Results 1 to 13 of 13
Like Tree1Likes
  • 1 Post By SurfMan

Thread: Does anyone know how to set up External Tools?

  1. #1
    357mag is offline Member
    Join Date
    May 2010
    Posts
    33
    Rep Power
    0

    Default Does anyone know how to set up External Tools?

    I have worked with someone on the IntelliJ forum who helped me set up that IDE to run my Java code in an external DOS window. Using the external tools option. It took awhile to get it all going but it works.

    I was curious as to whether I could accomplish the same thing in Eclipse?

    So when I run my program instead of the output showing up at the bottom in the output window, it would show in the external window.

    Can anyone help me out with this endeavor?

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,189
    Rep Power
    12

    Default Re: Does anyone know how to set up External Tools?

    So does this mean you're done with the other problem to which I responded?

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    357mag is offline Member
    Join Date
    May 2010
    Posts
    33
    Rep Power
    0

    Default Re: Does anyone know how to set up External Tools?

    I'm not going to worry myself about templates at the moment. It's more crucial for me to see if I can configure this IDE to look a little better when I run my code.

    To be specific I can't stand the fact that Eclipse and NetBeans place the input cursor in the wrong place when making a program that asks the user for input.

    That is not the fault of the language. But a shortcoming of the IDE.

    However, I'm only assuming that if I could get Eclipse to run my code in an external window, the input cursor would be placed where it should be.

    Plus when I set the window to use Consolas Bold 16 pt. the resulting text really looks sharp.

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,964
    Rep Power
    7

    Default Re: Does anyone know how to set up External Tools?

    I am an IntelliJ guy, not Eclipse/NB, but I think for all IDE's the solution looks like this:
    - Have a build process/artifact/ant script create a runnable JAR with a manifest that points Main-Class to your main class
    - Setup a tool/external process that executes the standard Java command for running a JAR file: java -jar <your jar here>
    - ...
    - Profit
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    357mag is offline Member
    Join Date
    May 2010
    Posts
    33
    Rep Power
    0

    Default Re: Does anyone know how to set up External Tools?

    Quote Originally Posted by SurfMan View Post
    I am an IntelliJ guy, not Eclipse/NB, but I think for all IDE's the solution looks like this:
    - Have a build process/artifact/ant script create a runnable JAR with a manifest that points Main-Class to your main class
    - Setup a tool/external process that executes the standard Java command for running a JAR file: java -jar <your jar here>
    - ...
    - Profit
    Classic response. Classic programmer geek speak. Manifest? Jar? Peanut Butter? Ship's contents? Ant? Bugs?

    Java Forums. Where learning and development begins?

    He...he...he...
    Last edited by 357mag; 06-16-2017 at 10:05 AM.

  6. #6
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,964
    Rep Power
    7

    Default Re: Does anyone know how to set up External Tools?

    Quote Originally Posted by 357mag View Post
    Classic response. Classic programmer geek speak. Manifest? Jar? Peanut Butter? Ship's contents? Ant? Bugs?

    Java Forums. Where learning and development begins?

    He...he...he...
    Is it that weird that I talk about jars and manifests in a Java forum? This is not geek speak, this is basic Java stuff. If you have questions about an answer that was given, please ask them. You being an asshat does not encourage me to elaborate. Au contraire (that's French by the way).
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  7. #7
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    388
    Rep Power
    4

    Default Re: Does anyone know how to set up External Tools?

    Quote Originally Posted by 357mag View Post
    Classic response. Classic programmer geek speak. Manifest? Jar? Peanut Butter? Ship's contents? Ant? Bugs?

    Java Forums. Where learning and development begins?

    He...he...he...
    Yeah, all this modern stuff: computer, email, internet, who knows what will be next.

    If you want your Console window aside from the eclipse IDE you can just click in the top bar and drag it out. If you want it back later on you have to reset the perspective in menu "window"

  8. #8
    357mag is offline Member
    Join Date
    May 2010
    Posts
    33
    Rep Power
    0

    Default Re: Does anyone know how to set up External Tools?

    Quote Originally Posted by benji2505 View Post
    Yeah, all this modern stuff: computer, email, internet, who knows what will be next.

    If you want your Console window aside from the eclipse IDE you can just click in the top bar and drag it out. If you want it back later on you have to reset the perspective in menu "window"
    I would like to run my program in a external DOS window. Not the output window that all these Java IDE's give you. I think my original message stated that quite clearly.

    Okay.

    I am only a hobbyist. So someone like me does not work with manifests. Or ant either.

    So don't make assumptions and start posting geek speak because it is totally useless to the reader.

    I would need help on what to type in the text boxes in the external tools.

    I'll experiment for awhile and see if I have any luck setting up this external window.

  9. #9
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    388
    Rep Power
    4

    Default Re: Does anyone know how to set up External Tools?

    Quote Originally Posted by 357mag View Post
    So when I run my program instead of the output showing up at the bottom in the output window, it would show in the external window.
    mmmh.

    OK, whatever. If you find a solution, let us know

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,942
    Rep Power
    30

    Default Re: Does anyone know how to set up External Tools?

    I would like to run my program in a external DOS window
    Open a command prompt window, change directory to the folder with the java class file and enter:
    java <ClassName>

    I am only a hobbyist. So someone like me does not work with manifests.
    Not sure that is true. I'm not a professional java programmer. I don't use one of the fancy IDEs. I write batch files to handle repetitive tasks. I have been working with java for several years and have learned things as I needed them for the programs I wanted to write. If you are creating a jar file you will need to learn about manifest files.
    If you don't understand my response, don't ignore it, ask a question.

  11. #11
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,189
    Rep Power
    12

    Default Re: Does anyone know how to set up External Tools?

    To be specific I can't stand the fact that Eclipse and NetBeans place the input cursor in the wrong place when making a program that asks the user for input.
    Why not just ignore it? You can still type in the input and the program will work fine assuming it is bug free.

    And you can set the console font to whatever you like via the IDE preference settings.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  12. #12
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,964
    Rep Power
    7

    Default Re: Does anyone know how to set up External Tools?

    Quote Originally Posted by 357mag View Post
    I would like to run my program in a external DOS window. Not the output window that all these Java IDE's give you. I think my original message stated that quite clearly.

    Okay.

    I am only a hobbyist. So someone like me does not work with manifests. Or ant either.

    So don't make assumptions and start posting geek speak because it is totally useless to the reader.

    I would need help on what to type in the text boxes in the external tools.

    I'll experiment for awhile and see if I have any luck setting up this external window.
    This is a Java forum, all we do is "geek speak". I don't know you, so I *have* to make assumptions. Since we're on a public, human-driven Java forum, I think it's a safe assumption for me to think you have a little Java knowledge and basic human interaction skills.

    I gave you exactly what you asked for. Don't blame your lack of Java knowledge on the people that are trying to help you. Instead, ask more questions. And then even more. It could look something like this:

    Me: You can create a runnable JAR with a manifest that points Main-Class to your main class.
    You: What is a jar and a manifest?
    Me: A JAR basically is a zipfile that ends with .jar and contains all your compiled classes.
    You: How do I make one?
    Me: <types instructions on how to make a jar>
    You: Ah, thanks. What about that Manifest?
    Me: A manifest is a file called MANIFEST.MF that is inside the JAR in a directory called META-INF. It contains hints for the Java process to know what's inside the JAR.
    You: You said Main-Class. What is that?
    Me: Main-Class is a line in the manifest that points Java to the class that has the public static void main that needs to be started.
    You: And how do I run one of those jars?
    Me: Use the -jar option of the java.exe command: java -jar <yourjar.jar>
    You: Ah, now I get it!
    Me: Great! Let us know how it goes!
    You: Thanks!

    (Dialog for illustration purposes only)
    Last edited by SurfMan; 06-17-2017 at 03:49 PM.
    Norm likes this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  13. #13
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,189
    Rep Power
    12

    Default Re: Does anyone know how to set up External Tools?

    Or. Using the above context.

    Me: You can create a runnable JAR with a manifest that points Main-Class to your main class.
    You: What is a jar and a manifest?
    Me: Check out the java tutorials at Packaging Programs in Jar Files. They explain jar files and manifests.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Open external file with external program
    By Wietse de Vries in forum New To Java
    Replies: 1
    Last Post: 12-31-2011, 04:52 PM
  2. Replies: 0
    Last Post: 11-23-2011, 09:49 PM
  3. Need to know about tools.jar
    By nn12 in forum New To Java
    Replies: 5
    Last Post: 01-07-2009, 07:27 AM
  4. Bug tools
    By mew in forum Advanced Java
    Replies: 1
    Last Post: 01-20-2008, 08:51 AM

Posting Permissions

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