Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IDE and setting classpath for command line, more detail

20 views
Skip to first unread message

Bill

unread,
Mar 25, 2009, 10:13:37 AM3/25/09
to
This is some more details as to my earlier question:
I haven't hada chance to study command prompt more yet, but any
pointers would help

This is the jnlp file(LottoMadness.jnlp):

1: <?xml version="1.0" encoding="utf-8"?>
2: <!-- JNLP File for LottoMadness Application -->
3: <jnlp
4: codebase="http://localhost"
5: href="LottoMadness.jnlp">
6: <information>
7: <title>LottoMadness Application</title>
8: <vendor>Rogers Cadenhead</vendor>
9: <homepage href="http://www.java24hours.com"/>
10: <icon href="lottobigicon.gif"/>
11: <offline-allowed/>
12: </information>
13: <resources>
14: <j2se version="1.5"/>
15: <jar href="LottoMadness.jar"/>
16: </resources>
17: <application-desc main-class="LottoMadness"/>
18: </jnlp>

I placed it in:
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
\LottoMadness.jar
with 2 .class files: LottoMadness.class and LottoEvent.class
1 META-INF( I compiled this with JCreator, then moved it to the
htdocs file)
1 lottobigicon Windows Bitmap Image file

I configured Apache as follows:

I made the server address localhost during Setup.

# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

"that is the port config"

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2

/htdocs"
In the configuration, I added the lines in quotation:
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz

"#AddType application/x-java-jnlp-file JNLP"

# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

" AddType application/x-java-jnlp-file JNLP"

I was just trying to follow some directions as to the MIME-type lines
I added.
At command line, I enter:

C:\Documents and Settings\Owner>javaws C:\Program Files\Apache
Software Foundation\Apache2.2\
htdocs\LottoMadness.jar\LottoMadness.jnlp

I get the java application error window:
InvalidArgumentException[ Invalid arguments supplied:{Files
\Apache,Software,Foundation\Apache2.2\htdocs\LottoMadness.jar
\LottoMadness.jnlp,C:\Program}]
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInsecureThread(Unknown
Source)
at com.sun.javaws.Main$.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

the command javaws -viewer opens the control panel and a viwer with a
couple apps. in it.

opening LottoMadness.jnlp with the Java Web Start Laucher
from ..htdocs,, gives me another error message:
MissingFieldException[ The following required field is missing from
the launch file<jnlp>]
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchFactory.buildDecscription
(Unknown Source)
(same line) " " " "
at com.sun.javaws.Main.launchApp(unknown source)
at com.sun.javaws.Main.continueInSecureThread(Unknown
Source)
at com.sun.javaws.Main$.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

That is the Java Web Start question

The other was about classpath and IDE and javac.

I enter: C:\Documents and Settings\Owner>cd C:\Desktop\BillsJava
then:

C:\Documents and Settings\Desktop\BillsJava>javac HelloUser.java
then I get a 'javac' is not recognized as an internal...and so on.

Mark Space

unread,
Mar 25, 2009, 10:45:06 AM3/25/09
to
Bill wrote:

> then I get a 'javac' is not recognized as an internal...and so on.


That would be your PATH variable, not your CLASSPATH.

Maybe buy a book on Windows or something, there's no way I'm going to
bother to tell you how to set stuff like this up. This is a Java
newsgroup, you want Windows help.

Roedy Green

unread,
Mar 28, 2009, 6:20:42 AM3/28/09
to
On Wed, 25 Mar 2009 07:13:37 -0700 (PDT), Bill <grot...@yahoo.com>
wrote, quoted or indirectly quoted someone who said :

>This is the jnlp file(LottoMadness.jnlp):
>
>1: <?xml version="1.0" encoding="utf-8"?>
> 2: <!-- JNLP File for LottoMadness Application -->
> 3: <jnlp
> 4: codebase="http://localhost"
> 5: href="LottoMadness.jnlp">
> 6: <information>
> 7: <title>LottoMadness Application</title>
> 8: <vendor>Rogers Cadenhead</vendor>
> 9: <homepage href="http://www.java24hours.com"/>
>10: <icon href="lottobigicon.gif"/>
>11: <offline-allowed/>
>12: </information>
>13: <resources>
>14: <j2se version="1.5"/>
>15: <jar href="LottoMadness.jar"/>
>16: </resources>
>17: <application-desc main-class="LottoMadness"/>
>18: </jnlp>

See http://mindprod.com/jgloss/jnlp.html
for some hints. Be careful with case sensitivity.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Don’t worry about the world coming to an end today.
It is already tomorrow in Australia."
~ Charles Schulz

0 new messages