Filepath probs running Java w/ DOS and Java 2 SDK

Please help! I have been trying to get a .class file to run for the past four days, using DOS to run the file. I have tried to enter every filepath I can -think- of, and the program still will not run. I have even tried running the file on others' computers that also have a Java 2 SDK...and still cannot get the file to run. However, I know for certain that the file is correct and is able to be run....so that means that somehow I am not putting in the right filepath. I guess my question is....what's the file path?
Here's what I was told to do...which has not worked thus far...
My Java SDK filepath is: C:/Java2SDK1.4.0
I was instructed to open DOS, then, to get to here:
C:\Documents and Settings\Administrator\Desktop>I did so, and as instructed entered the filepath to the javac file inside the java sdk and after it, to put the filename with a .java extension. However, I ONLY have a class file. I don't have the .java file, nor was it ever handed to me.That filepath requested is: C:/Java2SDK1.4.0/bin/javac MathPrac.java
I entered the filepath, so my DOS prompt looked like this before I hit the enter key:
C:\Documents and Settings\Administrator\Desktop>C:/Java2SDK1.4.0/bin/javac MathPrac.javaI hit enter, and it gives me a LONG list of garbage. I even tried reversing the slash marks. Please help? This thing is due Monday and my instructor is refusing to return my emails. I don't want to fail this course due to an instructor being unwilling to assist a student, and a student having tried just about everything she could think of before finally coming here and asking for help.
Would it matter if the SDK for some reason won't recognize my .java files either? I even tried doing the filepath with a file I KNOW should work...and on computers it should have worked on...and could not get it to accept my filepath.
Any help would be very very very highly appreciated. Thanks!

Author: philip_ross
To run a .class file you have to use the java command (javac is the compiler which creates .class files from .java files). Try running
C:\Java2SDK1.4.0\bin\java MathPrac
Thank you for the suggestion, however when I attempted to run it, I got an error that said: Exception in thread "main" java.lang.NoClassDefFoundError: MathPrac
Isn't this an error that states that the name of the file and the class name inside the file are not the same? And if so, how can I check to see if they are the same if I don't have the .java file? I did double-check my spelling, tried it four times just to be sure.
To ChuckBing:
Hey, thanks for the tutorial! I'll take a look at that, too. It always helps to have other resources.
To jwenting:
<Grin>. Duly noted, and thanks. I was trying to keep from being -too- technical in my explanation of what was going on.

Similar Messages

  • Java.sql.Date and java.util.Date - class loaded first in the classpath

    I had two jar files which has java.util.Date and java.sql.Date class file. i want to know whether which class is loaded first in the classpath...
    I like to change the order of loading the class at runtime...
    Is there is any way to change the order of loading of class...
    I may have different version of jar files for example xerces,xercesImpl. some of the code uses xerces ,some of the code uses xercesImpl..i had common classes.
    I like to load the class with the same name according to the order i need..
    Can we do all these in Run time ?????

    I had two jar files which has java.util.Date and
    java.sql.Date class file. i want to know whether
    which class is loaded first in the classpath...
    I like to change the order of loading the class at
    runtime...
    Is there is any way to change the order of loading of
    class...
    I may have different version of jar files for example
    xerces,xercesImpl. some of the code uses xerces ,some
    of the code uses xercesImpl..i had common classes.
    I like to load the class with the same name according
    to the order i need..
    Can we do all these in Run time ?????That is meaningless.
    The classes you are referring to are part of the Java API. Third party jars have no impact on that. And you can't change to the order because java.sql.Data is derived from java.util.Date. So the second must load before the first.
    And if you have two jar files with those classes in them (and not classes that use them) then you either should already know how to use them or you should stop trying to do whatever you are doing because it isn't going to work.

  • Install Java (1.4) and Java (1.5) on the same Windows XP mc reqd for 2 apps

    I have a requirement to install 2 different versions of Java (1.4) and Java (1.5) on the same Windows XP machine. There are 2 applications one uses Java (1.4) and the other Java (1.5)
    Both the application is run by taking the JAVA Path , Classpath specified in the Environment variables on the Advanced tab in My Computer. How to achieve it ? Immediate help is required. Thanks in advance.

    {color:#ff0000}{size:20px}CROSS POSTED{size}{color}
    [http://forums.sun.com/thread.jspa?threadID=5333227]
    Cross posting is rude.
    db

  • Why not Deprecate java.util.Date and java.util.Calendar

    With the introduction of java.time, why did you not flag java.util.Date and java.util.Calendar. These classes have been a bane to every Java developer and should never be used again with the introduction of Java 1.8.

    Adding the @Deprecated annotation would only just provide a warning about an old API and recommendation to the developer(s) to no longer use it. Doing so would not break any existing library out there; in fact quite a number of constructors and methods on the Date class have already been flagged deprecated.
    The new java.time package is far superior to Date/Calendar.

  • Give me description about JAVA Proxy Runtime and JAVA Proxy Server

    Give me description about JAVA Proxy Runtime and JAVA Proxy Server with some examples.

    Hi,
    Java proxy runtime :
    Using the Java proxy runtime you can receive messages or send messages to the Integration Server.
    This will help you
    http://help.sap.com/saphelp_nw04/helpdata/en/64/7e5e3c754e476ee10000000a11405a/frameset.htm
    Java proxy server :
    The connection to the Integration Server by using the Java proxy runtime.
    This will help you
    http://help.sap.com/saphelp_nw04/helpdata/en/87/5305adc23540b8ac7bce08dbe96bd5/frameset.htm
    Regards
    Agasthuri Doss

  • Java Web Start and Java Preferences

    I am having trouble with Java Web Start and Java Preferences. I have tried reinstalling the update with the link http://www.apple.com/downloads/macosx/apple/application_updates/javaformacosx105 update6.html but to no avail. What else can be done ? Moreover the file /System/Library/Frameworks/JavaVM.framework/Versions/A/ seems to be in place, but Java Web Start wont open and Java Preferences can't access cache files. Any ideas about how to resolve this? I have been having issues with Java for a long time and have already done a clean Leopard reinstall and all the Combo updates. Java Web Start and Java Preferences worked correctly for a while after that but seem to have gone haywire again.

    bump

  • Java.util.Map and  java.util.HashMap samples

    Hi.
    Please, I need some code samples of java.util.Map and java.util.HashMap interfaces. I have problems to retreive objects in the map.
    Cheers,
    Cata

    Try the tutorial:
    http://java.sun.com/docs/books/tutorial/collections/index.html

  • Java.util.Date and java.sql.Date

    when i am trying to displaying date in my jsp page errors occurs saying that java.util.date and java.sql.date are matching..
    i have some sql statements which i need to execute in the page.so i cant delete that import sql statement.
    so what is the solution for this.
    i want to display the date as 19th april 2003....in the jsp page.
    thank u

    You should use full names.
    java.util.Date date;
    java.sql.Date sdate;
    ..And it may be a good idea to delete one of the two "import" declaration of packages.

  • Fresh Bits! Oracle Java ME Embedded and ME SDK updates

    Oracle has just refreshed the Java ME Embedded 3.3 EA and ME SDK 3.3 EA binaries.
    For more information, please see my blog: https://terrencebarr.wordpress.com/2013/06/13/fresh-bits-oracle-java-me-embedded-and-me-sdk-updates/
    Best regards,
    Terrence Barr
    Principal Product Manager, Oracle

    Hello,
    I am just viewing this course now and am stuck on finding the raspberry pi 8.1 EA binary:
    oracle-jmee-8-1-ea-raspberrypi-linux-bin-b01-20_may_2014.zip
    The only thing I can find on this page (which is what the document your link brings up has)
    http://www.oracle.com/technetwork/java/embedded/javame/embed-me/downloads/index.html
    is 8.0:
    oracle-jmee-8-0-rr-raspberrypi-linux-bin.zip
    Please help...
    Thanks

  • Conversions between java.util.Date, java.util.Timestamp and java.sql dates

    I am coding a hoilday booking system using JSP to interact with a SQL Server database. On my JSP form which retrieves the information I have a little javascript pop-up date selector which appears to be returning a Timestamp value although the string value is visable in the entry field. Can I pass this to a javabean as a Timestamp, so far I have only passed strings? Also I then have to enter it in the database and so will need to convert it to an sql date type but I dont know which one is best. Previous to using the Timestamp returning calendar I was just entering text and parsing it to a util.Date in the bean and then converting that to an sql.Date for entry in the database. That worked fine but I want to use the pop-up any ideas? Also my bean won't compile if I declare java.util.Timestamp t;(cannot resolve symbol Timestamp !) even though I have imported util.

    First of all, java.util.Timestamp does not exist. You probably need java.sql.Timestamp.
    java.sql.Date and java.sql.Timestamp inherit from java.util.Date. So converting from java.sql.Date or java.sql.Timestamp to java.util.Date is easy, you don't have to do anything.
    To convert a java.util.Date to a java.sql.Timestamp, do something like this:
    import java.sql.Timestamp;
    import java.util.Date;
    Date date = new Date();
    Timestamp ts = new Timestamp(date.getTime());Jesper

  • Differences between Java Virtual Machine and Java HotSpot ??

    I am little bit confused between Java Virtual Machine and Java HotSpot.
    My understanding is:
    Java Virtual Machine is the environment to execute Java programs. I think I could understand this part.
    However, the description says, "The Java HotSpot product line consists of a server-side and a client-side virtual machine that share the Java HotSpot runtime environment, but have different compilers suited to the different performance characteristics of clients and servers."
    I am confused with server-side virtual machine. what is that?? Does it mean the environment to execute Java programs remotely through network?? For example, Java plug-in.?? Please advise.

    Hotspot is a JVM.
    Hotspot has different configuration settings. Some of those settings are better suited for a client application. Some are better suited to server applications.

  • Java Plug-in and Java Web Start Will Not Start In JDK 1.4.2_03

    I can't get the Java Plug-in or Java Web Start to start in JDK 1.4.2_03, but they did work when I first installed the JDK months ago. When I double-click either icon an hourglass displays for a second and then disappears without opening the window. I don't even get an error message.
    I've tried reinstalling the JDK three times. On the last reinstall, I followed some instructions on how to completely remove the JDK. Here's the URL of the instructions I followed:
    http://www.pcreview.co.uk/forums/thread-295773.php
    Strangely JBuilder stopped working too.
    I'm running Windows 2000.
    Help!
    Thank you!

    Hi
    Once u have got the Certificate from the Verisign there will be 3 chains in that cert(what i think)......Get the other 2 certificates from U r cert(like intermediate and Root)....and install them in the trust and Intermediate folder...
    other option is u generate the CSR keeping Sys Date 1 month ahead..( i tried like this only..it worked)
    Regards,
    Anand

  • Lion Server Java Control Panel and Java applications empty?

    I have installed FileMaker Server 12 on a Lion Server (10.7.5). The server is pretty clean, only a few users have been set up for CalDAV and CardDAV use in a small company. While installing the FileMaker software shouted for Java, which I installed from Oracle, version 7 update 10 (used the link).
    But Java is not running fine as it seems. When I open System Preferences - Java to open the Java Control Panel, the panel shows up but is completely empty. And so for any Java program I run, all windows will show up empty.
    Any ideas anyone?

    Try clearing the java cache manually.
    /Users/username/Library/Caches/Java/cache/
    if that doesn't work follow this process.
    Uninstall the JRE7
    Restart
    Install Java for OS X 2012-006
    Restart
    Install JRE7
    Restart
    Lastly, if this is a hackintosh you may be fighting a uphill battle. I saw a known issue posted by oracle with some graphics cards that produced this issue on windows.  

  • Use 2 jre versions (Java 5.x and Java 6.x) on diferent web pages.

    On windows XP SP3.
    I need use on internet explorer 7 and firefox 3, 2 differents JRE versions for two diferent servers
    example:
    - "www.site1.com" needs java 5.x (don't work with java 6.x)
    - "www.site2.com" needs java 6.x (don't work with java 5.x)
    If i have installed both versions, internet explorer and firefox even uses java 6.x, and i only can use java 5.x if uninstall java 6.x
    I need use to default use: java 6.x; except for "www.site1.com" that i need use java 5.x
    How can use both JRE versions?

    Questions: Do you plan to use the same web browser? The earlier applet running on JRE 1.5.x cannot run on 1.6 ? Sun puts forth a lot of effort in attempt to ensure that applets are forwards compatible.

  • I there any dependcy between Java Enterprise Edition and Java standard Edit

    Hi Friends,
    Is J2EE 1.4 uses Java SDK 1.4 or 1.5.Please reply as earlier as possible.It is urgent
    Thanks
    Bye

    Each version of the Java EE platform must be able to run on the associated version of the Java SE platform. So, J2EE 1.4 must be able to run on J2SE 1.4 , Java EE 5 must be able to run on Java SE 5, etc. Note that this doesn't mean a particular implementation of Java EE can't be run with a more recent version of the JDK. For example, the J2EE 1.4 SDK can be run with J2SE 1.4 or Java SE 5. The key is that both the implementation of the Java EE platform and the applications written to that particular release of the platform must write to the corresponding Java SE version API. In other words, neither a J2EE 1.4 implementation nor a J2EE 1.4 application should make use of an API that was added in Java SE 5.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Loops will not show up in browser

    Im new to Garageband..still, I keep getting a message that no apple loops are installed even though I know they are. I have even installed a Jampack and another set of ProSessions loops. When I try dragging the folders into the broswer, they still do

  • Installing photoshop elements 1.0 in windows 8.1

    i cant install photoshop elements 1.0 in windows 8.1.Keep asking for internet explorer 4.I use compatibility windos 98/me and wont work either.

  • My photoshop is not linking with the creative cloud

    I am logged into the Creative Cloud but when I  run my Photoshop program it tells me I need to log into the creative cloud to access my library.

  • Moved all content to a Drobo, but can't get it into my iTunes Library

    I've got a lot of music and video content spread out over several drives, including two external 1 TB MyBooks. I purchased a firewire Drobo to help manage this content, and over the past few weeks, I've copied over all of the media files onto the Dro

  • After update ,itunes cant play video

    hi ,every body! , i ve got a problem & deffinitely need help with.                            The problem:                             After i install update , itune crashes when i click play video                              does anyone have the sa