JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Infrared to Wav sound file using IrToWav program

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - General Forum
View previous topic :: View next topic  
Author Message
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Mon Oct 27, 2003 7:54 am    Post subject: Infrared to Wav sound file using IrToWav program Reply with quote

I have tried to use the program IrToWav to convert IR codes, (saved as .TXT file) to .wav sound files but get the following error message
-------------------------------------------
Exception in thread "main"
Java.Lang.NoClassDefFoundError
-------------------------------------------
Can anyone help please ?

I have tried it both from Windows, Dos and the Command Line Interface and get the same error message each time.
I have installed Java runtime SE version 1.4.2_01-b06 and am running Windows 98SE.
The text file myfile.txt is a backup saved using the latest version of ir.exe from a URC7562.
(The unzipped dos batch file also has a bad command 'cd /d....')

I'd welcome feedback from anyone who can help or anyone who has used this program.

Thanks
Bill
Back to top
View user's profile Send private message
aberguerand
Advanced Member


Joined: 11 Aug 2003
Posts: 257
Location: Lausanne, VD, Switzerland

                    
PostPosted: Mon Oct 27, 2003 8:15 am    Post subject: Reply with quote

You have to make sure that the environment variable "CLASSPATH" either does not exist (recommended if you do not need it for other Java applications) or includes the directory where IRToWav is installed.

To see if CLASSPATH exists and if yes what it currently includes, go to a command prompt and type "set classpath".

Alain
Back to top
View user's profile Send private message
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Tue Oct 28, 2003 5:09 am    Post subject: Reply with quote

Thanks Alain.

Dos does not understand 'set class' so I tried 'java set class' and got the same java error message as previous. Tried 'java -cp', 'java set class' etc etc but still no joy.

The batch file does not run properly due to the line 'cd /d %......etc' ??
I changed this to 'c:\windows\desktop' and got IrToWav working that way but still no working from the cli.

Any more ideas please.
Thanks for helping.

Bill
Back to top
View user's profile Send private message
usblipitor



Joined: 10 Oct 2003
Posts: 516
Location: Greenbelt, MD

                    
PostPosted: Tue Oct 28, 2003 6:01 am    Post subject: Reply with quote

the following may be obvious stuff you already know so my apologies in advance if it is. the reason I am breaking it down to such simple actions is I have not seen a dos command prompt ever not understand the command "set <anything>" as "set" is an intrinsic command to dos. dos cannot "not understand" it. It may respond that the variable is not defined, but it still understands the set command. i am wondering if you typed the set command at another prompt outside of dos. try this:

start menu -> programs -> accessories -> command prompt
OR
start menu -> run -> "cmd" (type it with no quotes then press enter)

now you are at the command prompt which is a black square box with something like "C:\Documents and Settings\Bill >" at the top. from the command prompt you can type
"set" (no quotes but be ready for a lot of stuff to go scrolling past you)
OR
"set | more" (this one may be better since there are pages of the stuff - use the enter key to see subsequent pages until you return back to the command prompt)
OR
"set classpath" (on my computer it says "environment variable classpath not defined")

Good Luck!
_________________
-Steve
Beginner's Guide
CodeSearchFAQ
JP1Files
Back to top
View user's profile Send private message
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Tue Oct 28, 2003 6:42 am    Post subject: Reply with quote

Hi Steve

I go to the MS dos prompt from Windows98SE by start menu-programs-msdos prompt.

From the MS Dos prompt, the 'set' command produces the normal paths, prompts etc that dos has always used.

The 'set classpath' command produces 'syntax error' because the set command does not understand the switch/variable 'classpath'

Hope this helps Steve and thanks for your efforts.

Bill
Back to top
View user's profile Send private message
usblipitor



Joined: 10 Oct 2003
Posts: 516
Location: Greenbelt, MD

                    
PostPosted: Tue Oct 28, 2003 6:49 am    Post subject: interesting Reply with quote

when you type just "set" you should see all variables that exist. I am assuming that "classpath" is not one of them then?
_________________
-Steve
Beginner's Guide
CodeSearchFAQ
JP1Files
Back to top
View user's profile Send private message
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Tue Oct 28, 2003 6:54 am    Post subject: Reply with quote

classpath not in sight.
Only temp, tmp, path, comspec, windir, winbootdir etc etc
Back to top
View user's profile Send private message
aberguerand
Advanced Member


Joined: 11 Aug 2003
Posts: 257
Location: Lausanne, VD, Switzerland

                    
PostPosted: Tue Oct 28, 2003 10:45 am    Post subject: Reply with quote

The .bat file is only there if you want to use IRToWav with drag and drop on the Desktop. It assumes that IRToWav.class has been put on the Desktop and that the Desktop is located at %userprofile%\Desktop . This has been tested on Windows 2000 and XP, but not on Windows 98, so that might be the cause of the problem, but you seem to have solved that part.

For the command line version, you must not use the provided .bat file, but directly type the Java command. According to the ReadMe file :

Quote:
Usage (command line)
--------------------

IRToWav is a command line program and must be executed from a command line prompt(also known as MS-DOS prompt under Windows). To simplify the execution of the program, the directory where the *.class file has been installed must be made the current one in the command prompt.

Example (Windows) :
(The .class file is located on disk C:, under the directory Remote\IRTOWav)
Click on command prompt icon
Type
C:
CD C:\Remote\IRTOWav

The command :

java IRToWav IRFile (Signature) (Start address End address)

must be entered in the command prompt.


If SET CLASSPATH indicates that the variable is not defined, then you are OK. Other people had the same error message as yours and the cause was that environment variable.
I suspect you tried to run the .bat file from the command prompt, whose first instruction is to make the Desktop the current directory. Java then cannot find the class there, hence the message.

Alain
Back to top
View user's profile Send private message
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Tue Oct 28, 2003 11:10 am    Post subject: Reply with quote

From the dos prompt, if I type "set", I get the usual list of items including "Path = C:\windows;C:\Windows\Command" etc etc

From the dos prompt, if I type "Set Classpath" I get "Syntax Error" and no listing.

I have created a directory on my C: drive called "Remote" and placed 2 files in it (namely IrToWav.class and Bill.txt which is my IR file which now works from Windows Desktop.

I then go to the Dos prompt, change directory to c:\remote and type "java IrToWav Bill.txt and get the error message - see my first post above.

If I type "java -version" I get "version 1.4.2_01"

I have tried it on another pc which had an earlier version of java and it did exactly the same, (Windows98se again though)

Thanks for all your help.
Back to top
View user's profile Send private message
aberguerand
Advanced Member


Joined: 11 Aug 2003
Posts: 257
Location: Lausanne, VD, Switzerland

                    
PostPosted: Tue Oct 28, 2003 11:54 am    Post subject: Reply with quote

Now I am puzzled.

Does typing "Set classpath=c:\remote" before typing ""java IrToWav Bill.txt" help ?

Alain
Back to top
View user's profile Send private message
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Tue Oct 28, 2003 12:18 pm    Post subject: Reply with quote

To see what your classpath is, try

echo %classpath%

Remember that Java is case sensitive, so you need to type the command exactly at follows:

java IRToWav Bill.txt

Note IRToWav not IrToWav
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Back to top
View user's profile Send private message Visit poster's website
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Wed Oct 29, 2003 3:38 am    Post subject: Reply with quote

I didn't know java was case sensitive. I will try that when I get home tonight - Thank you.

In case it helps, I have documented below the screen dumps taken last night.

Ps - Is it anything to do with the 8+3 dos filename ????
ie Filename extension of '.class' = irtowa~1.cla ?????
see directory listing - step 3 below
Have tried 'java irtowa~1 bill.txt' without success but suspect java is looking for the full name and does not understand the tilde symbol ????

------------------------------------------------------------------------------
STEP 1 **** REBOOT PC and GO TO THE DOS PROMPT FROM WINDOWS ****
------------------------------------------------------------------------------
Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.

C:\WINDOWS>
------------------------------------------------------------------------------
STEP 2 **** TYPE 'SET' ****
------------------------------------------------------------------------------
C:\WINDOWS>set
TMP=c:\windows\TEMP
TEMP=C:\windows\TEMP
PROMPT=$p$g
winbootdir=C:\WINDOWS
PATH=C:\WINDOWS;c:\windows;c:\windows\COMMAND
COMSPEC=C:\WINDOWS\COMMAND.COM
windir=C:\WINDOWS
BLASTER=A220 I7 D1 H5 P330 T6

C:\WINDOWS>
-------------------------------------------------------------------------------
STEP 3 **** CHANGE TO C:\REMOTE and TYPE 'DIR' ****
-------------------------------------------------------------------------------
C:\remote>dir

Volume in drive C has no label
Volume Serial Number is 277F-1AFD
Directory of C:\remote

. <DIR> 27/10/03 18:49 .
.. <DIR> 27/10/03 18:49 ..
README TXT 7,862 03/06/03 0:54 ReadMe.txt
IRTOWA~1 CLA 6,381 03/06/03 0:55 IRToWav.class
BILL TXT 9,086 27/10/03 18:59 Bill.txt
3 file(s) 23,329 bytes
2 dir(s) 11,881.73 MB free

C:\remote>
-------------------------------------------------------------------------------
STEP 4 **** TYPE 'JAVA IRTOWAV BILL.TXT' ****
-------------------------------------------------------------------------------
C:\remote>java irtowav bill.txt
Exception in thread "main" java.lang.NoClassDefFoundError: irtowav (wrong name:
IRToWav)
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)

C:\remote>
-------------------------------------------------------------------------------
STEP 5 **** TYPE 'SET CLASSPATH=C:\REMOTE' ****
-------------------------------------------------------------------------------
C:\remote>set classpath=c:\remote

-------------------------------------------------------------------------------
STEP 6 **** TYPE 'SET' ****
-------------------------------------------------------------------------------
C:\remote>set
TMP=c:\windows\TEMP
TEMP=C:\windows\TEMP
winbootdir=C:\WINDOWS
COMSPEC=C:\WINDOWS\COMMAND.COM
windir=C:\WINDOWS
BLASTER=A220 I7 D1 H5 P330 T6
PROMPT=$p$g
PATH=C:\WINDOWS;C:\WINDOWS;C:\WINDOWS\COMMAND
CMDLINE=java irtowav bill.txt
CLASSPATH=c:\remote

C:\remote>
-------------------------------------------------------------------------------
STEP 7 **** TYPE 'JAVA IRTOWAV BILL.TXT' ****
-------------------------------------------------------------------------------
C:\remote>java irtowav bill.txt
Exception in thread "main" java.lang.NoClassDefFoundError: irtowav (wrong name:
IRToWav)
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)

C:\remote>
-------------------------------------------------------------------------------
STEP 8 **** TYPE 'EXIT' ****
-------------------------------------------------------------------------------Is it anything to do with the 8+3 dos filename ????
ie Filename extension of '.class' = irtowa~1.cla ?????
see directory listing - step 3 below
Have tried 'java irtowa~1 bill.txt' without success but suspect java script is looking for the full name and does not understand the tilde symbol ????

------------------------------------------------------------------------------
STEP 1 **** REBOOT PC and GO TO THE DOS PROMPT FROM WINDOWS ****
------------------------------------------------------------------------------
Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.

C:\WINDOWS>
------------------------------------------------------------------------------
STEP 2 **** TYPE 'SET' ****
------------------------------------------------------------------------------
C:\WINDOWS>set
TMP=c:\windows\TEMP
TEMP=C:\windows\TEMP
PROMPT=$p$g
winbootdir=C:\WINDOWS
PATH=C:\WINDOWS;c:\windows;c:\windows\COMMAND
COMSPEC=C:\WINDOWS\COMMAND.COM
windir=C:\WINDOWS
BLASTER=A220 I7 D1 H5 P330 T6

C:\WINDOWS>
-------------------------------------------------------------------------------
STEP 3 **** CHANGE TO C:\REMOTE and TYPE 'DIR' ****
-------------------------------------------------------------------------------
C:\remote>dir

Volume in drive C has no label
Volume Serial Number is 277F-1AFD
Directory of C:\remote

. <DIR> 27/10/03 18:49 .
.. <DIR> 27/10/03 18:49 ..
README TXT 7,862 03/06/03 0:54 ReadMe.txt
IRTOWA~1 CLA 6,381 03/06/03 0:55 IRToWav.class
BILL TXT 9,086 27/10/03 18:59 Bill.txt
3 file(s) 23,329 bytes
2 dir(s) 11,881.73 MB free

C:\remote>
-------------------------------------------------------------------------------
STEP 4 **** TYPE 'JAVA IRTOWAV BILL.TXT' ****
-------------------------------------------------------------------------------
C:\remote>java irtowav bill.txt
Exception in thread "main" java.lang.NoClassDefFoundError: irtowav (wrong name:
IRToWav)
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)

C:\remote>
-------------------------------------------------------------------------------
STEP 5 **** TYPE 'SET CLASSPATH=C:\REMOTE' ****
-------------------------------------------------------------------------------
C:\remote>set classpath=c:\remote

-------------------------------------------------------------------------------
STEP 6 **** TYPE 'SET' ****
-------------------------------------------------------------------------------
C:\remote>set
TMP=c:\windows\TEMP
TEMP=C:\windows\TEMP
winbootdir=C:\WINDOWS
COMSPEC=C:\WINDOWS\COMMAND.COM
windir=C:\WINDOWS
BLASTER=A220 I7 D1 H5 P330 T6
PROMPT=$p$g
PATH=C:\WINDOWS;C:\WINDOWS;C:\WINDOWS\COMMAND
CMDLINE=java irtowav bill.txt
CLASSPATH=c:\remote

C:\remote>
-------------------------------------------------------------------------------
STEP 7 **** TYPE 'JAVA IRTOWAV BILL.TXT' ****
-------------------------------------------------------------------------------
C:\remote>java irtowav bill.txt
Exception in thread "main" java.lang.NoClassDefFoundError: irtowav (wrong name:
IRToWav)
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)

C:\remote>
-------------------------------------------------------------------------------
STEP 8 **** TYPE 'EXIT' ****
-------------------------------------------------------------------------------

Thanks again for everyones great help.
I'm sure the solution is close....
(It will be Bill Gates fault at the end of the day !)

Bill
Back to top
View user's profile Send private message
wng21



Joined: 27 Oct 2003
Posts: 7

                    
PostPosted: Thu Oct 30, 2003 5:00 am    Post subject: Reply with quote

Thanks Greg - you solved it.
------------------------------------
Case sensitive was the answer.
------------------------------------
It does not matter what case "java" and "bill.txt" are in but "irtowav" MUST be exactly what WINDOWS shows.
Note : If I look at the directory from dos using 'dir' all the filenames are shown in capital letters on the screen.
You need to go back to Windows and check the case using eg Explorer.

Big 'Thank You' to everyone who helped.

ps - program works GREAT and does the business - Thanks Alain.

Bill
Back to top
View user's profile Send private message
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Thu Oct 30, 2003 6:40 am    Post subject: Reply with quote

Alain, you might want to consider adding a .bat file to your distribution to avoid this problem in the future. You could call it IRToWav.bat and all it would contain is the following line:

@java IRToWav %1 %2 %3 %4 %5 %6 %7 %8 %9

I do this with RemoteMaster.
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Back to top
View user's profile Send private message Visit poster's website
aberguerand
Advanced Member


Joined: 11 Aug 2003
Posts: 257
Location: Lausanne, VD, Switzerland

                    
PostPosted: Thu Oct 30, 2003 7:03 am    Post subject: Reply with quote

Greg,

thanks for the advice, I will follow it.

Regarding the Java capitalization, all I can say is "Duh !" It stood right in front of me, I even retyped the command with the wrong capitalization and looked for arcane environment problems instead.

Alain
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - General Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control