Solved

More Trouble in Java Paradise

Posted on 1997-07-08
3
160 Views
Last Modified: 2010-04-16
OK, after spending the last two weeks struggling to get the JDK to work on the NT side, I'm now fighting the Windows '95 side.

I've pretty much done everything I should do, setting the PATH and the CLASSPATH to point to my Java directory.  Despite this, I keep getting the error message "can't read HelloWorld.java."  I found a thread named "can't compile" here at the Expert's Exchange, and I'm going to try some of those tips, but the thread gets a bit convoluted at the end, so I'd appreciate someone picking it up again.  

I've also noticed when I type DIR to check to see if my file is, indeed, where it should be, that the file name is returned with the 8 character name, but then the full character name is "HelloWorld.java.txt."  Is the appendage of this final ".txt" causing the problem?  I'm assuming this happens b/c of the association of the file with Notepad.  Is there some way to kill this association?

Thanks!

Raydot.
0
Comment
Question by:Raydot
  • 2
3 Comments
 
LVL 3

Author Comment

by:Raydot
ID: 1222792
Edited text of question
0
 
LVL 1

Accepted Solution

by:
vmanocha earned 50 total points
ID: 1222793
"HelloWorld.java.txt."  - this surely won't compile. And, yesthis is the problem with notepad that it appends a .txt afterthe name that you provide. One of the ways that I get around thisproblem is by providing the name in quotes. For eg. if I wereto save a file with name - HelloWorld.java, in the filesave/saveas dialog, i would give the name as "HelloWorld.java" (including the quotes). This ensures that notepad doesn't add the .txt extension.
0
 
LVL 3

Author Comment

by:Raydot
ID: 1222794
You forgot to mention that the file had to be saved as type "All files," but other than that, you were right on the money.  I was up and running in no time.  Also, I'd like to point out for future readers that this only works with Notepad, and not Wordpad.

'Dot.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bunnyEars2 challenge 6 70
json example 39 115
HashMap Vs TreeMap 12 49
Python Assistance 7 36
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now