Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. I am using Netbeans IDE and I want to make my project(named Project) into a jar file. But I am getting an Error while building it. Error i am getting during building is:-

Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Copying 9 files to C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\classes
compile:
Created dir: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\dist
Copying 1 file to C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\nbproject\build-impl.xml:999: Existing manifest C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\null462959379 is invalid
BUILD FAILED (total time: 11 seconds)

I have images(.jpeg),MS-Access file,.java,.form file in src.
Please help me.
and if you have any link which can help me please share it with me
Posted
Updated 18-Jun-13 16:56pm
v3
Comments
Prasad Khandekar 18-Jun-13 0:22am    
Check line 999 in your build-impl.xml. I think the error is at that line. The other Xlint related lines indicate warning and are likely related to unspecified generics. Specifying -Xlint:unchecked will print those lines which can possibly be corrected to remove these warning during compile time. Try deleting the null462959379 manifest file.

Regards,

1 solution

Try adding the following element in <javac></javac> section:
HTML
<compilerarg value="-Xlint:unchecked" />


--Amit
 
Share this answer
 
v2
Comments
Anoop Kr Sharma 18-Jun-13 3:46am    
ant -f "C:\\Documents and Settings\\Administrator\\My Documents\\NetBeansProjects\\Project" clean jar
init:
deps-clean:
Updating property file: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\built-clean.properties
Deleting directory C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build
clean:
init:
deps-jar:
Created dir: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build
Updating property file: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\built-jar.properties
Created dir: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\classes
Created dir: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\empty
Created dir: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\generated-sources\ap-source-output
Compiling 10 source files to C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\build\classes
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\JTableDatabase.java:25: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
columnNames.addElement( md.getColumnName(i) );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\JTableDatabase.java:32: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
row.addElement( rs.getObject(i) );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\JTableDatabase.java:34: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
data.addElement( row );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\JTableDatabaseUser.java:25: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
columnNames1.addElement( md1.getColumnName(i) );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\JTableDatabaseUser.java:32: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
row1.addElement( rs1.getObject(i) );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\JTableDatabaseUser.java:34: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
data1.addElement( row1 );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\userpage.java:236: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
columnNames.addElement( md.getColumnName(i) );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\userpage.java:243: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
row.addElement( rs.getObject(i) );
where E is a type-variable:
E extends Object declared in class Vector
C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Project\src\project\userpage.java:245: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type Vector
data.addElement( row );
where E is a type-variable:
E extends Object declared in class Vector
Note: C:\Document
Prasad Khandekar 18-Jun-13 5:49am    
Hello Anoop,

As you can see from the log, all are warning. Adding Xlint actually helps you identify the lines where these warning (mostly occurring because of generics) are present.

Have you tried deleting the file identified by ant variable tmp.manifest.file? Elase please open that file in notepad and paste it in your question using Improve question option.

Regards,
Anoop Kr Sharma 19-Jun-13 0:14am    
@Prasad Khandekar Specially thanx for Your Reply

I have created jar file of my project but with some problem.
Actually i have created a splash Screen for My project and use these line in Manifest file
=====
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
SplashScreen-Image:Project/Splash_Screen_anoop.jpg
^
|
after removing splash screen line my jar file created
Anoop Kr Sharma 18-Jun-13 3:47am    
After adding <compilerarg value="-Xlint:unchecked">
Anoop Kr Sharma 18-Jun-13 3:54am    
JtableDatabase.java file:-
package project;

import java.awt.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;;

public class JTableDatabase extends JFrame{
public JTableDatabase()
{
Vector columnNames = new Vector();
Vector data = new Vector();

try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect =DriverManager.getConnection("jdbc:odbc:doct");

String sql = "Select * from doctorinfo";
Statement stmt = connect.createStatement();
ResultSet rs = stmt.executeQuery( sql );
ResultSetMetaData md = rs.getMetaData();
int columns = md.getColumnCount();
for (int i = 1; i <= columns; i++)
{
columnNames.addElement(md.getColumnName(i));
}
while (rs.next())
{
Vector row = new Vector(columns);
for (int i = 1; i <= columns; i++)
{
row.addElement( rs.getObject(i) );
}
data.addElement( row );
}
rs.close();
stmt.close();
}
catch(Exception e)
{
System.out.println( e );
}
JTable table = new JTable(data, columnNames);

JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );

JPanel buttonPanel = new JPanel();
getContentPane().add( buttonPanel, BorderLayout.SOUTH );
}






}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900