Package java.net does not exist

C

Carlos

Hello, i am trying to compile an application with Java Wirelees Toolkit
2.2 (which runs already with J2SE), but it tells me, that it is
impossible to finde the package java.net.
The message looks like::

C:\JavaWirelessToolkit22\apps\pmecarlos\src\ProfileReference.java:9:
package java.net does not exist
protected java.net.URI profileURL;
C:\JavaWirelessToolkit22\apps\pmecarlos\src\ProfileReference.java:15:
package java.net does not exist
public ProfileReference(java.net.URI profileURL, int profileID) {
......
Anyone knows what can i do?
Thanks.
Carlos.
 
A

Andrea Desole

I don't know the Java Wirelees Toolkit, but this is simply impossible.
java.net is part of the runtime jar. If it is missing, you can't even
start the compiler.
How are you building your code? What tool, what compiler, what JDK? What
happens if you just write a file of one line "import java.net.URI;" and
then you javac it? Also, whatever tool you are using, can you try to add
rt.jar to the classpath?
 
M

Michael Borgwardt

Andrea said:
I don't know the Java Wirelees Toolkit, but this is simply impossible.

Sure it's possible.
java.net is part of the runtime jar.

on J2SE, it is. Not necessarily on J2ME, which this is about.

J2ME consists of different "profiles", which differ in what parts
of the j2SE API devices with that profile support. java.net is
supported on the CDC profile, but not on the CLDC or MIDP profiles.

I haven't worked with the Java Wirelees Toolkit, so I can't tell you
whether it allows development for CDC or not.
 
A

Andrea Desole

Michael said:
on J2SE, it is. Not necessarily on J2ME, which this is about.

oh, okay. I thought it was running with the J2SE. I guess it's time to
shut up :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top