Help! - JRE can't find classes that use inner classes!
Whenever I try to launch an app using the JRE, if the class was built with an inner class definition, the JRE says it can't find the class.
For instance:
I created a class called GUI, which contains anonymous inner class definitions for the button handlers: addActionListener(new ActionListener()){, etc.
When I compile this class I get GUI.class and GUI$1.class
When I try to launch this using the JRE:
jre -cp c:\progra~1\myApps GUI
The JRE spits out
'Class not found: GUI'
BUT if I go back and remove the action handlers so that the only compiled class file is GUI.class (not GUI$1.class) then the JRE can find the class no problem.
What in the good Lord's name is going on here?
Thanks for the response. Got the 1.2.2 version of the JRE, where I guess you no longer invoke jre.exe (no such file exists) but java.exe instead (not well documented).
Also, the newer version of the JRE has no problems locating classes, so I guess I'm OK.
Similar Messages
-
HELP - 'Can't find class' error
I have just bought a new computer with Windows XP and downloaded and installed the new versions of the jdk, jre, etc.
I have written the Hello World program to check that everything works. It compiles fine, but when I try to run I get an error - Can't find class helloworld - and then it exits.
I know that the path variable is set correctly and I used to have to set the classpath as well, but have been told that this is not necessary.
I really need to get this working as have some important programming to do.
Thanks for any help,
OllyTry this;-
prompt>set CLASSPATH=
.......> return key
prompt>java helloWorld
Hello World!
prompt>
AMAZING!
This works fine. Thanx.
Is there any way to set it so that I dont have to do
the set classpath stuff each time I run a program
though?
CheersWell, set a system variable
CLASSPATH=.;<java_home>\jre\lib\rt.jar
regardws, Thomas -
I am unable to start Firefox. Getting message that it's already running. Can't find my profile using "%APPDATA%\Mozilla\Firefox\Profiles|". Rebooting my computer didn't help. Since I experienced that problem I also noticed that all my bookmarks which I had copied into the Windows Internet Explorer have also disappeared. I am using Firefox as my primary search engine and usually don't use Internet Explorer. I am running Windows 7 on my machine.
Try this add on [https://addons.mozilla.org/en-US/firefox/addon/open-profile-folder/ Open Profile Folder]
-
I'm trying to create a new apple-id but when typing the email adress I want to use I'm told that the particular email adress is not allowed When searching I can't find same being used anywhere. How do I find out where that particular email adress is used so I can delete it there and use it for my new apple-id?
Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
iOS: Wrong passcode results in red disabled screen
If recovery mode does not work try DFU mode.
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
For how to restore:
iTunes: Restoring iOS software
To restore from backup see:
iOS: How to back up
If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
You can redownload most iTunes purchases by:
Downloading past purchases from the App Store, iBookstore, and iTunes Store
Also
If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased. -
Help! I just purchased a US sim card/monthly pre-paid plan (i am from Canada) as I am travelling in the states for a month, and when I went to restore the iphone, it didn't work. I can't find backup that i did right before the sim was changed. I really need the info that was there! Please help..
Hold on,
Have you talked to your carrier to confirm the unlock?
What was the procedure you did to unlock the phone?
Standard unlocking procedure once processed by the carrier:
Backup in iTunes
Erase the phone (ignore restore terminology here)
Plug the phone to the computer and then launch iTunes
Wait for unlock notification.
Restore the backup. -
Please help, I can't find face time and Siri icon on my mini ipad? Just bought it I have the IMessage icon and is able to use it.
There is no Siri "icon". You access Siri using the Home button. But you may need to turn it on: Settings App > General > Siri. http://support.apple.com/kb/HT4992
Same for the FaceTime function (but if it is ON, there will be an icon): Settings App > FaceTime > [turn it on and set you Apple ID. http://support.apple.com/kb/HT4319 -
I was using raw & my hard disk nearly full. When I downloaded pix, I got message that said hard disk nearly full. My pix downloaded into 2 folders. When I merged them about 50 disappeared. Where can I find them? Using MacBookPro, IPhoto 9.5.1
Where were you downloading the to, iPhoto, a folder on the Desktop, where? Are they still on the camera's memory card? If you deleted them from the card and haven't used the card since they can be recovered with recovery software like MediaRECOVER. You can download the demo version to verify they can be recovered before purchasing it. Other similar apps can be found at MacUpdate.com by searching for "photo recovery" or similar terms.
-
IOS 8 - using Siri but she can't find contacts that I clearly have in my address book. Why? I can find them manually.
I have this issue also. I ask Siri to call a contact, it repeats and spells the contact exactly as it is in my contacts, then says it cannot find it. This happens for multiple contacts...
-
Can't find class error on Tru64 UNIX
I have written a class, TextProcessor, and I can compile and run it without any problems on my Win2K box. I ftp the source to works Tru64 box and compile the class just fine. When I issue the command "java TextProcessor" I get the msg "Can't find class TextProcessor". I immediately thought I had a classpath issue. I messed around with setting my classpath but without luck.
I then wrote a new class on the Unix box using vi called Hello.java. I compile the Hello class without a problem. I issue the command "java Hello" and get "Hello!", just like I am supposed to get.
The 2 classes reside in the same directory, TextProcessor does not have any package statements. I am totaly confused.
Environment information:
Tru64 UNIX version 5 or so.
JDK 1.1.8 (not my choice and I have no control over the JDK)
JRE 1.2.2 is also installed.
Please help!
ThanksMaybe.....
Make sure that you have the permissions necesary to read,write and execute the file from your own account.
If you canno't find any class maybe is because you cannot read.
What account are you used to pute the file from Win?
you can try this...
chmod 777 TextProcessor.java
chmod 777 TextProcessor.class
But......????? uhmmmmmm??
I'm not sure, because If you can compile then you can read the file, but it's depends you umask ......
it's only a suggest -
Can't find class org/apache/jk/apr/AprImpl
Hi
I have Tomcat 4.1.29 and Apache Web Server 2.0.48 installed.
I have used this tutorial since I'm a newbie :(
http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html
My problem is when I try to regroup them, I obtained this error error.log.
error] Can't find class org/apache/jk/apr/AprImpl
java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Here is my confid file (workers.properties) :
[logger]
level=DEBUG
[config:]
#file=C:/Apache2/conf/workers2.properties
file=C:/Apache2/conf/workers2.properties
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=C:/Apache2/logs/jk2.log
[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
file=C:/Apache2/logs/jk2.shm
size=1000000
debug=0
disabled=0
[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0
[lb:lb]
info=Default load balancer.
debug=0
#[lb:lb_1]
#info=A second load balancer.
#debug=0
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009
#[channel.socket:localhost:8019]
#info=A second tomcat instance.
#debug=0
#tomcatId=localhost:8019
#lb_factor=1
#group=lb
#group=lb_1
#disabled=0
#[channel.un:/opt/33/work/jk2.socket]
#info=A second channel connecting to localhost:8019 via unix socket
#tomcatId=localhost:8019
#lb_factor=1
#debug=0
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
[status:]
info=Status worker, displays runtime informations
[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/commons-logging.jar
OPT=-Dtomcat.home=${TOMCAT_HOME}
OPT=-Dcatalina.home=${TOMCAT_HOME}
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=0
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
disabled=0
stdout=C:/Apache2/logs/stdout.log
stderr=C:/Apache2/logs/stderr.log
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=0
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
#[uri:127.0.0.1:8003]
#info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it
#alias=myVirtualHost:8003
#[uri:127.0.0.1:8003/ex]
#info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 )
#context=/ex
#group=lb_1
[uri:/examples]
info=Example webapp in the default context.
context=/examples
debug=0
#[uri:/examples1/*]
#info=A second webapp, this time going to the second tomcat only.
#group=lb_1
#debug=0
[uri:/examples/servlets/*]
info=Prefix mapping
[uri:/examples/*.jsp]
info=Extension mapping
[uri:/examples/*]
info=Map the whole webapp
[uri:/examples/servlets/HelloW]
info=Exampel with debug enabled.
debug=10
Thank you for your time !
MaxBtw: I get the warning starting IIS - It seems to me that IIS tries to load Tomcat on-the-fly. The Tomcat load the fails and IIS continues to load successfully.
The beginning of the IIS Event log outputs this:
Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (340)]: vm.detach() ok
Apache Jakarta Connector2, Warning, Error: [jk_worker_jni.c (308)]: Can't find class org/apache/jk/apr/AprImpl
Apache Jakarta Connector2, Information, Info: [jk_worker_jni.c (297)]: Loaded org/apache/jk/apr/TomcatStarter
Apache Jakarta Connector2, None, Debug: [jk_vm_default.c (302)]: vm.attach() allready attached
Apache Jakarta Connector2, Information, Info: [jk_worker_jni.c (252)]: jni.validate() class= org/apache/jk/apr/TomcatStarter
Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (607)]: vm.open2() done
Apache Jakarta Connector2, Information, Info: [jk_vm_default.c (500)]: vm.init(): Jni lib: C:\wwwapps\j2sdk1.4.2_01\jre\bin\client\jvm.dll
/watson -
Hi there,
I have added an external library (jtom) to my project. I get this runtime error when running my midlet:
Error: Can't find Class jtom.service.JTOMException.
When I extract the contents of the library(jtom), I can see that the class (jtom.service.JTOMException) exists. I can also see this class in myProject>>Build>>compiled folder.
I'm using Netbeans Mobility 5.5
Please Assist,
PheksCan you please post the solution, I'm having similar problem.
I set the classpath before compiling the program
export CLASSPATH=/usr/java/lib/classes.zip:/oracle/product/8.1.6/demo/lib/classes111.zip
When I try to run the program at the command prompt
$ java JdbcTest
I am getting error message "Can't find class JdbcTest"
When tried
$ java -classpath . JdbcTest
I was getting different error message
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver at JdbcTest.main(Compiled Code)
Any help is appreiated
Thanks
SJ -
i have win xp as my OS and jdk1.1.8 installed. I have my class path set correctly. I have changed the environment variable to c:\jdk1.1.8\bin
When I compile my java programs using javac at the command prompt, the program compiles successfully and the class file is made but when I run it I get the erro "can't find class filename"
I there some other way to set the class path in XP .
I don't understand where I am going wrong.
Please help...to run a java file you would type c:\jdk1.1.8\bin\java ClassName
leave it at that, i think the error your getting is caused when you type the .class extention ie. c:\jdk1.1.8\bin\java ClassName.class -
How can I find photos that are not assigned to any collection?
Hi !
I'm using LR 5.7.1 on a Mac.
When I've retouched raw pictures with PS CC (and do not need the PSD file any longer) I export the PSD (that is in my catalog) as JPG and let it add to my catalog automatically. After that I delete the PSD file. That works fine.
But .... the new JPG file is not assigned to any collection. That's no problem unless I forget to do it manually after that export (and import).
That brings me to my question.
How can I find photos that are not assigned to any collection?
I tried it with a smart collection after I found nothing suitable in library filter. The search criteria I tried are Source -> Collection with any of the conditions. One with an empty value field, then with just a space and so on.
Has anybody a good hint for me?
ThomasYou can also add numbers if you have collections that don't use alphabet characters.
-
Restoring ipod and it say's can't find software and use a cd-rom if necessary. My ipod is stuck on the connect to itunes screen and wont do anything. What am i supposed to do?
Please help, i will be very gratefulyou can do is go to ijailbreak.com then select downloads section.......scroll down and see the latest version of ipod touch second generation is available for download.....when it gets downloaded connect your iPod to itunes or keep it connected then hold option and click restore (mac) search the software by writing in search "iPod" a thing with white cube will show up if it is the file you just downloaded click it and wait for itunes to do its work......you can ask more if you are on windows
-
How do i reset my security questions? I can't find anything that will let me change them
I need to reset my security questions but i can't find anything that says reset questions here.
The reset link will only show if you have a rescue email address (which is not the same thing as an alternate email address) set up on your account. If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset - which will normally be by phone as they need to confirm your id and that it's your account.
Contacting Apple about account security : http://support.apple.com/kb/HT5699
When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use
Maybe you are looking for
-
I have a iphone4 and just got my wife a 3gs, can i just plug it in to sync it on my account?
-
Query regarding connecting dashboards with SQL DATABASE using WSDT
Hello Sir, I am trying to connect dashboards with Sql database via WSDT, but i have encountered the same problem as described in your SAP community blog (SAP Web Service Design Tool: From web service creation to Xcelsius consumption). when i tried co
-
How to create a named not null constraint
Hi All, How to create a table with a named not null constraint? and how to add a named not null constraint to a table? Thanks for the help.
-
New Macbook Pro user (left my Dell laptop world) cannot get printer working
Need some serious help, looks like my snazzy new purchase does not work with my Dell Color Laser Printer 3110cn. Apple tells me its not their problem, call Dell....well Dell says the driver they have does not work on Mac 10.5.2 or Leopard. What to do
-
Sometimes I need to use a proxy server when on WiFi. I simply enter the ip address in the iphone. Trouble is that when I go back to auto then manual it removes the address. Is there any way around this?