|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Java application help
hello, i am somewhat new at java (full) and i have made an application consisting of about 5 class and java files equivlent in names, how would i run this program without using eclipse or jbuilder? also is there a way to create an executable out of this? if so how?
colton22 |
|
#2
|
||||
|
||||
|
my questions seems imposible to do i guess, please help me
|
|
#3
|
||||
|
||||
|
Without eclipse or jbuilder... well, you could use the regular JDK (java.exe), but if you're looking to compile your Java application into an EXE then it's a different story.
I've never done this myself, so I can't provide first-hand help, however there are a variety of tutorials on Google, but I would be forewarned... Compiling an EXE can reduce the portability of your code. Some tools simply package the java.exe with your JAR file, this might be a breach of Sun's EULA (i'm not sure though).
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
|
#4
|
||||
|
||||
|
i am new at this it is ovious
but cant you use a .dll, which is a program extention to take whatever was or might have been missing?, ill look up the website, thanks again though. |
|
#5
|
||||
|
||||
|
Java's version of a library (dll) is an archive file (jar)
You can combine all five of your classes (ideally, an entire package) into a JAR file. This may not accomplish what you're expecting. What is it you're actually trying to do? |
|
#6
|
||||
|
||||
|
i created a java application that will run and really, its not that important, but i am trying to learn off of it, what it does is it builds an aquarium and displays fish, which move around exc. this app. holds like 5 different files (not to be redundant repeating myself)
i am trying to create an exicutiable out of this so i can run it w/o jbuilder or eclipse, this way, i can transfer it onto my moms computer (which she doesnt have jbuilder or eclispse) and set it as a startup task. but i would rather have this as a .exe file then a pile of .class files and .java files. do you get me?? lol colton22 |
|
#7
|
|||
|
|||
|
about run java programs without using any tool.
Hello Friend.
First u should download jdk1.5 compiler from sun microsystem site www.javasun.com after installing it.Go on commond prompt and give path where u install it. For example If u install in c: Than write c:\set path=c:\java\jdk1.5\bin now u can compile your java program By simply write suppose ur java file save on c:\xyz folder than write c:\ c:\>cd xyz u will get c:\xyz> now compile by giving code "javac" ur java file suppose Abc.java than write c:\xyz>javac Abc.java after writing it folder xyz has five new .class file as you say your program has contain five classes. to run application program you have to give that file name which contain main() body suppose it is Yxt than simply write c:\xyz>java Yxt You will get result on dos prompt. Reply me If you get help frm this reply and also if you get any other prob |
|
#8
|
||||
|
||||
|
dude, i work with ms-dos, but im confused and im sry i forgot about this tread for a lil i guess, but anyway yea, if i do it that way will i have to do that to EVERY computer i try to run it on or what??
i can create the .bat file to do it and when you insert a disk with autorun.ini/inf i can have it run the bat and then have the bat exit and call the java proggram, but i am really confused colton22 |
|
#9
|
||||
|
||||
|
So long as the computer has the JRE (java runtime) installed, I'dl ike to pretend java.exe is in the PATH environment variable... You can't always trust it, but oh well.
Sometimes BATCH files which set the CLASS_PATH are worthwhile... I know most Unix or Linux java applications do that; so why not DOS? Then again, I think this is one of the reasons Java isn't often used to write applications. It's become more of a web language and embedded operating system language (like cellphones or PVR's) |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Java application help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|