Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2007, 06:18 PM
mew mew is offline
Member
 
Join Date: Nov 2007
Posts: 70
mew is on a distinguished road
Unresolved compilation problem
Following piece of code is not compiling.

Code:
File testFile = new File("C:\Temp\blah.txt");
Exception:

Code:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-30-2007, 11:53 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 839
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Going to need to see some more code there champ, that piece of code you posted looks good to me. "...blah.txt" doesn't need to exist for that line to compile, so your error is elsewhere. For example:

Code:
File testFile = new File("/home/captainmorgan/Desktop/testfile.txt"); try { System.out.println("Successfully created on the desktop: " + testFile.createNewFile()); } catch (java.io.IOException ioE) { System.out.println("Exception thrown biatch"); }
does just what I intended by creating the new file, so that line of code you have is currently and at this point irrelevant. And that error message you're getting is a little vague without seeing more code.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-30-2007, 08:17 PM
Member
 
Join Date: Dec 2007
Location: KSA, Riyadh
Posts: 9
AralX is on a distinguished road
ummm. the Error is
"Exception in thread "main" java.lang.Error: Unresolved compilation problem:"
are u sure it is the line that isn't compiled ?
did try to handle "Security,FormatterClosed,FileNotFound"Excepti ons ? cause once my compiler wouldn't compile till I full handle the main exceptions.

and do what C.Morgan told you
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unresolved compilation problem mew New To Java 3 12-11-2007 12:49 PM
compilation error with Jcreator Heather JCreator 2 06-30-2007 05:12 PM
compilation issue orchid Eclipse 2 04-20-2007 01:51 AM


All times are GMT +3. The time now is 04:59 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org