473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to set the classpath in window Registry

7
Hai Guys.
I am Developing a s/w. i want to set the classpath using Java Program which sets the class path.can u please help me Plzzzzzz.

Contact: <Removed>
May 18 '07 #1
12 4725
dmjpro
2,476 2GB
Welcome to TSDN.

don't use ur email to make request for coding.
u can create a native process using Runtime.getRuntime().exec()

plz look at it's specification
if anything worng with ur code then experts r here to correct ur code.
best of luck.

kind regards.
dmjpro.
May 18 '07 #2
JosAH
11,448 Expert 8TB
Hai Guys.
I am Developing a s/w. i want to set the classpath using Java Program which sets the class path.can u please help me Plzzzzzz.
You never want to do that. If you distribute a .jar file set the classpath in its
manifest file. When your Java program runs its too late to set an environment
classpath variable anyway. And you want to stay far far away from any registry.

kind regards,

Jos
May 18 '07 #3
Ragava
7
You are Correct But i want to set Permanantl in Register.
If i am using Runtime it sets for the Java.So it wont set parmanantly in
Windows Classpath(Without AUTOEXEC Batch File)
May 23 '07 #4
r035198x
13,262 8TB
You are Correct But i want to set Permanantl in Register.
If i am using Runtime it sets for the Java.So it wont set parmanantly in
Windows Classpath(Without AUTOEXEC Batch File)
Perhaps you should create a jar file, use the manifest for it, then play with the code in that jar file to set the permanent things you want to set.
I wouldn't play around with the register though ....
May 23 '07 #5
Ragava
7
I need only the Progam which sets the classpath in Window Registry.
Can anyone thought me.
May 23 '07 #6
JosAH
11,448 Expert 8TB
I need only the Progam which sets the classpath in Window Registry.
Can anyone thought me.
You can set an entry in your registry named 'classpath' give it a value that looks
like a classpath value but that still doesn't make it a classpath. The JVM doesn't
look in registries (a Microsoft Windowism) for its classpath. The JVM checks
its command line options, the manifest file in .jars and for an environment
variable named 'classpath'.

If you insist on a permanent classpath value set an environment variable then;
but even that is not a bright idea.

kind regards,

Jos
May 23 '07 #7
Ragava
7
I have Told the Clear Idea.

My Program is to set the classpath in window registry.

No Manifest.MF File,AUTOEXEC.
May 23 '07 #8
JosAH
11,448 Expert 8TB
I have Told the Clear Idea.

My Program is to set the classpath in window registry.

No Manifest.MF File,AUTOEXEC.
Ok, I wish you all the best then.

kind regards,

Jos
May 23 '07 #9
Ragava
7
Thank You Joah.

I got it. I have doenloaded the SetEnv.exe from SourceForge.net

and i called the EXE in Java.

it works Nice.

Thank You for your Help.
May 24 '07 #10
JosAH
11,448 Expert 8TB
Thank You Joah.

I got it. I have doenloaded the SetEnv.exe from SourceForge.net

and i called the EXE in Java.

it works Nice.

Thank You for your Help.
If that thing is named 'SetEnv' why does it set registry entries and not environment
entries as I expected from the name of it?

kind regards,

Jos
May 24 '07 #11
Motoma
3,237 Expert 2GB
[quote=JosAH]If that thing is named 'SetEnv' why does it set registry entries and not environment
entries as I expected from the name of it?

kind regards,

A very good point. Anything needed to be done in the registry can be done with the regedit command line utility anyway. The best way to do this is to create a .reg file with your registry keys, and use regedit to import the data.
May 24 '07 #12
JosAH
11,448 Expert 8TB
A very good point. Anything needed to be done in the registry can be done with the regedit command line utility anyway. The best way to do this is to create a .reg file with your registry keys, and use regedit to import the data.
This entire thread is beyond me: the OP insists on putting a classpath value
in the registry (which is useless, because the JVM doesn't even look in registries).
Now the OP seems to be happy with using environment variables (where the JVM
does look indeed, but still it's a bad idea to put your classpath int there).

Oh well ...

kind regards,

Jos
May 24 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Herman | last post by:
Hi everyone, I recently installed the Sun J2SE SDK on my machine, and I am having trouble running the java.exe interpreter for my Java compiled code. I remember that I had to set my environment...
2
by: David Cook | last post by:
Windows (XP and NT) allows one to specify environmental variable (such as PATH and CLASSPATH) at both the SYSTEM-wide level as well as at the per-USER level. And the behavior has always been...
3
by: Jim Hargrave | last post by:
I've read that it is possible to compile jython to native code using GCJ. PyLucene uses this approach, they then use SWIG to create a Python wrapper around the natively compiled (java) Lucene. Has...
0
by: Tom Dacon | last post by:
"Open .Net Command Window Here" context menu for Windows Explorer: The reg file described below adds a new menu item to Windows Explorer's context menu when you right-click over a folder (or the...
1
by: Dave Keays | last post by:
I am setting-up an experimental web service using Apache Axis but I'm having problems. AXIS can't find a library that I've verified exists on my computer and that CLASSPATH points to it. I'm using...
2
by: Dave | last post by:
I have an external java stored proc and is working fine if I put the class file in sqllib\function directory. If I want to put the class file in a directory other than sqllib\function, how do...
7
by: dlarsson | last post by:
Okay folks, I thought I was doing something very, very simple, but I cannot seem to get this to work at all. Can anyone identify what I am doing wrong here-? _________________________________ ...
9
by: KevinRobinson | last post by:
Hi, Can anyone please tell me how to add or change a Java classpath in SUSE Linux 9.3. I have set up a Tomcat server but my Java Classes will not run although they do on a windows box. ...
1
by: chitra g | last post by:
Hi, I tried all the options below but did not work. Your suggestions please.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.