Re: Running Java App Issue
The runtime probably can't find the class to execute. You said you have it specified in your project but i don't know if you are talking about your code or the IDE classpath settings.
Re: Running Java App Issue
Quote:
Originally Posted by Dilenger4
The runtime probably can't find the class to execute. You said you have it specified in your project but i don't know if you are talking about your code or the IDE classpath settings.
With netBeans, when I go into the project's properties, there is an option for main class and I have it set.
Not sure how to set IDE classpath settings or how to set it in code.
Re: Running Java App Issue
Btw, when I try to run it with java web start I get the following error:
Code:
An error occurred while launching/running the application.
Category: Launch File Error
The following required field is missing from the launch file: <jnlp>
Not sure if I am supposed to launch it with javaws.exe or not but maybe the error can help someone help me.
Launching it with javaw.exe gives me the missing main class error and launching it with java.exe just plain doesn't work (though I am not suprised; I don't know much of anything about java. heh)
Re: Running Java App Issue
I am pretty sure that you have to set the path to where your .class files reside. So the JVM knows where to grab them to execute. I really dont use IDE's too much. Pretty much code everyting in Edit Plus so i couldn't tell you exactly where to go within Net Beans.
Re: Running Java App Issue
Re: Running Java App Issue
Quote:
Originally Posted by Dilenger4
I am pretty sure that you have to set the path to where your .class files reside. So the JVM knows where to grab them to execute. I really dont use IDE's too much. Pretty much code everyting in Edit Plus so i couldn't tell you exactly where to go within Net Beans.
I think you're right. In the IDE, if I right click on the package it'll show me the classpath but won't allow me to change it and when I try to add or change it as per some instructions I found, it doesn't work right.
How can I set it up to just check the current directory for the class? Also, how would I compile the java project in command line? I'm used to gcc so it's weird letting an IDE do it for me anyway
EDIT: Didn't see your reply. Thanks. I'll look into it
Re: Running Java App Issue
Command line from DOS. Compile --> C:\jdk1.5.0_03\bin> javac C:\prog Run --> C:\jdk1.5.0_03\bin> java -classpath C:\; prog I usally don't have my CLASSPATH set so specify the -classpath when i run.
Re: Running Java App Issue
Quote:
Originally Posted by Dilenger4
Command line from DOS. Compile --> C:\jdk1.5.0_03\bin> javac C:\prog Run --> C:\jdk1.5.0_03\bin> java -classpath C:\; prog I usally don't have my CLASSPATH set so specify the -classpath when i run.
Since the jar file contains the class, shouldn't it be easy to set it so the Jar file is it's own classpath? I don't see why the classpath has to be specific instead of relative.
Maybe I need a java book.
I used a program called JSmooth which made my jar file into an exe and that works on multiple computers. I just need to figure out how to get OS X to work with it