Running Tutorial Program

Hi all, OK I'm fairly new to Java so go easy with me.
Here is the craic. I have been working through a tutorial from this site, its the DiveLog yoke. I have done the part one and first problem, as stated in the tutorial is compiling.
well because of all the additional classes that arn't defined but are pointed to from the DiveLog.java it will not let you compile via
c:\javac DiveLog.java
you have to do it via (and SDK it in the classpath so it should compile from anywhere, it does work from any driectory, just not this program)
c:\divelog\javac -classpath c:\divelog\DiveLog.java
this works and there is no errors and I am assuming it has compiled, but there are no class files created?
It does actually say in the tutorial that you should compile it like this:
c:\divelog\javac -classpath c:\divelog\ DiveLog.java
(note the space after c:\divelog\ DiveLog.java)
but this doesn't work. It comes back with the 6 other files it is pointing to that have no methods or anything?
Does this make any sense?
A bit confused? why are theere no class files created when it does look like it has compiled?

well, from you rreply i din't understand if those classes should belong to any package.
by asking that i should have clarified that i wanted to know if they have package com.something.or.whatever; in the beginning of source or not.
relying on posts #9 and #10 i suspect that they had not.
They are located on the c:\ packaged in the divelog
directory
I go to the divelog directory ( c:\divelog\ ) and
compile from there using
javac -classpath c:\divelog\DiveLog.java
and that just returns to the prompt without errors or
any messages?well, actually you're only specifying a classpath since you're saying:
javac -classpath <PATH_TO_WHERE_THOSE_CLASSES_ARE>
but instead you should say
javac -classpath <PATH_TO_WHERE_THOSE_CLASSES_ARE> <SOURCE_FILE>
What you say the classes are not in the class path
what do you mean? How come the simple helloworld
program compiles the same way?when i say that these other source files are not in your classpath, then i mean that, your java compiler doesn't know from where to look for these .java or .class files. it only knows where the default classes are (String and System etc.)
why you are able to compile simple helloworld, is because helloworls doesn't need to use any other custom made classes, and you provide HelloWorld.java to javac with absolute or relative path.
however, on newer windows systems, the current directory ('.') is not by default in (class)path, so you might want to modify your system variable CLASSPATH to contain current direcroy as well (then you'd not need to write "-classpath . " after javac every time you want to compile something)

Similar Messages

  • Unable to Run C Program using Xcode "Stop Executable"

    Hi All
    Have been using the Terminal to compile programs built through Xcode but now want to use Xcode itself. Everytime I press build and go it builds successfully but won't run. I found a tutorial that mentioned if you are using Xcode 3.0 (I am) you can't use build and run, for output, you have to go to run and then push console.Ok that works. I then found someone with the same issue as mine everytime you want to build and run it appears with another window saying "Stop Executable"They were told to make sure they were building the .c file in a project and not building it from a text editor and then importing. I always build new projects.
    I want to interact with the program not just see its output? so my question is can I interact with programs i.e. User can enter data or strings or, do I have to build an interface to do this through Xcode. I Also forgotten to mention I found information through the forum that said to go to First Aid through utilities and repair file permissions, this has been done but still does not work. Many thanks for your time and as you can probably tell I am new to Xcode.

    To run your command-line program in Xcode, open the debugger console by choosing Run > Console. Run your program by choosing Run > Run or Build > Build and Run. You'll have to build and run if you haven't compiled the program before. Your program will run, and you will see output in the console. You interact with the program from the console.
    If you're not able to enter input in the console, choose Run > Sync with Debugger. If doing that doesn't work, you can run your program in the Terminal application by double-clicking the program from the Finder. It's less convenient than running it in Xcode, but you'll at least be able to run the program and interact with it.

  • Tutorial Program not working correctly

    I've FINALLY got the program to run, from the tutorial Creating a Web Dynpro Applicaton Accessing ABAP Functions, https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/355b9c90-0201-0010-d2a8-89fece426526
    When I run the program, I get the first screen where I can enter test information "Frankfurt" and "New York", but when I hit search, the screen blinks, but I don't get the results view.  No errors are generated. 
    Does anyone have any idea what is happening?
    Here's a screenshot of what I'm seeing: http://www.adamsblueguitar.com/test/FlightListInit.jpg
    Help!  I'm so close!

    Hi,
    there might be different reasons to not displaying.
    1) might be data not available on your giving input.
    2)the function module you are using the Group is not authrised in the JCO.
    Your are asking the second one call your bapi execute method in init() method map the output into default View for thta you need to hardcode the input values.
    But you have seen there View set As per your option you can change view.
    this might helps
    Thanks
    Lohi.
    It might helps.

  • I dont see the "edit options" button thats suppose to be on the top right hand corner. I need to download and run a program and I need to click that to do it, what do I do ?

    Or how do I download a tool bar for firefox, or run a program like you do for internet explorer?

    See:
    * http://kb.mozillazine.org/Installing_extensions

  • /SAPAPO/SDRQCR21 program is not working correctly if we run the program for range of material and plant wise

    Hi APO Experts,
    In our project, we have received more sales order inconsistencies which is not clearing by CCR program and it is clearing by  program /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow, So We have decided to schedule the background job on daily basis for program /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow, performing the testing in our quality system and observed the below strange behavior. 
    When I am running the program /SAPAPO/SDRQCR21 with Range of products and some location range with option as Build Reqmts from Doc. Flow, in Background job. In output it is suggesting to delete one sales order. If I checked that Sales order in ECC, it is for an different location, that is not part of my selection and the order is open. In MD04 the Qty is showing 1 ( as per sales order) but in APO RRP3 view the order qty is showing Zero. I have run the CCR, it is coming in different in content and if I push, the different is not going to APO.
    I have tried running the program /SAPAPO/SDRQCR21 with plant which is mentioned in that sales order with option as Build Reqmts from Doc. Flow, in Background job , it is suggesting this sales order under update option correctly.   
    Can you please help me understand why it is behaving differently like the location is not part of my selection and why it is suggesting the wrong action. And also whether is it advisable to run the /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow at plant range and material range in background job.
    Thanks & Regards,
    Sundaram Radhakrishnan

    Sundaram,
    It sounds to me like the sales document records in the OLTP and in APO were created at different times.  This is common in Dev and Qual environments when the systems are commonly created at two different times, and each was a copy of an existing system that contained sales data.  The order number you see in //rrp3 is somewhat irrelevant; system generally uses the guid for many activities.
    FYI during Dev and Qual refreshes, if you are copying from a production environment that contains data, it is always best to create the OLTP and SCM images at the same time, and to copy them both to the Dev and Qual systems at the same time.  If you don't do this, you are faced with the additional tasks associated with getting the copied systems back into synch.
    If this is Dev or Qual, I suggest that you just completely wipe out all sales orders in APO and rebuild them using the CIF.
    If this is a mature production environment, the only time I have ever seen this issue is due to improperly created CIF enhancements.  Speak to your developers to find the root cause, and correct this problem.  Then, wipe out all sales orders and rebuild with CIF.
    Best Regards,
    DB49

  • Problem with running a program under Labview 8.6

    Hello,
    I am writing you this to ask for your technical support to fix the problem I am facing at our Lab at University of California, Irvine.
    Ms. Vanessa Trujillo has kindly come to our lab a couple of times and tried different things to resolve the issue, but unfortunately the issue is not resolved yet. Here is a summary of the problem:
    We used to use Labview 6.1 for our fatigue testing and data acquisition.
    Our
    program worked just fine under the 6.1 version We recently upgraded our software to Labview 8.6. We have also purchased a new computer that has higher capacity than what your website requires for Labview 8.6. The new computer has Windows Vista We transferred our old program/subprograms from the old computer under Labview
    6.1 to the new computer with labview 8.6. However our program that worked fine with the 6.1 version is not working with the updated version (ver 8.6).
    There
    are 6 errors in the error list. It appears there are six files of my program missing under the new version, even though we transferred all files.
    The software searches for those files but can't find them.
            For example one the box pops up indicates:
            loading:
                        <vlib>:\Daq\lvdaq.dll
            searching:
                        C:\Program Files\National Instrument\LabVIEW 8.6\instr.lib\Agilent34401\public\utility
            I get several message like this. I have to cancel/ignore them all to be able to open the program.
    When we go to VI's under Measurement I/O there is nothing (empty).
    We use a PCI-MIO-16XE-50 for our data acquisition During Labview installation on the new computer, I was asked if I wanted to install the device drivers. I had two options, "Now" or "Later", I picked Now but I didn't have the DVD's/CD's for the device drivers. Therefore I had to select later to complete my software installation Later after Labview 8.6 installation, we installed the device drivers (traditional Ni DAQ and Ni DAQmx) from the two old CD's we had in our lab from a couple of years ago (the CD's were Ni DAQ 7). after installation, the PCI board on the computer was recognized by the device driver. However we still could not run our program under the new version of Labview (same situation and the same messages) I called 1-866-275-6964 on 9/2/08 and talked to Grant (service number:
    1228841). He recommended that I download and install the updated version of device drivers.
    Since I didn't have the DVD/CD for updated device drivers, I contacted Vanessa Trujillo. She gave me the DVD for the updated Ni DAQ (Traditional and mx).
    But
    when I tried to install the updated device drivers I got a message something like "some unsupported filed have been detected,..." so the updated device
    drivers were not installed. It should be noted that up to here we still had the Ni DAQ (traditional and mx) installed on the computer from our old CD's (Ni DAQ 7).
    Vanessa and I talked to Tom at the technical support department. He recommended that we download and install the Beta xx version for Ni DAQ since we were using Windows Vista. Mike put the Beta software on the Ni website/outgoing so I could download and install it. He asked me to uninstall the traditional Ni DAQ that we had on our computer from the older CD's. He
    asked me not to un-install the Ni DAQmx (that we had installed from the old
    CD). I was able to download the Beta software, however I could not install it since I got a similar message that some unsupported files were detected.
    Right now we don't have any version of traditional Ni DAQ installed on the
    computer but the NI DAQmx (from old Ni DAQ 7) is still installed on the computer. Vanessa let me borrow her new Ni DAQ DVD but as I explained I am not able to install the device drivers.
    Vanessa - Did I miss anything?
    Please advise. My cell number is 619-778-2033. I will be at our lab at UC,
    Irvine at 2:00pm (CA/Pacific time). Please call if you have any questions.
    Thank you

    To me, it looks like you are missing some of the drivers and subVI's used in your program.
    Whatever device you are using to measure fatigue or any other device probably came with a driver.
    You need all of these drivers installed on this new computer.
    Also, any subVI's and libraries you use in the program must also be installed on the new computer.
    Whenever you get a message that says you are missing some component (the ones that you said you press 'ignore'),
    see if you can find that library or subVI on the older computer. If so, save it to something so you can transfer them to the new computer. 
    Cory K

  • How to generate new spool on each run of program

    Hi,
    I am using FP_JOB_OPEN , CLOSE FM for generate my  multiple PDFs into a single PDF form.
    Rightnow when we run 1st time is genrating and storing it under a spool number 100.
    Next time we run the program it is appending to same spool number 100.
    How can we get rid of this? These are my spool parameters.
      fp_outputparams-nodialog = 'X'. " suppress printer dialog popup
        fp_outputparams-dest = 'ZADS'.
    I tried REQNEW inside the loop when i do that obviusly it is seperating pdf's .
    How can i get rid of this issue?
    rgds
    Vara

    clear:fp_outputparams.
    resolved my issue.

  • To run a program in BACKGROUND using SUBMIT

    I need to run a program in background using the SUBMIT option. Here i have to pass an internal table form one program to another which will be used to update sales orders using BDC.
    Questions
    1} Can we execute a program in background using SUBMIT?
    2} I am sending data to a MEMORY ID , if i run the program in background will the memory id work. As in do  memory IDs work in the background.
    Thanks in Advance

    refer  same thread.
    Re: Problem with SUBMIT in Background

  • When I connect an external drive I'd like to run a program which is on it. How could I do that?

    When I connect an external drive I'd like to run a program which is on it. How could I do that?
    I tried automator, but without success.
    Thanks

    Interesting question.  Others have provided the direct answer (no, massive security hole), and a little time with a search engine finds various existing discussions of autorun-related topics (eg: here and here and here), and a link to the Do Something When tool, and there is the DeviceListener example in the Xcode kit and to adding a folder action where the volumes are mounted.  See the topics for details.   Haven't tried this stuff, though.

  • Running BDC program in background for the transaction VL02N

    Hi All,
    I have coded a BDC program (call transaction method) for the transaction code VL02N. I can able to run the program manually & successfully. But if I execute the program in background(SM36), it is going to dump giving CNTL_ERROR.
    Note: I am not using any of the GUI_UPLOAD, GUI_DOWNLOAD funciton modules in the program. But I am using the FTP command funtion modules like( FTP_COMMAND, FTP_CONNECT, FTP_DISCONNECT and FTP_SERVER_TO_R/3).
    <removed_by_moderator>
    Thanks in advance.
    Ramesh.
    Edited by: Julius Bussche on Jul 8, 2008 5:55 PM

    VL02N is an enjoy transaction. You cant run it in background. Please try VL02.
    Thanks
    Romit

  • I need to download Firefox 1.5 or 2.0 in order to run a program that is not supported in the newer versions of firefox. How can I get the older versions?

    I need an older version of Firefox to run a program that is only supported on Firefox 2.0 or 1.5. Where can I download this older version of Firefox?
    == This happened ==
    Not sure how often
    == User Agent ==
    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

    Try the portable version: http://www.freesmug.org/portableapps/firefox/

  • "Error determining planning periods for calendar "  when running a program

    Hi,
    When i am running a program with date range say "01/05/2011" to "30/06/2011",the program is executing successfully without any error. When i am executing the same program with date range as a) "01/05/2009" to "30/06/2011" and b)"01/05/2008" to "30/06/2011" the program is failing with error as "Error determining planning periods for calendar". Can anyone suggest me what i should do to avoid the failure of the program with above date ranges also.
    Thanks in advance,

    Dear,
    Error message 61123:"Error determining planning periods for calendar &".The PPC planning calendar specified in the material master MRP 2 view for the material is  incorrectly.
    The planning calendar periods are insufficiently maintained for the planning calendar used.
    Check the period of planning calendar in MD26 and generate the correct period.You can avoid the problem in several ways:
    Maintain the planning calendar far enough in the future (at least until beyond  the end of the planning horizon).
    Also check any demand is lies beyond the validity period of planning calendar.
    Reduction of the planning horizon of MRP also can control such issue, as MRP planning horizon lies in an area in which the planning calendar is no longer maintained
    Regards,
    R.Brahmankar

  • Could not able to RUN Java Programs in JRE 1.5.08

    hi
    I am using Jdk 1.5.8.
    I don�t have any problem in compiling the files.
    but i could not able to run the program through windows cmd prompt.
    Say name of the java file is newFile (no packages).
    When i try to run the program by using java newFile it raises a ClassNotFoundException.
    it s the same case when try to set any JDBC drivers ..
    is there any problem in my class path settings? Please help me out to fix this problem

    if your current directory is not in the classpath,you should include it in the classpath.
    To do that you can include .(dot) to your classpath variable.
    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

  • Error whilst running a program

    Hello all,
    I am new to java and i ran into a probelm while trying to run ALL programs that has already compiled on the Windows command prompt.
    The error i get is:
    Exception in thread "main" java.lang.NoClassDefFoundError : Motorcycle:class
    However, i have Eclipse IDE installed and when i run the same program there,it runs perfectly.
    What could be wrong.Am using j2sdk 1.5.0.
    NB
    On the command prompt,compiling the program is not the problem but running it using:
    java Motorcycle.class
    Thanks

    When running a java program, you don't call the .class-File, you call the class itself and Java decides how it wants to find that class.
    So instead of "java Motorcycle.class" you should use "java Motorcycle".
    The command you used tries to exectue a class called "class" in the package "Motorcycle" which is obviously not what you want.

  • Error in running the Program SDRQCR21

    Hi,
    For a material,the sales order which are rejected are showning in MD04.When i try to run this program
    SDRQCR21,it gives me timed out error.
    Since there are lot of sales order for that material.
    Please can any one help me in this issue...
    Thanks
    Srini

    Hi,
    If we run the program,is the orders which are rejected gets deleted or any other scenario like delivery not created for the order etc will also get deleted from the MD04.
    Please clarify on this issue.
    Thanks
    Srini

Maybe you are looking for