Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #1509 > unrolled thread
| Started by | vjp2.at@at.BioStrategist.dot.dot.com |
|---|---|
| First post | 2012-01-10 04:06 +0000 |
| Last post | 2012-01-16 14:52 -0800 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.java.help
moving CLASSPATH vjp2.at@at.BioStrategist.dot.dot.com - 2012-01-10 04:06 +0000
Re: moving CLASSPATH Lew <noone@lewscanon.com> - 2012-01-10 07:07 -0800
Re: moving CLASSPATH Roedy Green <see_website@mindprod.com.invalid> - 2012-01-10 13:11 -0800
Re: moving CLASSPATH Roedy Green <see_website@mindprod.com.invalid> - 2012-01-11 22:38 -0800
Re: moving CLASSPATH vjp2.at@at.BioStrategist.dot.dot.com - 2012-01-16 22:28 +0000
Re: moving CLASSPATH Lew <noone@lewscanon.com> - 2012-01-16 14:52 -0800
| From | vjp2.at@at.BioStrategist.dot.dot.com |
|---|---|
| Date | 2012-01-10 04:06 +0000 |
| Subject | moving CLASSPATH |
| Message-ID | <jegdgr$h56$1@reader1.panix.com> |
I want to move an exe
program which uses a registry definition of java classpath
Unfortunately It does not ask for install directory so I can't use
PortableApps Launcher
I have the classpath from the registry and set it in the batch file as an
environment variable but it doesn't find it.
THis is a long shot but, Is it possible to run some Java program to specify
the classpath then run the exe?
set classpath=lib\a.jar;lib\b.jar;lib\c.jar
Should I put set myhome=. and put myhome in front of each occurance of lib???
- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
[toc] | [next] | [standalone]
| From | Lew <noone@lewscanon.com> |
|---|---|
| Date | 2012-01-10 07:07 -0800 |
| Message-ID | <jehk8c$45d$1@news.albasani.net> |
| In reply to | #1509 |
vjp2.at@at.BioStrategist.dot.dot.com wrote:
> I want to move an exe
> program which uses a registry definition of java [sic] classpath
>
> Unfortunately It does not ask for install directory so I can't use
> PortableApps Launcher
>
> I have the classpath from the registry and set it in the batch file as an
> environment variable but it doesn't find it.
>
> THis is a long shot but, Is it possible to run some Java program to specify
> the classpath then run the exe?
Terrible idea.
> set classpath=lib\a.jar;lib\b.jar;lib\c.jar
>
> Should I put set myhome=. and put myhome in front of each occurance of lib???
First, don't use CLASSPATH.
Second, "classpath" is not correct. You only get away with it because Windows
is lax. It's "CLASSPATH". But you shouldn't use it anyway.
You used relative directories. That means that *every* Java program in that
system must run from a directory with a "lib/" subdirectory with those three
JARs in it if they are to run. That's exemplary of why you should not use
CLASSPATH. It's too global. Don't use it.
Use the "-classpath" (a.k.a. "-cp") option to the Java tools ("java" and
"javac", here).
Why are you using Java if you're packaging to an EXE?
If you must use CLASSPATH, which is a bad idea, at least specify absolute
directories for the path roots.
It's better to package your application as a JAR (which controls its own
classpath and ignores CLASSPATH) than as an EXE. Use the JAR format. That's
what it's for. You can associate JAR files with "java" (or "javaw") to launch
them on double-click, package them in a CMD file to make them act like native
executables, or write a thin executable wrapper to launch the JAR. All of
which make it easier to shun CLASSPATH as you should.
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2012-01-10 13:11 -0800 |
| Message-ID | <1capg7hcff6sr1ndf6oqg6sub3ncfiegfs@4ax.com> |
| In reply to | #1509 |
On Tue, 10 Jan 2012 04:06:51 +0000 (UTC), vjp2.at@at.BioStrategist.dot.dot.com wrote, quoted or indirectly quoted someone who said : >THis is a long shot but, Is it possible to run some Java program to specify >the classpath then run the exe? Put everything in a jar and ignore the classpath, or put the classpath in the jar. -- Roedy Green Canadian Mind Products http://mindprod.com If you can't remember the name of some method, consider changing it to something you can remember.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2012-01-11 22:38 -0800 |
| Message-ID | <9uvsg7p6b3fp88e9ffogffc5enomqcds3o@4ax.com> |
| In reply to | #1509 |
On Tue, 10 Jan 2012 04:06:51 +0000 (UTC), vjp2.at@at.BioStrategist.dot.dot.com wrote, quoted or indirectly quoted someone who said : >I have the classpath from the registry and set it in the batch file as an >environment variable but it doesn't find it. You can modify the registry with RegEdit. -- Roedy Green Canadian Mind Products http://mindprod.com One of the most useful comments you can put in a program is "If you change this, remember to change ?XXX? too".
[toc] | [prev] | [next] | [standalone]
| From | vjp2.at@at.BioStrategist.dot.dot.com |
|---|---|
| Date | 2012-01-16 22:28 +0000 |
| Message-ID | <jf289r$qio$2@reader1.panix.com> |
| In reply to | #1509 |
THis is a program written in Java but supplied as an EXE.
I am trying to put it into portableapps and the classpath won't transfer
I tried portable apps creator but the EXE program's intaller insists on
putting it in ProgramFiles.
I am kinda stuck between different methods by choices someone else made
- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
[toc] | [prev] | [next] | [standalone]
| From | Lew <noone@lewscanon.com> |
|---|---|
| Date | 2012-01-16 14:52 -0800 |
| Message-ID | <jf29o2$715$2@news.albasani.net> |
| In reply to | #1514 |
vjp2.at@at.BioStrategist.dot.dot.com wrote: > THis is a program written in Java but supplied as an EXE. No way to just get a ZIP of the JAR and its companions? > I am trying to put it into portableapps and the classpath won't transfer > > I tried portable apps creator but the EXE program's intaller insists on > putting it in ProgramFiles. Not a Java question. > I am kinda stuck between different methods by choices someone else made Does your app packager let you assemble your JAR and its dependency JARs into one package? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.help
csiph-web