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 04-23-2008, 06:03 AM
Member
 
Join Date: Dec 2007
Posts: 30
Leprechaun is on a distinguished road
[SOLVED] An annoying warning everytime I compile
Everytime I compile a file I get this warning:
Quote:
Note: C:\Documents and Settings\<user name>\Desktop\Multiple Desktops\DesktopArray.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Process completed.
The file performs some basic file creation and movement in a folder in the C drive. If the code is needed I could provide it. I was wondering if there is a way I could stop this message from displaying every time I compile. I use JCreator if that matters at all...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-23-2008, 06:14 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,543
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Seems this warning related to your application. Did you get this warning for simple applications, just like printing a message?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-23-2008, 06:21 AM
Member
 
Join Date: Apr 2008
Posts: 3
maxim is on a distinguished road
ive had this. basicly if you have any sort of Collection. like a ArrayList, HashSet ect you have to tell the compiler what Type of variables are going to be in it. for example

ArrayList list = new ArrayList(); will give u that warning

ArrayList<String> list = new ArrayList<String>(); will get rid of the warning because you told the compiler that your going to put strings in it. just change it to Integers or Objects or whatever your going to put in it.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-23-2008, 06:25 AM
Member
 
Join Date: Dec 2007
Posts: 30
Leprechaun is on a distinguished road
Solved
Thanks, that solved it. I was doing exactly what you said.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-23-2008, 06:28 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,543
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Interesting, Netbeans or Eclipse doesn't give this warning at all. Typically ArrayList can hold any primitive data type, no need to specified. What Java version you guys use?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-23-2008, 06:30 AM
Member
 
Join Date: Dec 2007
Posts: 30
Leprechaun is on a distinguished road
I've got 1.6.0_01
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 04-23-2008, 06:36 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,543
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I used 1.6.0_05 with Netbeans. So there is a bit different(actually improvement) in exceptions. Because I don't get such warnings in my applications.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 04-23-2008, 09:03 AM
Member
 
Join Date: Apr 2008
Posts: 28
rico16135 is on a distinguished road
netbeans 6.0.1 gives me that message
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 04-23-2008, 09:11 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,543
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Use the same version and not for me. I don't think IDE effect for this. JDK version is the case.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
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
WARNING NetBeans HTTP Monitor bbq JavaServer Pages (JSP) and JSTL 3 09-19-2008 07:02 PM
doesn't compile?! jon80 New To Java 8 06-14-2008 06:42 PM
Unable to compile gapper New To Java 2 01-14-2008 05:31 PM
Not able to compile bugger New To Java 2 01-09-2008 11:13 PM
warning: page has expired Peter Web Frameworks 2 07-04-2007 08:45 AM


All times are GMT +3. The time now is 06:54 PM.


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