aspose file tools*
The moose likes Beginning Java and the fly likes How to set java home in unicode folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to set java home in unicode folder" Watch "How to set java home in unicode folder" New topic
Author

How to set java home in unicode folder

Bill Thompson
Greenhorn

Joined: Jan 09, 2008
Posts: 5
Hello Everyone,

When I set the java home environment variable with unicode, I am not able to compile any of the java files. It is throwing NoClassDefFoundError, why is this so....

I have followed the following steps(in Windows OS)

1. Copied the JDK in an Unicode folder (用状況使用\java\jdk1.5.0_14)
2. Set the JAVA_HOME environment variable as 用状況使用\java\jdk1.5.0_14
3. Written a simple HelloWorld.java program
4. Tried to compile the HelloWorld program and got the exception saying
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main


Can anybody suggest what the exact problem is.....
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38793
    
  23
Where are you putting your classes? They belong in their own folder, not inside a JVM folder. Please don't put anything inside a JVM folder.

If that is the only error you are getting, it is because the folder your command line is navigated to and the location of the compiled class are different. Or the name of the class you are trying to invoke is misspelt.
Bill Thompson
Greenhorn

Joined: Jan 09, 2008
Posts: 5
Hello Ritchie,

Thanks for the response. I have kept the Java class away from the JVM folder. My sample java program kept under C:\ drive where as JAVA_HOME set as 用状況使用\java\jdk1.5.0_14.

Thanks,
Bill
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38793
    
  23
You're welcome. Has that sorted it out?
Bill Thompson
Greenhorn

Joined: Jan 09, 2008
Posts: 5
It did not solve the problem...still googling to find an answer.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38793
    
  23
Originally posted by Bill Thompson:
It did not solve the problem...still googling to find an answer.


I can tell you where you will find an answer. Try here.

Please give us more details about what the error messages are, and what you are doing to precipitate them, then we can help better.

And I suggest Ernest or Rob transfer this topic to beginners'.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set java home in unicode folder