Sunny Kumar

Ranch Hand
+ Follow
since Oct 27, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sunny Kumar

Accordint to me,its not possible.
Because the OS is executing "java program_name" in cmd and then continuing with the result after finishing it.
I think its just the flash which you will have to bear little.
18 years ago

Originally posted by peter huff:
gridLayoutFrame gridLayoutFrame = new GridLayoutFrame();
^



see the error carefully.
The line in the program should be:
GridLayoutFrame gridLayoutFrame = new GridLayoutFrame();
18 years ago
Guys...Thanks for all you prompt replies.
I have found the cause.
On refering to the Netbeans GUI tutorial, it was mentioned that when the project is build the appropriate jar file will be automatically added in a folder named lib under dist directory.
But in my case the lib folder was not at all created and neither the manifest file had any such entry.
So after correspondingly modifing the manifest file in the projects root folder (which I came to knew later thats it is this manifest file used by netbeans)and building the project, I made the lib folder under dist directory and placed the swing-layout-0.9.jar in it.
Thats it.The application executed smoothly.
Hope this helps to anyone facing similar kind of problem.
Don't know whether its a bug in Beta 2.
18 years ago
You can try to use the synchronise option with the block thats writing to the file..so that no other thread is allowed to read from it.
18 years ago

Originally posted by Layne Lund:
NetBeans must have the internal CLASSPATH set correctly for this to work. It just doesn't store the classpath in the jar's manifest file. Does your project include the jar file that this class lives in?



I am not geting you. As far as I know one can specify the classpath in the Manifest file. Its shown in link given by Alex Kravets,if not then what are you trying to mention in the foll. paragraph (italics) and I didn't get the last part of your question??


When you use the -jar option, it will ignore the classpath set with the -cp option. If you wish to use the -jar option, the classpath must be set correctly in the jar's manifest. Otherwise, you can include the jar file in the classpath (with the -cp option, for example) and indicate the class to execute as well.



I do included my jar file in classpath but still the problem.
18 years ago
Ya..you are right.I checked up the Manifest file and it didn't have the ClassPath entry. So can you please tell me how can it be done in Netbeans?
Secondly, as suggested by you I did try the java -jar with -cp path but it didn't work. I did see the jar files used by my application in netbeans and found that its swing-layout-0.9.jar and so specified the cp path accordingly..but that too didn't help.
And since I will be distributing my application how is it possible to attach all relavant jar files with it?
18 years ago
Ya..Addison Wesley JDBC API Tutorial and Reference Third Edition is a very good book. You can also have a look at JDBC bible.
I have developed a small UI using Netbeans 5 Beta 2.
Have 2 class files as:
1.Main.java : This files builds up my GUI
2.NewClass : Its sets the UI visible

The problem is when I select Run Project from Netbeans the application executes smoothly, but when I double click on the generated jar file nothing happens.When I tried to execute it from the dos prompt I got the foll message :

I am not understanding how Netbeans is able to run it and still the generated jar file doesn't work.
Where's the problem?
18 years ago

Originally posted by Ben Souther:
You certainly can use Tomcat as a standalone webserver.



Ya..agree with that.
I should have emphasized more on the word web-server because I think there has to be some features that only a web server is able to provide or atleast cnsidered best for.
[ December 30, 2005: Message edited by: Sunny Kumar ]
18 years ago
I forgot to add that you can't use Tomcat as a web server .
You can check for more info at Apache-Tomcat
18 years ago
If you are going to serve only static(such as HTML) pages then Apache webserver would suffice but if the pages being (dynamically) served are in JSP/Servlet then you need a container that can interpret them, for which we use Tomcat.Similarly, if you will be using PHP then you need to add its support in Webserver.
Webserver is used to just respond to the requests with feature such as load balancing, whereas containers( such as Tomcat) are used to manage the lifecycle of the pages generated using JSP and servlet..
If you need more info on the container specific responsibilty then you can check out either the JSP or Servlet specification.
18 years ago
Opensource can help you a little.
18 years ago
Nothing new.
Its the same as MVC.
18 years ago
Use thef first appraoch if you want to preserve the values across pages but if you are using the value only for the form then I would recommend the 2nd approach.
18 years ago
JSP
Check the Bunkhouse at javaranch.com
18 years ago
JSP