How To Create A Java Executable Binary
Oct 25, 2013
I am wondering if there is an easy way to create a java exe(cutable) binary, by packing the JRE and ship it like a compiled C++ bin file? I know JAR is good but, I still prefer to create a standalone install - free exe, no matter if the user has or has not Java installed on her PC.
View Replies
ADVERTISEMENT
Dec 25, 2014
when I am programming let say in VB using Visual Studio, finally I build .exe file that can be run on all Windows by double click.For Java I am using Eclipse and to run those apps I am using run from Eclipse.How I can create a sort of "executable" for my Java app that I would be able to run it by file click on Windows or Linux?
View Replies
View Related
Apr 16, 2015
I have tried to get my dinky little program I wrote to be stored as an executable through Eclipse to no avail. It seems I have tried everything else as well, to no avail. I do not want it to go through command prompt, but rather have it be its own entity. As you can probably tell my knowledge of Java and coding is limited, but always willing to expand.
View Replies
View Related
Jul 10, 2014
I'm trying to run a command line executable file using java but there is no output. On the task manager a conhost process opens when the application is run. I've tried
1)try {
Runtime.getRuntime().exec("D: est.exe");
} catch (Exception e) {
e.printStackTrace();
}
2)String[] cmd = { "D: est.exe"};
Process p = Runtime.getRuntime().exec(cmd);
p.waitFor();
and
3)//Runtime.getRuntime().exec("D: est.exe", null, new File("D:"));
same thing happens i.e. nothing happens.
View Replies
View Related
Feb 16, 2014
I am totally new to java. How to convert the below java code to an executable file?
var intInterval = 0
function importdata(){
filename = "C:1.txt";
AmiBroker1 = new ActiveXObject("Broker.Application" );
AmiBroker1.Import( 0, filename, "custom.format" );
AmiBroker1.RefreshAll();
}
It simply imports numerical data from 1.txt into an application amibroker. Also this import function has to be in a loop of 60 seconds.
View Replies
View Related
Apr 14, 2015
I have made a simple h2 db viewer using jdbc and in eclipse it has a horizontal scrollbar so it works and displays correctly.
When I run the jar from cmd it works as it should but the results all go onto new lines so all formatting is lost and it looks.. ugly...
somehow make it so the console has a forced horizontal scrollbar but dunno how.
View Replies
View Related
Aug 8, 2014
I am trying to uses classes from a non executable jar called noexec.jar in an executable jar called exec.jar. With no defined manifest in the nonexec jar and a manifest in the exec jar. The folder structure where the jars are held look like so.
ROOT
/lib
|
---nonexec.jar
---exec.jar
With the class path defined in the manifest for the executable jar as Class-Path: nonexec.jar . However every time I run java -jar exec.jar, I get Exception in thread "main" java.lang.NoClassDefFoundError: What even though I am including nonexec in my class path why the classes contained within the jar are not being found?
This is the manifest file
Manifest-Version: 1.0
Class-Path: nonexec.jar .
Main-Class: start
View Replies
View Related
Jun 15, 2014
Here is the problem:
Start with the tree.java program (Listing 8.1) and modify it to create a binary tree from a string of letters (like A, B, and so on) entered by the user. Each letter will be displayed in its own node. Construct the tree so that all the nodes that contain letters are leaves. Parent nodes can contain some non-letter symbol like +. Make sure that every parent node has exactly two children. Don’t worry if the tree is unbalanced. Note that this will not be a search tree; there’s no quick way to find a given node. You may end up with something like this:
It also says all Letters must be Leaves
Now I had it almost similar to that picture, but it wasn't right. So ive been working on it but im getting some very strange (and frustrating) output from the following methods.
Ive included the display method just for reference. The book told me to use it so I haven't edited it. I believe my main issue is with my (incomplete) insert() method. The output goes into an infinite loop despite having a return statement break the while loop when a character is inserted.
The way I see to solve the problem is just add a (+) whenever a new subtree needs to be created. Say I add A and B, then it first creates a subtree at the root with a (+) and afterwards lists A and B as its leaves. If I insert a C, it should be able to simply move to the right child of the root and deposit the C there.
package pkg4333_hwk1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
class Main {
[Code] ....
View Replies
View Related
Mar 9, 2015
I am trying to create a serversocket that send a binary in parts ie send 1024 bytes then wait for acknowledgement from the client before sending the next 1024. I am able to do it in udp but the client is tcp. This is my code so far
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
public class TestFtp {
[Code]....
I have not been able to send then receive acknowledgement before sending the next 1024 bytes.
View Replies
View Related
Mar 11, 2014
This code is for a GUI Java program that is supposed to convert back and fourth between two numbering systems. For example, binary to decimal or decimal to binary. I have created methods for some of the conversions however, I could successfully develop a method to convert from hex to binary. If you plan to run it to see what happens to the current method that I made please know that in the GUI the north end from left to right is as follows.
The textfield is for user entry of any type of data. The first combobox is for the user specifying to the program what type of data he or she entered. The second combobox is for the user to choose what he wants that data converted to. The button is to convert it. The south side has a textarea that gives out the results. Please note that only some of the conversions work so far. There are comments in the code to label which methods do what converisons. Need to find a method that will convert from hex to binary, what is wrong with the current method.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
[Code] .....
View Replies
View Related
Jan 8, 2014
While am trying to display a numerical digit from an equivalent binary value of integer data-type its working fine in JAVA 1.7 but not in JAVA 1.5
View Replies
View Related
Apr 5, 2014
I have written a code to get all the nodes below a current Node and it is working but I need to get it to look better if possible. To get the number of nodes below I have created an Array List, which I then go to the first Node below and add all the people to the Array list on the same level till I get to the end of the level, then I go down again until I cannot go down any more. Is there a way I can have my code without having to use an array List? I have put my code below. The brieff about the tree is that you have a parent and below the Parent are children who can have brothers and sisters next to them and after that they also have children below that. The method is trying to find the number of children below any given child
private LinkedList<Node> TempQueue = new LinkedList<Node>();
public int noOfYoungerChildren(Member p1){
Node tmp = find(p1);
return countYoungerChildren(tmp);
[code]....
View Replies
View Related
Mar 24, 2014
So, managed to get my Binary Search Tree to work properly:
package SystemandDesign.BinaryTree;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.io.ObjectInputStream;
import java.util.Scanner;
[Code] ....
No matter how many times I keep rewritting the testInsert method I get a chock full of errors.
View Replies
View Related
May 25, 2015
in Operator/Literals, it says "There is no literal representation for binary numbers in C, C++, or Java." seems "0b11001" could reprensent binary numbers?
int i = 0b100;
System.out.println(i);
the output should be 4.
View Replies
View Related
Jan 24, 2014
I have a unix program that simulates an accident evolving as a function of time and produces two files. I will focus on the first file before getting to the second. This first file has five output variables/vectors (velocity vs time, pressure vs time, etc), which are selected as part of the simulation input. These are the variables I have to put into Excel if I want to view the transient graphically. Where it gets tedious is that, if I want to view a different set of five variables, I have to rerun, extract, put these in Excel to plot. There can be lots of variables needed to properly characterize the accident.
The second file produced is a really large binary file. This file contains all the information that I'd need, precluding the need to rerun to view a different set of output variables. This is the file that seems tailor-made for a Java or something to be able to extract the information. That is, it seems like Java could be used to do this work: extract variable information from the large binary file. Eventually, I would like to plot it too and I know I could use Java there.
I think my steps are:
1) understand the format of my binary file
2) reconfigure the binary file for use with java (is this demuxing?)
3) learn java programming for this application: extracting information to produce something like a .csv file with time on the leftmost column and variable information populating the rest of the columns.
View Replies
View Related
Aug 2, 2014
I have made a Java Binary Encoder and Decoder program and, to date, this is the program I have spent the most time developing.
I have ran Alpha tests to check the functionality is correct and it appears to work well. However I am more interested in the quality of my code ,
The code can be found over at: [URL] ....
View Replies
View Related
May 6, 2014
I Write a Java program to parse a syntactically correct arithmetical expression and produce an equivalent Expression TREE. Remember, in an expression tree the terminal nodes are variables and constants, and the interior nodes are operators (such as +,-,*,/).
For instance the expression: (1 + 2) * 3 can be represented by the following tree:
INPUT Expression
(1 +2)*3
POSTORDER Expression
1 2 + 3 *
TREE [root=asd.reg.Node@56ddc58]
But when i Execute the program it Shows only Prefix and postfix .But the requered output is in inorder preorder and postorder so how to solve these error
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
import javax.swing.tree.TreeNode;
public class InToPost {
private static String str;
[Code] .....
View Replies
View Related
Sep 30, 2014
I am trying to write a program for converting positive binary inputs into hex. in the hex output the point (".")is missing.
Suppose my expected output is e7.6 , but i am getting e76
only the "." is missing.
here is my BinToHex class..
import java.io.*;
public class BinToHex {
double tempDec,fractionpart;
long longofintpart,templongDec;
String input ="11100111.011";
String hexOutput=null,tempDecString,hex = null;
static int i = 1;
[Code] ....
View Replies
View Related
Aug 8, 2014
I am working on a card game and for lack of better terms, have royally screwed up my files. I do still have an executable jar that I would like to go back to if possible and try to redo what I messed up. What I was able to do was to use WinRAR and get ?encrypted? class files. Something that is obviously not editable. How can I go about converting these back to editable java files, if possible?
View Replies
View Related
Feb 24, 2014
I am designing a program in-order convert Binary to Decimal values with added features:
Rejecting binary values longer than 32 bits
Prompting the user to make multiple entries after completing the binary to decimal conversion of their first entry. I was trying to code this in Nested For Loops, but I don't know if I've really done that.
Here is what i have so far.
public class BinaryToDecimal {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String binary;
int decimal=0b10, i, rem;
boolean isBinary = true;
[Code] ....
View Replies
View Related
Sep 30, 2014
I am trying to write a program for converting positive binary inputs into hex. in the hex output the point (".")is missing.
Suppose my expected output is e7.6 , but i am getting e76.
Only the "." is missing.
Here is my BinToHex class..
import java.io.*;
public class BinToHex {
double tempDec,fractionpart;
long longofintpart,templongDec;
String inpu ="11100111.011";
String hexOutput=null,tempDecString,hex = null;
[Code] .....
Here is how decimal fraction is converted into hex or here too...
View Replies
View Related
Nov 19, 2014
I am getting the following message when trying to print a JTable.
"Java(TM) platform SE binary has stopped working"
Here is the code:
try {
MessageFormat headerFormat = new MessageFormat("Page {0}");
MessageFormat footerFormat = new MessageFormat("- {0} -");
table.print(JTable.PrintMode.FIT_WIDTH, headerFormat, footerFormat);
} catch (java.awt.print.PrinterException pe) {
System.err.println("Error printing: " + pe.getMessage());
}
View Replies
View Related
Nov 21, 2014
So let's say i have an executable jar and inside that jar is a bunch of files. How do I access files within my jar?
Assuming like, a main class is currently running and that is what's inside the manifest file as the main class inside that executable jar..
View Replies
View Related
Nov 8, 2014
I am new to JAVA. I need to execute a program, based on the OS. If I am on Mac, the program is a .x and if It is on Windows the program is .exe. The program also requires a line of commands attached to it (i.e. relap5.(x) or (exe) -i inputFile -o outputFile -r restartFile -s stripFile
Here is my coding
String in = " -i ", tfIntdta.getText();
String rst = " -r ", tfRstplt.getText();
String out = " -o ", tfOutdta.getText();
String strp = " -s ", tfStpdta.getText();
if tfStpdta.contains(".csv")
String run = in, rst, out, strp;
else
String run = in. rst, out;
// I want to execute either a .x file or .exe file, depending on if I am
// running the app on windows or mac
run relap5.(x) or (exe) (string run goes here)
View Replies
View Related
Apr 15, 2015
I made a project in eclipse and exported it with libraries into a jar file.
Now I need to obfuscate that jar file so it can't be reverse engineered or anything.
I just need something basic. Just where I put the jar file as input and it will output another jar file that is obfuscated.
I looked at proguard but it looks complex for something like this. I don't want to be spending ages making config files or anything... What I should use?
View Replies
View Related
Feb 20, 2014
Embedding an executable .jar file on a webpage. I am not a programmer and we use Blackboard Publish to package our Blackboard sessions into a standalone executable .JAR file which gives the user the full Blackboard experience. We want to embed this file on our webpage, so I did some research and I understand I have to use a Japplet (?). I have tried putting the basic (J)applet code I found on the web (modified of course) onto the webpage (see code below) but I get a 'ClassNotFoundException' error. I don't have the ability to define the files that are in the .JAR created by Blackboard Publish. How I would go about embedding this file? I can look at the files within the .jar with Winzip but there seem to be loads of .class files and I am unclear which one my webpage is trying to find!
<APPLET CODEBASE="/Blackboard/" ARCHIVE="test.jar" CODE=test.class WIDTH=140 HEIGHT=45>
<(J)APPLET>
View Replies
View Related