Ankitt Gupta

Ranch Hand
+ Follow
since Feb 19, 2009
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 Ankitt Gupta

Jesper Young wrote:Can you show us the source code of class Admin?



It is now running.I removed the package and included the .class files in same directory.I surmise package is the problem.



Thank you for being so patient.
13 years ago

Rob Prime wrote:

Ankitt Gupta wrote:"Exception in thread "main" java.lang.NoClassDefFoundError :MyPackage/Admin (wrong name: Admin)
at .......
at....... "


Wait a sec. Is your Admin class put in a package called MyPackage? Not just in the file system, but does its file start with "package MyPackage"? Please remember that Java is case sensitive, also in package names.



I checked it.There is no problem with name

13 years ago

Rob Prime wrote:The JAR file is nothing more than a glorified ZIP file, and the MANIFEST.MF file in it is nothing more than a glorified text file.



Here is the glorified thingy

Manifest-Version: 1.0
Created-By: 1.6.0_04 (Sun Microsystems Inc.)
Main-Class: MyPackage.Admin

13 years ago

Rob Prime wrote:And what's the contents of MANIFEST.MF inside the JAR file?



How to see the contents of Manifest.MF ?
13 years ago
Manifest.txt

Main-Class: MyPackage.Admin


Admin.jar

META-INF
META-INF/MANIFEST.MF
MyPackage/Admin.class
MyPackage/Bill.class
MyPackage/Insert.class
MyPackage/Update.class
MyPackage/View.class

The above are the contents of Manifest.txt and Admin.jar









13 years ago

Matthew Brown wrote:

Ankitt Gupta wrote:I don't reckon zipping it would be a complete solution as the client will still need to invoke via command line.I want that with one mouse click the application starts running.



Go through the tutorial I linked to, especially the part "Setting an Application's Entry Point".

If you've followed that approach, and they've got their computer configured so that .jar files are executed by the Java runtime, then it will run with a double-click.



I modified the Manifest.txt but still it is giving an exception when i invoke from command line

"Exception in thread "main" java.lang.NoClassDefFoundError :MyPackage/Admin (wrong name: Admin)
at .......
at....... "

And when i directly click by mouse it gives "Could not find the main class.Program will exit"
13 years ago

Mark E Hansen wrote:Java applications are run by a Java runtime. If the customer will not have Java installed on their system, then it will have to get installed somehow. Either you will have to tell them to do it, or build an installer to do it.
If Java is installed, then you can run the application from the Jar file using the "java -jar ..." command from any launching mechanism you wish to use.

Good luck.



What are the launching mechanisms ?
13 years ago

Matthew Brown wrote:Hi,

What you need to do is package them up in a JAR file (basically a zip file - it stands for Java ARchive). These are then very simple to distribute.

Sun have got a fairly comprehensive tutorial here: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

Also, if you're using a modern IDE (e.g. Netbeans), it's going to be able to build the JAR file for you - check out the documentation of whatever tool you're using.

(This isn't specific to Swing or any other library, so it really ought to be in a different forum).



I don't reckon zipping it would be a complete solution as the client will still need to invoke via command line.I want that with one mouse click the application starts running.
13 years ago
hello ranchers i am an engineering student.

I am developing a software in Java Swing which i want to sell it to a client.I have written all the source code.I have put the .class files in one folder
The problem is that i don't know to wrap it up and give the complete set up to the client so that he can install it without any intricacies.Please help me out
13 years ago
Develop a JAVA servlet/ JSP application:
Have a set of at least 10 questions and their corresponding answers. Please do not use a database to store these. You may use a file or use static variables in your code for the Q&A. Every time the application is accessed it would show a question and a multiple choice of 4 answers. It would wait for the user input (through radio buttons and 'submit' button).

If user input is correct, it displays "Congratulations. Your answer is correct!"

If user input is incorrect, it displays "Sorry. The correct answer is xxx"

After every Q&A, it would ask the user if he wants to answer another question. If 'yes', then it displays another question from the pool. If 'no', then it says "Bye. Please Visit Later"

NOTE:
1. The questions that are displayed should be randomly selected so that every time the application is loaded, the user is presented with a different question
2. In any given Q&A session, the system should not display the same question twice


I have develop the following 10 JSP's for each question.


JSP1.jsp



S_JSP1.jsp


I want to ask how to achieve the following...

NOTE:
1. The questions that are displayed should be randomly selected so that every time the application is loaded, the user is presented with a different question
2. In any given Q&A session, the system should not display the same question twice


14 years ago
JSP

Jan Cumps wrote:It returns an object that implements Connection.

Regards, Jan




Thanks for replying Jan
You mean to say that there is some anonymous class that implements it?
Hi Ranchers

As we know we can't make objects of interfaces.But while writing JDBC codes the getConnection() method returns Connection object...How?
Please clarify this
I want to apply for this job. what is the procedure?
14 years ago
i too surmise you are underpaid.Between which MNC you work for?
14 years ago