File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Problem with Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problem with Netbeans" Watch "Problem with Netbeans" New topic
Author

Problem with Netbeans

Khuzema Dharwala
Ranch Hand

Joined: Apr 26, 2010
Posts: 47

Hello guys I have witnessed a weird issue while writing a standalone java app in Netbeans, when I am running my app from within the IDE the changes which I made in my java files are not getting reflected back in the output but running the same class files from command prompt is giving the expected output.

Even the project jar file is giving the correct output when launch from command line, but the problem occurs only when launching the application from within the IDE, following is what I am doing:

Open the project ---> made changes into a java file ---->Right click on the project and select (Clean and Build)---->Right click on project and select Run---->output doesn't reflect the changes made in the java file


I am using Netbeans 7.3 and java 6 compiler and interpreter under its configuration I have enabled "Compile on Save" option.Today I started getting this issue and previously it was working fine and also I would like to add that the issue is only with a single project , other projects within the IDE responds fine when changes are made within their codes.

Any kind of help in this matter is highly appreciated.

Thanks





OCJP 6
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2718
    
    6

Check the source (src) folder for your project and the output path.
How are you creating the jar that runs from the command prompt? By exporting as Jar(executable)?


SCJP, SCWCD.
|Asking Good Questions|
Khuzema Dharwala
Ranch Hand

Joined: Apr 26, 2010
Posts: 47

Thanks Amit for your reply, I am sorry I don't understood your query regarding source folder and the output path, can you please describe it further ?

Regarding jar file well after building the project I am going under path_upto_projectname/dist from command prompt and executing the jar by using the command "java -jar filename"

Thanks
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2718
    
    6

Khuzema Dharwala wrote: I don't understood your query regarding source folder and the output path, can you please describe it further ?

I meant to ask if you modified the source files or the output files folder in project settings.
Other way to ask this is do your .java files and .class files show updated timestamps when you modify and save the file?
Khuzema Dharwala wrote:Regarding jar file well after building the project I am going under path_upto_projectname/dist from command prompt and executing the jar by using the command "java -jar filename"

So your build has no problem, might be you have set an older version of the same project as the main project while executing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Netbeans