Solved

java coding

Posted on 2012-03-22
3
303 Views
Last Modified: 2012-03-22
so I'm trying to learn how to code with Java, and I'm making some progress, but I have something happening that is confusing me
twice now, with my tiny little "programs", I run javac at the command prompt on the file.java file I am trying to compile, and javac doesn't report any errors, but it doesn't create a file.class file like all the other "programs" I have created so far.
prior to this, i have pretty much had typos, which i track down with the help of the error messages that javac provides.
any ideas why javac would run without errors but not make a .class file?
0
Comment
Question by:JeffBeall
  • 2
3 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 37754380
Post your commands

javac would always report errors unless it creates the .class file in some other folder where you are not lookig for it?

Post exactly your commands
0
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 37754405
this guy repirted the case when javac failes silently when some third party class is missing, but I think he still didn't notice something, or did something incorrectly:
http://stackoverflow.com/questions/8295538/javac-not-producing-output

I never saw javac silently failing

yiou cna still try

javac -verbose MyFile.java

and post your operations
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 37754427
When i read your comment i looked closer and at

class name {

was different than when i ran

javac name2

I changed name after class to name2, and sure enough, name2.class showed up.
I had been changing name.class, expecting it to be name2.class.
Thank you for the help.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

786 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