Using Terminal to program and test java.

I bought a book on java and it says I should not use a JDK when first learning java.
Right or wrong I would like to know how to use terminal to program and compile simple scripts.
So my question is:
How do you go about setting up the computer to use terminal to write and compile a java program?
I know that’s pretty big question. I just need a link to some info on how to get started using terminal and java.
If I use a text editor how do I set up a path to it using javac?
Where can I find or link to this kind of info?

David Bixler wrote:
I bought a book on java and it says I should not use a JDK when first learning java.
I think they mean IDE, considering that Java is the JDK. And I agree with that idea, not just for Java, but for any language.
How do you go about setting up the computer to use terminal to write and compile a java program?
There isn't anything to setup. Just run Terminal and type "vi hello.java" or "nano hello.java". To compile, type "javac hello.java".
I know that’s pretty big question. I just need a link to some info on how to get started using terminal and java.
That is not necessarily a big question, just fundamental. Try Google. It becomes second nature after a couple of decades so I don't really know where to tell you to look. People do tend to have a big list of links, hopefully they can contribute some.
If I use a text editor how do I set up a path to it using javac?
It should already be in your path.
Where can I find or link to this kind of info?
Try Google. People like it. You should find many pages similar to this.

Similar Messages

  • Using Terminal in Mac OSX to program and test java

    I bought a book on java and it says I should not use a JDK like Net Beans when first learning java.
    Right or wrong I would like to know how to use terminal to program and compile simple scripts.
    So my question is:
    How do you go about setting up the computer to use terminal to write and compile a java program? I know my Mac sees java in terminal because tells me Im running "version 1.5.0_07"
    I just need a link to some info on how to get started using Terminal for my command line with java.
    I think if I could get a path set up from the command line to my text file and have javac see it I would be in pretty good shape. At least for now.
    If I use a text saved plain text file (.java) how do I set up a path to it using javac from the command line?
    Where can I find or link to this kind of info?
    Macbook Pro Mac OS X (10.4.10)

    ayusman_dikshit wrote:
    Hi,
    seems like you have not tried out a few things.
    1. Set up the JAVA_HOME environment variable. (I assume you pretty much know it) the folder where java is installed.
    2. set up the environment variable to point to the bin folder inside the java installation folder.
    3. open up a console (it seems from your post you know it.), type java -version see the java version.
    4. type in javac, press enter: you should get the javac options.
    5. type in java, you should see the java options.
    Write your programs in a text editor, save it as somename.java.
    open a console, change to the directory containing the java file.
    type: javac somename.java <PRESS ENTER>
    you should get the compilation errors if any.
    if not
    type in: java somename.java
    Hope this helps.
    Regards,
    AyusmanStep 1 and 2 are generally not needed. Mac OS X comes with Java configured up and running right out of the box.

  • Difference between a java program and a java class

    Hi there,
    What is the difference between a java program and a java class?

    HI,
    A java class is an object - described in a .class file - which has been given properties and behaviours and which can be instantiated in a program.
    A java program( application ) consists of at least one class (one of which must be declared public) and which executes its main() method ( of the public class ) when it is started.
    Every program is a class but not every class is a program.
    Examples:
    A java program
    // this simple program will print out the first command line argument you put
    // in after calling : java ScreenWriter "arguments"
    class ScreenWriter
    public static void main( String [] args )
    if( args.length > 0 )
    System.out.println( args[0] );
    A java class
    //the Math class is already defined in the java.lang package
    //and contains a constant for PI
    //So I can include the Math class with the PI constant in my simple program
    //and now I have a program that involves my ScreenWriter class and the Math class too.
    class ScreenWriter
    public static void main( String [] args )
    if( args.length > 0 )
    System.out.println( args[0] );
    System.out.println( "The value of Pi is: " + Math.PI );
    When you see package and import declarations at the start of a program they are there to ensure the compiler knows which classes are used in the program.
    Hope that helps,
    Terry

  • What are the steps to make it seamless for a customer to use the install program and then use the installed program?

    I wrote an install program (.exe) that is downloaded from a website.  When run, it 1) leads a customer to browse to a directory, and 2) copies files (.exe, .dll, etc.) from a website to that directory.  When I run, the installed program works.
    What are the steps to make it seamless for a customer to use the install program and then use the installed program? 
    bhs67

    This site https://msdn.microsoft.com/en-us/library/vstudio/2kt85ked%28v=vs.110%29.aspx provides a basic description of the Visual Studio Windows Installer. 
    Near the bottom of the page is "You can unlock all the features of InstallShield by paying to upgrade to the full version of InstallShield."  Where do I find info that describes the differences between the "free" and the "full"
    versions?
    bhs67
    Hello,
    The default feature does support the task for your requirement, so there is no need to pay for the other features unless you want to use some feature which is not free.
    In addition, as this thread
    InstallShield LE not available with VS 2012 RTM? shared, even through there is a link to InstallShield LE in the New Project dialog under Deployment solutions, but it belongs to third-party that I would recommend you consider posting this issue
    at the following forum to get supports about InstallShield.
    http://community.flexerasoftware.com/forumdisplay.php?133-InstallShield
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can ABAP program and a Java apps access the same DB table?

    If an ABAP program and a Java apps access the same DB table, how does the Enqueue services from ABAP and Java communicate with each other to ensure locking consistency (if they even communicate with each otehr at all)?
    Or there wont be such situation because there are separate schema for ABAP stack and Java stack?
    Your help is greatly appreciated.

    Hello!
    A while ago I was a subject to criticism too for not granting points to helpfull answers. I appeared to be ungratefull, but I'm actually not (I guess the same goes for Vincent). I absolutely agree that good people who provide helpfull answers deserve (at least) points, but I didn't quite get the whole idea with points untill I was explicitly warned. I took some time to correct this and I granted points for all my past questions, generously, with "interest rates" for waiting.
    My point is:
    The pointing system is good, but unintuitive and not documented. I suggested this at that time, and I see that nothing has changed since. I see also that I'm not the only one who has experienced missunderstandings.
    I repeat the message to SDN people: Please provide some info on pointing system! A few sentences behind a "What's this?" link would do. It's not such a hard work.
    Thanks!
    Kind regards,
    Igor Barbaric

  • I have a disc of Creative Cloud 6. Acrobat Pro does not work. I have used the other programs and they are fine, but when I try to open Acrobat Pro nothing happens. I am using Microsoft System 7.

    I have a disc of Creative Cloud 6. Acrobat Pro does not work. I have used the other programs and they are fine, but when I try to open Acrobat Pro nothing happens. I am using Microsoft System 7.

    what's creative cloud 6?  do you mean cs6?
    what version of acrobat pro do you have installed and what are you clicking to start it?

  • I am trying to use an education program that needs Java applets to install and use and it will not use Safari. When I download IE from the web it will not install. How can I get a browser that will work on my MacAir for travel use of this program?

    I am trying to use and education program that needs Java applets and it will not run on Safari. IE will not install from the web. How do I get a browser that will work to install so I can use this program when I travel.

    Try using FireFox. IE will only run on a Mac if you run Windows on the Mac.
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows 7 or Windows 8.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusion and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. A more recent comparison of Parallels, VM Fusion, and Virtual Box is found at Virtualization Benchmarks- Parallels 10 vs. Fusion 7 vs. VirtualBox. Boot Camp is only available with Leopard and later. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • Two users on same computer how to use the same program and data

    Two users on one computer how to share a program and it's data

    As Kappy said, each of you should have your own account. By default all programs are installed in the Applications folder so all users on the computer will be able to use the software. With a few restrictions data you want to share between two users can be placed inside the Shared folder - look inside the Users folder for it. Data that gets placed in the Shared folder will retain the owner/creator's rights so if you want other user(s) to be able to do more than open the document you'll need to change the permissions of the file to include that user.

  • I have captured a VHS movie from a VCR to my Mac. I used a Roxie program and it said "capture to IMovie". I said yes.  It shows in my events with a green asterisks but it is not showing up in iMovie,   It is in my doc but won't go into iMovie.  Why?

    I used a Roxie program to bring in my video from VHS.  I know it's in my computer and when I right click in the event in IMovie and click "capture movie, a screen comes up showing it but it won't capture it and bring it into IMovie. What am I doing wrong

    Firefox can find plugins in several locations, but Firefox 21 changed the location of the "shared" plugin folder so older installers like the Microsoft Windows Media Plugin no longer drop the DLL file in the correct location.
    There apparently are two ways to address this:
    (1) Change a Firefox preference so that Firefox checks the old location. Here's how:
    (i) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (ii) In the filter box, type or paste '''plugins''' and pause while the list is filtered
    (iii) Double-click '''plugins.load_appdir_plugins''' to switch its value from false to true.
    This will take effect after you restart Firefox.
    (2) Copy the plugins folder to the new location. Here's how on Win 7 64-bit:
    Open a Windows Explorer window to:
    C:\Program Files (x86)\Mozilla Firefox
    Right-click and copy the '''Plugins''' folder
    Double-click the '''browser''' folder to open it
    Right-click and paste
    Right-click the new copy of '''Plugins''' and rename it to '''plugins'''
    After restarting Firefox, the plugins in that folder should now be available.
    ''Edit: I suggest just doing #1.''

  • How can I generate clock in labview 8.0 and use it for programming and for hardware?

    I have to generate clock for synchronizing hardware with my program, so I need to to use this clock inside the program and as an output from A/D. The clock frequency has to be aproximately 3kHz.  

    *Insufficient information*
    First of all, i suspect that you are somehow believing that software can be timed by external signals. That is normally not the case, at least if you are using a standard Desktop PC.
    So please do not mix software with "data acquisition". Data acquisition can be configured to be "buffered" which means externally clocked. You can use the onboard clock for this or (in case of most hardware) any other TTL compatible "clocksource". This will ensure a clocked acquisition of the samples. The samples are then transferred to your PC and stored there as an array. So your program has to fetch the data "in time", but not "hardwaretimed".
    So please share some more information about:
    -What is your task
    -What is the hardware you are using
    -Software versions (driver, LV)
    -What is your current approach
    thanks,
    Norbert
    [Edit] There is a difference between "softwaretimed" and "hardwaretimes" acquisition. What i described in my reply would be the hardwaretimed acquisition, which i would say make the majority of all acquisitions. Softwaretimed acquisition describes a single point acquisition where a single sample is requested by the software. So each time the software requests a new sample, it will be acquired. This method heavily depends on the performance of the systems and does most often not exceed  few kHz (maybe 2 or 3). Furthermore, if you do not have a realtime or fpga, the acquisition if not deterministic which means that the samples are not acquired in a "static timeframe"; the delta t is not constant.....
    Single point acquisition is only worth for very slow signals (most often up to 1kHz) or control circuits.
    Message Edited by Norbert B on 12-01-2009 04:11 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to use my own program to test my EO, VO

    I've created a small application using BC4J. It's basically 1 EO and 1 VO.
    I've followed the Oracle Jdeveloper handbook and created a java file with a main method to execute and play with my EO/VO.
    my main method is like this:
    public static void main(String[] args)
    new Application1();
    ApplicationModule myAM = Configuration.createRootApplicationModule("mypackage1.Mypackage1Module","Mypackage1ModuleLocal");
    as you can see is dead simple, but it throws an error:
    java.lang.NoSuchMethodError: void oracle.xml.parser.v2.SAXParser.setContentHandler(org.xml.sax.ContentHandler)
         java.util.List oracle.jdeveloper.cm.DefaultConnectionStore.read()
              DefaultConnectionStore.java:182
         void oracle.jdeveloper.cm.ConnectionManager.loadConnectionDescriptors()
              ConnectionManager.java:1223
         oracle.jdeveloper.cm.ConnectionDescriptor oracle.jdeveloper.cm.ConnectionManager.getConnectionDescriptorImpl(java.lang.String)
              ConnectionManager.java:1203
         void oracle.jdeveloper.cm.ConnectionManager.putConnectionDescriptor(java.lang.String, oracle.jdeveloper.cm.ConnectionDescriptor)
              ConnectionManager.java:336
    what is wrong with this. Is there any other way to create a Java file with a main method to test the code?
    this is really frustrating :(

    Please refer to this topic:
    using Configuration.createRootApplicationModule
    sorry about that

  • TS1702 Now i purchaed yeaterday one year using in astrill program and the bank already deduct the amount from my bank account but there is nothing happened and the extened of using astrill bot working so now astrill support asking me for receipt of paymen

    I want ti know the receipt of payment that i purchased one year astrill program using so kindly give me the receipt of payment to give that to astrill support because i have the problem with them because i already paid around 70$ in apple store for this astrill yesterday and  till now i didn't get anything

    Purchased 2 years of service last year (desktop, not just for the iOS). Shortly after signing up and paying, my account was terminated stating there was no paymen. I was treated like a criminal, required to jump through a million hoops - then service as turned back on.
    Few months later - service was terminated again, sighting I was spamming on the account. Nope, never spammed...and no bots or viruses spamming. Few days later they turned on the account.
    Two week ago I contact support via chat. Representative was the most rude I've ever encountered, with insults to allogations. He terminated my account, stating 'there was a mistake' and I my account should not have been active. Now I'm being treated like a criminal and 2 weeks and nothing has been resolved. They appear to be unable to access the payment details to do the research.
    For anyone considreing using Astrill services please keep the following in mind:
    Service will be slow. You will find yourself having to constantly change servers.
    Many websites (IE CraigsList) ban the Astrill IPs.
    Many website force you through hoops... so extra captchas for instance for Google to search.
    Support beyond the 'download latest version' and 'clear cache' is hard to get.
    Expect the familiar off-shore support models we have grown to love and cherish over the years.
    Keep your payment record at your fingertips because you never know when you'll be called upon to prove yourself over and over.
    Though the VPN service is slow and clunky, it is the business practices and customer treatment that has me here writing to warn all of you to know what to expect before providing payment. I was 'ok' w/the service, it worked... but havea real problem w/how they treat everyone.

  • How can i find name of the variable used in the program and assign to a str

    double width= .333;
            int i;
            for (i = 0; i <=2; i ++){
                segment[i] = i+1;
            }is a bit of code...Is there anyway using which I can find out the variable names and assign them to string variables so that i can match them with another table ....
    That is I want the "width", "segment[0]", "segment[1]" and "segment[2]"...
    pls help...

    I am trying to find out the variable names in the program so that they can be matched against a given table for availability. I want to do that so that i can send the name, its type and value as a data packet to another node...I am not familiar with this...pls..would you give me a sample code

  • How to Use JDeveloper to Secure and Test a Web Service

    When I try this tutorial "http://www.oracle.com/technology/products/jdev/howtos/1013/wssecure/10gwssecurity_howto.html", I get this exception:
    javax.xml.rpc.soap.SOAPFaultException: The security token could not be authenticated or authorized
         at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:578)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:400)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
         at client.proxy.runtime.MyWebService1SoapHttp_Stub.echoMe(MyWebService1SoapHttp_Stub.java:78)
         at com.cmaxwell.secure.MyWebService1SoapHttpPortClient.echoMe(MyWebService1SoapHttpPortClient.java:42)
         at com.cmaxwell.secure.MyWebService1SoapHttpPortClient.main(MyWebService1SoapHttpPortClient.java:31)
    Process exited with exit code 0.
    What am I doing wrong?

    Username and password are "albert" as it is written in the part "Run the Client". The version of JDeveloper is "10.1.3.4.0.4270". The exception scenarios do not help me in this case. I get the exception on this line:
    myPort.echoMe("testing secure service");

  • PROBLEM IN ALE/IDOCS  USING STAND-ALONE PROGRAM AND CHANGE-POINTER.

    Hi All,
      Recently i have joined a company where i have to work on ALE/IDocs , So for this i need some help, Actually i need to know the complete senerio of this, I know some configuration part but after this what i want to know is the coding part
    of it.
    IN STAND-ALONE PROGRAM..
      I NEED TO EXTEND AN IDOCS WITH ADDING FEW MMORE FEILDS, SO IN   
      THAT CASE WHAT ALL THE THINGS I HAVE TO DO..
    IN MESSAGE CONTROL ..
       I NEED TO EXTEND AN IDOCS WITH ADDING FEW MORE FEILDS, SO IN 
       THAT CASE WHAT ALL THE THINGS I HAVE TO DO..??

    Hi,
    please have a look at
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/78/217d6851ce11d189570000e829fbbd/frameset.htm
    Hope this helps.
    Regards
    Bernd

Maybe you are looking for

  • Belle Calendar widget does not show the synchroniz...

    After updating to Bella N8 has synchronized with Outlook via Nokia Suite. The Calendar shows all the dates. I have two calendars. The first calendar comes with Mail For Exchange, the second from Outlook (synchronization with the Nokia Suite). Calenda

  • Base amount in migo

    Dear all, I'm creatng a import po Gross Price-1,314,117.00 IMP INSURANCE IN VAL-1,280.00 Landed Price-13,153.97 IN Basic customs-66,427.55 IN CVD-223,196.57 Ecess on In CVD-6,695.90 Customs ECess on TD-8,889.61 IN additional duty-65,350.43 Neg.Landed

  • Oracle 6.2 on Oracle VM installs ok, doesn't do much on first boot up

    I installed Oracle Linux on Oracle VM and the installation steps seem to succeed, but when I boot up the guest there is no gnome desktop or networking (can't ping oracle.com). However, if I run the install again in rescue mode and go to the shell I c

  • Screen locked

    I'm using Boris Title 3D in FCP and screen has locked up. how do i unlock?

  • [Multisim] コンポーネントウィザードからユーザデータベースに登録した部品の編集

    Multisim 13.0 Power Pro Editionを使用している者です(Windows 8 Pro,Core i7 3GHz,4GBメモリ,500GB HDD). 以下と同様の内容を英語のフォーラムにも投稿しております. http://forums.ni.com/t5/Circuit-Design-Suite/Trouble-with-Component-Wizard-and-User-Database/td-p/30... コンポーネントウィザードから新たに324ピンの部品(レイア