jignesh soni

Ranch Hand
+ Follow
since Dec 10, 2007
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 jignesh soni

My son is in grade 9. He is beginner in Java and Python.
Is there any online training available, where he can get his basics well ?

Thanks
5 months ago
JDK 11, Windows 10

HOw to check JVM performance ? There is some kind of interface or utility that comes with JDK. Someone showed me , but I forgot.
Do I need separate app for that OR can I just use available built in utility / interface ?

Thanks
2 years ago
I see two options on Oracle site
Windows x64 Installer - Its an exe file of 161 MB
Windows x64 Compressed Archive - Its a zip file of 171 MB

Which one shall I use to install JDK ? Whats the purpose of both files ?

Thanks
2 years ago
I want to install Java on my laptop. I need JDK.
1) WHen I visit Oracle website to download, I see Windows Installer.  Is Windows Installer same as JDK or is it a tool to help install JDK ? If so, do I need to download JDK and Windows Installer both ? Where can I get JDK from, because on Oracle website I only see Windows Installer.
2) When I install JDK, I guess I don't need to install JRE and JVM separately. Everything gets installed with JDK.
3) When do I need to install JVM and JRE separately ?

Thanks
2 years ago
Thanks for the link.

I was reading that link.

Note that the classes which implement the Java 2 SDK tools are in a separate archive from the bootstrap classes

what is meant by Java 2 SDK tools ? Is tools something different from classes ?
Please give some examples of SDK tools. I may be using it, but I am not aware they are called SDK tools

In general, you only have to specify the location of user classes. Bootstrap classes and extension classes are found "automatically".

What about core java classes. It does not say anything about core java classes and packages. Are core java classes known as extension classes ? If not, then how are these classes found ?

Thanks
8 years ago

They are included with the Java installation, and the compiler knows where they are.

I understand that they are included with java installation, but how do compiler finds these classes ? How is classpath set for these packages ? Can I see them in environment variables ? If not, then how is classpath set ?

They line inside a file called rt.jar (I think) and the compiler is programmed to look there

So, is rt.jar set in some classpath ? When compiler starts looking for some classes it will look in environment variables. So is this rt.jar set in any environment variable ? If compiler does not find classpath in environment variables, does it look for anywhere else ? If no, then how is rt.jar set to be made available to compiler ?

Thanks
8 years ago
JDK1.6 is installed on computer.
When I create a new Java class, I can import a package as "import java.io.*;"
How does compiler find this java.io.* ? If I want a custom class to be available for use, then I need to set the path for that class in classpath variable. For java.io.*, there is no classpath set. I checked Path variable and its set for java.exe file. So how and where is the path for these APIs set ?

Thanks
8 years ago
I am a new entrant in java programming and need exposure to real time programming. I am willing to be part of this project.

I can be contacted at [ UD: removed email address ]

Regards,

Jignesh
11 years ago
can we use boolean in shell script to select a latest file only if two files are different ?

------------------------------------------------------------------------------------------

if [diff /local/config/templating /local/config/backup/$(ls -1rt | tail -1rt) ] ; then

cp /local/config/templating.cfg /local/config/backup/templating_$(date '+%d%m%y_%H%M')

----------------------------------------

I saved this script in a file template.sh and trying to run it on cmd line. But I am getting an error "./template.sh: cannot execute"
whats wrong with this script ?
13 years ago
I added execute option for all users on this file.

To run this file , I have to go in the directory, where this file is located and just type "templating.sh" on command prompt. right ?

I renamed templating.bat as templating.sh. Now I went in the directory , where templating.sh is located and ran from that directory by typing "templating.sh" on cmd prompt.
Output is "ksh: templating.sh: Not Found."

templating.sh is located in this directory only. So why am I getting such an error message ?

After adding execute permission for all users, I tried to run this file from the utility. But still it just opens the file like "edit", rather than running it.

So this file is neither running from within utility nor its running from cmd prompt. Any feedback please ?

thanks


13 years ago
Once new file has been created by copying. How to automatically select this new file and previous file to compare using "diff" ? IF there are differences between the two files, how to make sure that file which is created last, stays ? If there are no changes between the latest file and previous file, then the latest file shd not be saved ?

thanks
13 years ago
I am using a utility in which two windows are displayed. One windows for the server and one for the loacl machine. I can download the file from server on the loacl m/c and modify it and upload it. Now on the server there is modified file.

When I click templating.bat file on server, it does not run but just opens up. On the unix, file extensio is not of much importance. If I have templating.cfg and templating.bat file on the server and if I click on templating.cfg, that file will open up. If I click on templating.bat, It also just opens up. How to make sure, when tempalting.bat file is clicked, it runs ? If I change extension from templating.bat to templating.sh, will it solve the problem ? If not, then how to run the templating.sh file so that it performs the copy operation ?

thanks
13 years ago
thanks, that is really helpful.

I have posted another post of the same nature. Please excuse the duplication.

thanks
13 years ago
This is in continuation to earlier post about attaching timestamp to copied file.

I created a batch file. when I clicked on the templating.bat for the first time in SSH. Now when I click on the templating.bat, it just opens the notepad page and shows content of the batch file rather than running it. And at the top of the page, it shows a number how many times the file is opened e.g. templating(9).bat. So why is it behaving like this, rather than running the file and creating a copy ?

Thanks
13 years ago
This is in continuation to earlier post about attaching timestamp to copied file.

When timestamp is attached to the file, ebvery minute timestamp changes. Sp every minute same file is copied, new file will be creted with the new timestamp. Whis is just duplication files.

How can I make sure, that if templating.cfg file has been changed then only copy it otherwise not and leave the timestamp as is ?Change the timestamp only if there have been changes to the file.

Thanks
13 years ago