Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / December 2005

Tip: Looking for answers? Try searching our database.

How to avoid the message "Unknown source"?

Thread view: 
Richard - 10 Dec 2005 17:36 GMT
Before I used the option -classic with java but it is not supported anymore.

I would like to know the line that caused the problem in my program
without using a debugger.

Thanks in advance for your answer.

Richard
Rhino - 10 Dec 2005 18:03 GMT
> Before I used the option -classic with java but it is not supported
> anymore.
[quoted text clipped - 3 lines]
>
> Thanks in advance for your answer.

It's awfully hard to help someone who asks such a vague question.

You haven't provided any source code and you haven't even identified the
nature of your problem. Is it a compile error? A runtime error? Or simply a
program that doesn't do what you want it to do?

If you are getting a compiler error, javac, the java compiler, should be
giving you a reasonably clear error message as well as an indication of
which line of the source code is the problem. If you are geting a compile
message but don't understand the message, please post at least the source
line (and ideally some of the context of the source line) and the message
and we can try to help you understand the problem.

If you are getting a runtime error, you should be getting a reasonably clear
exception message that will give you a clue about your problem. If you don't
understand the exception message, post some source code and the full
exception message, including stacktrace, and we'll try to help.

If the program is simply not doing what you want it to do, you will need to
provide some code, explain what the program is doing, and describe what it
should be doing if you want some help with understanding the problem.

But unless you provide more information, there is very little that anyone
can do. Your post simply tells us that something is broken without giving us
anything that we can use to diagnose the problem.

I will make one guess though: if your program used to work when you used
the -classic option, your program probably uses deprecated classes that are
no longer supported in your new version of Java. This will probably require
you to modify some of your code before it will compile cleanly again. But
without more information, I can't be sure this guess is accurate.

Rhino
Heiner Kücker - 10 Dec 2005 18:15 GMT
> Before I used the option -classic with java but it is not supported
> anymore.
>
> I would like to know the line that caused the problem in my program
> without using a debugger.

Use the compiler option 'include debug information'

javac -g

The message "Unknown source" raised if the JVM optimized the code.

Signature

www.heinerkuecker.de



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.