Setting classpath using batch, but

i am really confused now,i have my own java application, i convert it into exe and now it is located in C:\myprogram folder,
this program is associated with the .txt file
thats the reason why i conveert it into an exe
but the problem is, when i double click on the txt file, i got an error "noclassdeffounderror: MYPROGRAM"( ihave associted txt with my program )
that happens only when i double click on the txt file outside the bin directory
if txt file i clicked is in the bin dir, it will be launched without error
do i need to do it using batch(set the classpath)
but since my program is an exe how should i write in the batch??
so, can anyone help me??thansk
Edited by: E.D.-inc on Sep 28, 2007 1:18 PM
Edited by: E.D.-inc on Sep 28, 2007 1:44 PM

So you are having an error when you run a native application. As I said before this is not a Java question.
Possibly whatever tool you used to create the .exe file is faulty or was misused in some way. The makers of that tool would be the people to ask.
Possibly the .exe you created requires some particular configuration of your machine (system variables and the like). Again, consult the documentation of whatever tool you used to create the .exe, or ask whoever supports it.
It seems to me a bit overly complicated to create an .exe instead of arranging for a Java application to run in response to the text files being "opened". There were detailed instructions (for Windows) posted on this site within the last day or so saying how this is done. You might like to search for them.

Similar Messages

  • Have recently purchased an iphone4 have set up using phone but cannot send iMessage ? Have checked iMessage is on ,any ideas please ,shop said to go online and reset ?

    Have recently purchased an iphone4 have set up using phone but cannot send iMessage ? Have checked iMessage is on ,any ideas please ,shop said to go online and reset ?

    contact your phone carrier.

  • Issue in setting classpath using bash

    I tried creating a script file for executing my java code in my linux machine.Below is the script which i created.
    #!/bin/sh
    HOME=`pwd`
    JAVA_HOME=$HOME/jre
    CLASSES=$HOME/classes
    CLASS_PATH=$CLASSES/Testing.jar:$CLASSES/server/Server.jar
    "${JAVA_HOME}"/bin/java -cp "$CLASS_PATH" 'com.project.testing.Tester' '10000'
    It worked perfectly.But if i put this script in a directory containing spaces in its name, it is not working and it is throwing the below exception
    Exception in thread "main" java.lang.NoClassDefFoundError: com/project/testing/Tester
    So i modified the script to escape the spaces in the class path variable.Below is the modified script
    #!/bin/sh
    HOME=`pwd`
    JAVA_HOME=$HOME/jre
    CLASSES=$HOME/classes
    CLASS_PATH=$CLASSES/Testing.jar:$CLASSES/server/Server.jar
    CLASS_PATH=$(echo $CLASS_PATH | sed 's/ /\\ /g')
    "${JAVA_HOME}"/bin/java -cp "$CLASS_PATH" 'com.project.testing.Tester' '10000'
    But still i am getting the same exception.
    Please help me to solve this problem

    julians wrote:
    >
    You think?? Why don't you just find out? The classpath is one of the system properties, so just write a Java program which simply writes all of the system properties to stdout. Then look at the system property which contains the classpath.
    Sorry you didn't understand my question.Your answer is irrelevant to my questionThen you should explain your question better, using something less totally useless than "not working".
    My question is I can read.
    It has nothing to do with bash.There is some issue with java in the way it treats the argument after -cp option.If i can find out why should i post it here?.No. Java isn't treating any arguments. Your shell (bash) is treating the arguments. If you think it's Java, then you should investigate that. Which is why I posted what I did. If you think it's irrelevant then it must not be Java causing the problem. Of course you didn't even try it. Time-waster.
    Please simulate this issue and respond to my postYou want me to buy a computer and install bash and try to reproduce your problem? Don't be ridiculous. Do your own work.

  • Setting CLASSPATH's on Windows & Linux

    I am still new Java programming language, but I am coming along in learning the actually language. The one problem I keep running into is how to set a CLASSPATH on a windows machine and Linux machine. I have currently installed j2sdk1.4.2 on the windows machine and jdk1.5.0 on the linux machine. If any one has any suggestions on how to set these CLASSPATH's I would greatly appreicate it.

    Before ammending classpath I recommend checking the
    windows path variable. This variable is a list of
    folders where windows looks for executables.
    Path can be viewed by going to control panel ->
    system _> advanced table -> environmental variables
    and then selecting path and then edit.
    Make sure �C:\Program Files\Java\J2SDK1.5.0\bin� (or
    equivalent)is included.
    Alternative you can enter �path = %path%; �C:\Program
    Files\Java\J2SDK1.5.0\bin� into command prompt each
    session.
    This ensures that you can compile and execute java
    programs from any directory. Ideally the java
    installer should do it but I have found it does not.Indeed.
    Similarly the classpath can be varied from either the
    command prompt or it can be added to the
    environmental variables.I'm one of those that recommends folks not set CLASSPATH using an environment variable.
    IDEs like Eclipse and IntelliJ totally ignore it; so do containers like WebLogic and Tomcat.
    One CLASSPATH does not fit all. Every project is unique. The best way to set it is with the -classpath option on both javac.exe and java.exe.
    For compiling, you should learn Ant. It's a make tool built on Java and XML. That'll help with your compilation issues.
    For running, you'll either run in a container, which has its own idea of CLASSPATH, or you can script the startup of a batch job using a Windows .cmd or *nix .sh.  Set the CLASSPATH in the script.
    If altering it from the command prompt, in windows
    use a �;� between paths variables and a �:� for unix
    systems. Also include a �.� as one of the path
    variable as it includes the pre-existing class path.
    For example, when entered from the command prompt (in
    windows), the following line will add �C:\
    JavaPrograms� to the existing Classpath
    Java �cp .;C:\JavaPrograms
    Alternatively go into environmental variables as
    described above and if a classpath variable does not
    exist, create one and include �.� and your desired
    directory.
    Note: I prefer adding directories to the classpath
    via the environment variables as it is more accepting
    a folders with spaces in the name.Installing software in a folder with spaces in its name is asking for trouble. It's not highly recommended.
    %

  • How to set classpath from java class ??

    I have tried to use System.setProperty("java.class.path", "my class path string ") to set classpath dynamically. But it is not working. How to set it dynamically from java class ?? Thanks , gary

    Look into the java.net.URLClassLoader. You can't set the classpath after the fact but you can specify URL's that will checked when you try to load a class with that loader.

  • How to use jar files without setting classpath

    Hi,
    I have a situvation, I can not set classpath, but i have to use jar files, how can I do that.

    URL[] urls = new URL[]{pathToJar, pathToAnotherJar, ...};
    URLClassLoader urlc = new URLClassLoader(urls);
    Now load classes within the jars loaded by the urlc classloader as needed. This is a limited approach, you can mostly use interfaces to work with classes loaded by the custom loader instance above and your existing classes.

  • Using multiple desktops with a 4 finger swipe on a Mac Book Pro running Lion- is there a way that I can allow Safari open on several but not all??  Looks like I can set it for one but not others.  All, one, or nothing

    Using multiple desktops with a 4 finger swipe on a Mac Book Pro running Lion- is there a way that I can allow Safari open on several but not all??  Looks like I can set it for one but not others.  All, one, or nothing

    Hey Eric,
    Thanks for taking the time. Unfortunately no that does not solve it. Same as swipe it will get me there and it will show separate programs spaced out. The issue I am having is that all my open word files are bunched up in a pile on top of each other. I can see the edges of each one but I want them to be separated from each other enough that I can visually identify what file is what.
    Again, thanks for trying, it is appreciated.

  • I have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me

    i have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me???

    If Join was on then your home wi-fi must be set to Non-Broadcast.  If you did not set this up (maybe your provider did) then you will need to find the Network Name they used, and any password they used.  The SSID is Security Set ID and to see more try http://en.wikipedia.org/wiki/SSID .  Basically it is the name used to identify your router/network.  A lot of times the installer will leave it set as LinkSys, or Broadcom or whatever the manufacturer set it as for default.  Your best bet is to get whoever installed it to walk you through how they set it up, giving you id's and passwords so you can get in.  HOWEVER, if you are not comfortable with this (if you set security wrong, etc.) you would be well ahead of the game to hire a local computer tech (networking) to get this working for you.  You can also contact the vendor of your router and get help (if it is still in warranty), or at least get copies of the manuals as pdf files.  Sorry I can't give you more help, I hope this gives you an idea where to go from here to find more.

  • 2 New Ipads (Retina and Mini)(New to Apple) How do I share purchased apps, but others have each act independently? Mini is for the Wife the Ipad4? is for me. I want to use mine at work, etc. She's home with the kids. Can we set them up seperate, but share

    2 New Ipads (Retina and Mini)(New to Apple) How do I share purchased apps, but others have each act independently? Mini is for the Wife the Ipad4? is for me. I want to use mine at work, etc. She's home with the kids. Can we set them up seperate, but share
    --break--
    So we are entirely new to Apple products. I'm an IT guy, but have always been a windows user.
    So the Ipad with Retina Display is to be mine (and will use it at work for notes, organization, etc)
    The MINI is for the wife.
    But, are we allowed and can we.. buy an app and share that app between both devices? IE. Can I buy a copy of Angry Birds for the House and both Ipad's use that single purchase? and if so, can we still run the Ipads seperate other than to share the apps purchased. IE my facebook and email set up on mine and hers on her ipad mini?
    When I finally find a note taking app I like, can I share it on her ipad, without her having all my work files, etc?
    Thanks for helping out the apple noob. Hoping for a great experience, and anticipate droping $100 in apps the first day.. just don't want to do that twice. If this is against the usage policy, thats unfortunate but good to know. (I mean we can share stuff on PC as long as its in the same household)
    thanks again (explanations or links are fine)

    There are a number of Apple services: iMessage, FaceTime, iCloud, Game center, Find My iPad, etc.
    Now, to share apps, music and books you need to have the same Apple ID:
    iPad's Settings > iTunes & App Stores > Apple ID > Your purchasing Apple ID.
    For the other service, your wife should have her own Apple ID.
    All she needs is a valid e-mail address, apply Apple ID below:
    https://appleid.apple.com
    Here's a limk with useful tips: Note: It's also valid in IOS 6
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family

  • The App Store want allow me to download new apps because I have not set up security questions.But I share an iTunes account with my friend. So if I set up the questions will my friend have to use and answer the same thing?

    The App Store want allow me to download new apps because I have not set up security questions.But I share an iTunes account with my friend. So if I set up the questions will my friend have to use and answer the same thing?

    They will have to be answered the first time when purchasing from a new computer or device.

  • IPhone 5 16GB iOS8.3 i'm a new user on iPhone. My sister gave me her old iPhone that she bought in UK, she she it here in the Philippines and i'm having problems because i can't use it. i already restored it to set it up new but i couldn't still acti

    iPhone 5
    16GB
    iOS8.3
    i'm a new user on iPhone. My sister gave me her old iPhone that she bought in UK, she she it here in the Philippines and i'm having problems because i can't use it. i already restored it to set it up new but i couldn't still activate it. It says, " Your iPhone could not be activated because the activation server cannot be reached." and "The SIM card that you currently have installed in this iPhone is from a carrier that is not supported under the activation policy that is currently assigned by the activation server. This is not a hardware issue with the iPhone. Please insert another SIM card from a supported carrier or request that this iPhone be unlocked by your carrier. Please contact Apple for more information."
    what should i do for me to be able to use it?
    please help!
    Thank you very much!

    It is locked to your sisters carrier.
    She would have to ask her carrier if they unlock iPhones and if she qualifies for this service.

  • I have moved to uk from ireland and bought new iphone, set up using my existing Apple ID account and profile but won't let me buy install or update apps??

    I have moved to uk from ireland and bought new iphone, set up using my existing Apple ID account and profile but won't let me buy install or update apps??
    Can anyone advise me on what I need to do?
    My existing account is linked to ireland as my bank account details are there, does this make a difference?
    Please help!

    Until you get a UK bank account and credit card, buy and redeem UK iTunes gift cards for use in the iTunes and Mac App Stores. But you need to switch your region/country to the UK store in your account information, as you can't use UK iTunes gift cards in the Irish stores, the gift cards are country specific.

  • I am trying to change my email address for an Apple ID and it is saying that it is already in use. I then sign in with that Apple ID and it says that the account is not set up yet, I don't want to set up the account, but I do want to use the email address

    I am trying to change my email address for an Apple ID and it is saying that it is already in use. I then sign in with that Apple ID and it says that the account is not set up yet, I don't want to set up the account, but I do want to use the email address in my original Apple ID! HELP!

    Welcome to the Apple community.
    Once you have created a rescue address, you cannot delete it, nor can you change it to the same address as used by your ID. There are numerous providers you can get additional email addresses from, such as Hotmail, Yahoo, Google etc etc.

  • HT204291 Using Azul media player app on my ipad  Apple tv will only display sound but not video from movies.  Any ideas on a fix.  I set mirroring to on but it still does not display video.  It will display photos and video recorded from my iphone.

    Using Azul media player app on my ipad  Apple tv will only display sound but not video from movies.  Any ideas on a fix.  I set mirroring to on but it still does not display video.  It will display photos and video recorded from my iphone.

    Here are the steps for AirPlay:
    Before starting Azul from your (running iOS 5.x/6.x) home screen where have have all your apps we need to turn on mirroring
    On your iPhone 4S/5 or iPad 2 or 3, double-click the Home  Button to view your recently-used apps.
    Swipe all the way to the right to until you see the  icon.
    Note: If the icon does not appear, go to the "If AirPlay Mirroring is not visible or available on your mobile iOS device" section.
    Tap the  icon to see the list of available AirPlay devices.
    Enable AirPlay Mirroring in this menu by tapping on an available Apple TV, then sliding the Mirroring slider to ON.
    Now you should be seeing your iPad/iPhone on your TV.
    Start up Azul now and using the settings icon on the top right corner go to the option that say "TV out" ON.
    When you do that you will see an Orange screen
    Now click "Done" and play the video you want to watch and it will AirPlay

  • I re-set password using specific user ID but when I put new password in it does not say incorrect password  it just spins and spins never accepting it.  What is the problem?

    I re-set password using specific user ID but when I put new password in it does not say incorrect password  it just spins and spins never accepting it.  What is the problem?

    Update on my problem connecting in Itunes with my Airport Express. Not sure if anything I tried made a difference
    but I finally got the Pop up window saying this device requires a Password. I entered the password and I can once again use the Airport Express as a remote speaker.

Maybe you are looking for