vijay kumar

Greenhorn
+ Follow
since Nov 16, 2000
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 vijay kumar

Hi guys,
am a novice in this area and am looking forward to know about java naming service (jndi) & other services (ldap for example)and how it fits into overall application scenario. could someone share a word or some link on that.
thanks
vijay
20 years ago
Hi guys,
am a novice in this area and am looking forward to know about java naming service (jndi) & other services (ldap for example)and how it fits into overall application scenario. could someone share a word or some link on that.
thanks
vijay
20 years ago
installshield was a useless product (lack of documentation) so we are using InstallAnywhere
20 years ago
hi,
i came across hurdle of trying obtain image from the jar file.
heres what i plan to do
a.URL imageURL = getClass().getResource("some.jpg");
b. toolkit.getImage(fileURL);

does this sound reasonable. i am going to try it out.
also does someone believe there is better way of drawing image than using toolkit to get image and then draw it with drawImage?
thanks
vijay
21 years ago
hi,
i came across hurdle of trying obtain image from the jar file.
heres what i plan to do
a.URL imageURL = getClass().getResource("some.jpg");
b. toolkit.getImage(fileURL);

does this sound reasonable. i am going to try it out.
also does someone believe there is better way of drawing image than using toolkit to get image and then draw it with drawImage?
thanks
vijay
21 years ago
Lemme answer myself, its all about compilation technology.remember java is set of rules and anyone who follows that can make the tool and not just sun
There r two stages of compilation
1. Convert java source to byte code
one tool is javac.exe as obtained from sun. there very few others who make similar tools coz this job is burdensome and with few rewards, coz it doesn't benefit many.
2.convert byte code to native code
initially we had what we called interpreters, which r basically compilers but they were kind of slow.
so they got jit compilers which is an extension to earlier technology. basic tenet is 20% of the methods get called 80% time so why waste time compiling all. so methods are compiled when they are needed and native executable code is generated accordingly.
many companies have jit compilers and there is money here coz the reward is being able to produce code that runs faster.

3. now how the heck it affects we developer
a. decide on which jit compiler to use
b. decide when to turn jit on or off. thumb rule is if there is lopsided usage of some methods go for jit.
though i think u still need to see some literature coz am no expert on this.
so here is one link http://www.bearcave.com/software/java/comp_java.html
regards
vijay

Originally posted by vijay kumar:
hi guys,
while reading basic tool doc for java under windows following lines stumped me. Would some kind soul enlighten me on the following.
1.When a class is loaded, the JIT translates the class bytecodes into native machine code. Using a JIT causes a slight delay after each class load, but can improve overall program performance. In some cases, execution time will improve by a factor of ten.
my comment: ok
2.If the JIT is disabled, bytecodes are executed directly by an interpreter.
my comment: hey wait a minute,a.first which interpreter? and b. does mean that there was no interpreter being used when we use jit? c. what exactly is this jit
i thought jit was interpreter, interpreting bytecode in form of .class files and generating the native executable
thanks in advance
vijay


21 years ago
hi guys,
while reading basic tool doc for java under windows following lines stumped me. Would some kind soul enlighten me on the following.
1.When a class is loaded, the JIT translates the class bytecodes into native machine code. Using a JIT causes a slight delay after each class load, but can improve overall program performance. In some cases, execution time will improve by a factor of ten.
my comment: ok
2.If the JIT is disabled, bytecodes are executed directly by an interpreter.
my comment: hey wait a minute,a.first which interpreter? and b. does mean that there was no interpreter being used when we use jit? c. what exactly is this jit
i thought jit was interpreter, interpreting bytecode in form of .class files and generating the native executable
thanks in advance
vijay
21 years ago
Thanks Carl and Hameem somewhere in javaranch. Here's what it took to run
a. jar cmf mainClass.txt one.jar *.class
NB : the order m first(mainClass.txt) and then f(one.jar) as we have written cmf
b. content of mainClass.txt
Main-Class: Hello1<Enter>
Thats the catch above, u need to press enter key and then save else u it'd be unable to locate main class file
c. now just run as java -jar one.jar Hello1
no more jarring notes to bother,
enjoy
vijay
21 years ago
Hi all,
I tried to run the following :java -jar one.jar
and got following message: Failed to load Main-Class manifest attribute from one.jar
I hope someone would be able to help me out on this. Here's all that I wrote to get one.jar
1.created a jar file of single .class file
c:\jdk1.2.2\bin>jar cf Hello.class

2.created a txt file to modify manifest file
filename = mainClass (no .txt appendage)
its content: Main-Class: Hello1
3. now i modify manifest file as following and also add the starting file Hello1.class
c:\jdk1.2.2\bin>jar cmf mainClass one.jar Hello1.class
now u may like to know when i list one.jar file components I do not see Hello.class, but only Hello1.class Meta-Inf anyway is there.

4. i run my .jar file as
c:\jdk1.2.2\bin>java -jar one.jar
the message is same as given above
all i was trying is to do is run java on a jar file. so all helps in this regards would be appreciated. also one more thing, whats happening after step 3,why's one.jar showing only Hello1.class, where's Helo.class?
With thanks in advance,
Vijay


[This message has been edited by vijay kumar (edited December 04, 2000).]
21 years ago
thanks carl, it works
21 years ago
hi,
suppose my classpath is set to c:\project and things r running fine and i want to run a file that is defined without a package(say A.class) how do i run it from C:\
like this C:\> java -cp -classpath c:\project\A
it gives problem,
could some good samaratin tell me how to go about on this one?
regards
vijay
21 years ago
hi,
suppose my classpath is set to c:\project and things r running fine and i want to run a file that is defined without a package(say A.class) how do i run it from C:\
like this C:\> java -cp -classpath c:\project\A
it gives problem,
could some good samaratin tell me how to go about on this one?
regards
vijay
21 years ago
hi,
thanks to all , what i found is that:
a. if u have set classpath variable then we can execute from anywhere
b.-cp and -classpath r one and same
c. if .class file lies where classpath is not pointing to use as c:\project A
(A.class)
regards
vijay
[This message has been edited by vijay kumar (edited December 03, 2000).]
Hi all,
I plan to take a laptop for practice.now by default that would come with 98 so I think I'll have to put NT as well.Now what minimum config would u guys suggest? Would an Intel 600MHz pentium with 64 Mb suffice ?
With thanks,
Vijay

[This message has been edited by vijay kumar (edited November 17, 2000).]
21 years ago