Results 1 to 9 of 9
Thread: uploading sound file in java
- 11-03-2007, 03:22 AM #1
Member
- Join Date
- Oct 2007
- Posts
- 11
- Rep Power
- 0
uploading sound file in java
hi there,
i am trying to upload a sound file into my class .
i am using this method
but how do i specify the location of the song i wantJava Code:string strFilename = args[0]; File soundFile = new File(strFilename);
for example the song is in the desktop under name (song1.wav)
and what if i want to upload mp3 ?
- 11-03-2007, 02:56 PM #2
Member
- Join Date
- Oct 2007
- Posts
- 11
- Rep Power
- 0
anyone plzzzzz
- 11-03-2007, 03:20 PM #3
Your problem is not clear. If you clearly describe your situation, someone may hep.. I did not understand your problem. You can just give the path of the file to your File object and it can be the arg[0] of your program as you described.
- 11-03-2007, 07:59 PM #4
Member
- Join Date
- Oct 2007
- Posts
- 11
- Rep Power
- 0
The problem is that i dont know how to give the path of the file i want to upload to arg[0] ...
how do i do that in Eclipse ?
someone told me this "enter the right parameter in argument section of the application configuration window."
does this makes sense to anyone ?
- 11-03-2007, 09:21 PM #5
Yes it should be sth like that. But i dont use Eclipse. In netbeans, i right click to the project, select project properties, select run parameter tab and set the arguments there.
I found this document for you. If it is not old, it might work:
Help - Eclipse SDK
- 11-03-2007, 09:46 PM #6
Member
- Join Date
- Oct 2007
- Posts
- 11
- Rep Power
- 0
yes Thank you its very useful , but what arguments do i need to add for my case ?
- 11-03-2007, 09:54 PM #7
The path of the file. (e.g. c:\myfile.txt)
As far as i remember, args[0] was the your application name. So you will use args[1] to access first argument like this:
Java Code:java MyApplication c:\myfile.txt args[0] = MyApplication args[1] = c:\myfile.txt
- 11-03-2007, 10:29 PM #8
Member
- Join Date
- Oct 2007
- Posts
- 11
- Rep Power
- 0
i didnt get what u mean ??
is that what i need to type in the command line ? cuz as u know i am using Eclipse !!
where do i add these lines ?
- 11-03-2007, 11:00 PM #9
Similar Threads
-
Uploading a file with Servlet
By farakhkhan@yahoo.com in forum New To JavaReplies: 0Last Post: 03-10-2008, 08:02 PM -
File Uploading
By aaliadhurue in forum Advanced JavaReplies: 4Last Post: 01-16-2008, 06:56 PM -
Uploading files to FTP
By javaplus in forum New To JavaReplies: 0Last Post: 12-19-2007, 10:08 AM -
Make sound play in a java application
By lenny in forum AWT / SwingReplies: 2Last Post: 08-13-2007, 11:45 AM -
Sound in applet Java
By toby in forum Java AppletsReplies: 1Last Post: 08-07-2007, 05:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks