Search Results

Search found 303 results on 13 pages for 'javac'.

Page 7/13 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Java Magazine????6? / Java Developer Newsletter

    - by sasa
    ??????????????????????9?26??Java Magazine????6??????????? ?6???????????????? ???????????????? ????? BlueJ??????????????????? Web????????????? ADAM BIEN??? HotSpot??? ??????JAVA????????????FORK/JOIN??????? javac??????? JavaFX 2??????????????????????·??????? ????????? ????????????????????????????? Oracle Berkeley DB Java Edition?Java API ConnectionPool.java????????? ?????????????????????????????????????????? ??????Java Developer Newsletter????????????Java????????????????????????????????????????????????????????????????????????????12?31?????????????1,000???Java??????Duke?????????????????????

    Read the article

  • How to compile jsoup through Ant?

    - by JackWM
    I tried to use Ant to compile the jsoup source. I can compile successfully, but cannot pass the test. Here is the process: jsoup version: 1.6.3 ; Ant version: 1.8.2 the source of jsoup is in the directory src/ I made a build file src/build.xml This file contains <project name="jsoup"> <target name="compile"> <mkdir dir="build/classes"/> <javac srcdir="src" destdir="build/classes" includeantruntime="false"/> </target> <target name="jar"> <mkdir dir="build/jar"/> <jar destfile="build/jar/jsoup.jar" basedir="build/classes"> <manifest> <attribute name="Main-Class" value="StateTrace"/> </manifest> </jar> </target> <target name="run"> <!--<java jar="build/jar/jsoup.jar" input="htmls/index.html" fork="true"/>--> <exec executable="java"> <arg value="-jar"/> <arg value="build/jar/jsoup.jar"/> <arg value="htmls/index.html"/> </exec> </target> </project> Note: 1. StateTrace.java is my own test program; 2. htmls/index.html is the input to StateTrace.java. Then I compile and run it with Ant: > ant compile > ant jar > ant run After this, I got err like: run: [exec] Exception in thread "main" java.lang.ExceptionInInitializerError [exec] at org.jsoup.nodes.Entities$EscapeMode.<clinit>(Unknown Source) [exec] at org.jsoup.nodes.Document$OutputSettings.<init>(Unknown Source) [exec] at org.jsoup.nodes.Document.<init>(Unknown Source) [exec] at org.jsoup.parser.TreeBuilder.initialiseParse(Unknown Source) [exec] at org.jsoup.parser.TreeBuilder.parse(Unknown Source) [exec] at org.jsoup.parser.HtmlTreeBuilder.parse(Unknown Source) [exec] at org.jsoup.parser.Parser.parse(Unknown Source) [exec] at org.jsoup.Jsoup.parse(Unknown Source) [exec] at StateTrace.main(Unknown Source) [exec] Caused by: java.lang.NullPointerException [exec] at java.util.Properties$LineReader.readLine(Properties.java:418) [exec] at java.util.Properties.load0(Properties.java:337) [exec] at java.util.Properties.load(Properties.java:325) [exec] at org.jsoup.nodes.Entities.loadEntities(Unknown Source) [exec] at org.jsoup.nodes.Entities.<clinit>(Unknown Source) [exec] ... 9 more [exec] Result: 1 BUILD SUCCESSFUL Total time: 0 seconds However, if I manually compiled all the java source, like javac src/org/jsoup/*.java src/org/jsoup/parser/*.java src/org/jsoup/examples/*.java src/org/jsoup/nodes/*.java src/org/jsoup/safety/*.java src/org/jsoup/select/*.java src/org/jsoup/helper/*.java I could compile successfully and pass my test. Any clue? Thanks!

    Read the article

  • Mouse wheel not scrolling in JDialog but working in JFrame

    - by Iulian Serbanoiu
    Hello, I'm facing a frustrating issue. I have an application where the scroll wheel doesn't work in a JDialog window (but works in a JFrame). Here's the code: import javax.swing.*; import java.awt.event.*; public class Failtest extends JFrame { public static void main(String[] args) { new Failtest(); } public Failtest() { super(); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setTitle("FRAME"); JScrollPane sp1 = new JScrollPane(getNewList()); add(sp1); setSize(150, 150); setVisible(true); JDialog d = new JDialog(this, false);// NOT WORKING //JDialog d = new JDialog((JFrame)null, false); // NOT WORKING //JDialog d = new JDialog((JDialog)null, false);// WORKING - WHY? d.setTitle("DIALOG"); d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); JScrollPane sp = new JScrollPane(getNewList()); d.add(sp); d.setSize(150, 150); d.setVisible(true); } public JList getNewList() { String objs[] = new String[30]; for(int i=0; i<objs.length; i++) { objs[i] = "Item "+i; } JList l = new JList(objs); return l; } } I found a solution which is present as a comment in the java code - the constructor receiving a (JDialog)null parameter. Can someone enlighten me? My opinion is that this is a java bug. Tested on Windows XP-SP3 with 1 JDK and 2 JREs: D:\Program Files\Java\jdk1.6.0_17\bin>javac -version javac 1.6.0_17 D:\Program Files\Java\jdk1.6.0_17\bin>java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) D:\Program Files\Java\jdk1.6.0_17\bin>cd .. D:\Program Files\Java\jdk1.6.0_17>java -version java version "1.6.0_18" Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing) Thank you in advance, Iulian Serbanoiu PS: The problem is not new - the code is taken from a forum (here) where this problem was also mentioned - but no solutions to it (yet) LATER EDIT: The problem persists with jre/jdk_1.6.0_10, 1.6.0_16 also LATER EDIT 2: Back home, tested on linux (Ubuntu - lucid/lynx) - both with openjdk and sun-java from distribution repo and it works (I used the .class file compiled on Windows) !!! - so I believe I'm facing a JRE bug that happens on some Windows configurations.

    Read the article

  • Java: how to use 3rd-party library?

    - by HH
    $ cat MultiTest.java import com.*; // CODE $ javac Code.java MultiTest.java:1: package com does not exist import com.*; ^ Google Collections Com-dir in the dir where the MultiTest.java -file is located.

    Read the article

  • Mouse wheel not scrolling in JDialog

    - by Iulian Serbanoiu
    Hello, I'm facing a frustrating issue. I have an application where the scroll wheel doesn't work in a JDialog class. Here's the code: import javax.swing.*; import java.awt.event.*; public class Failtest extends JFrame { public static void main(String[] args) { new Failtest(); } public Failtest() { super(); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setTitle("FRAME"); JScrollPane sp1 = new JScrollPane(getNewList()); add(sp1); setSize(150, 150); setVisible(true); JDialog d = new JDialog(this, false);// NOT WORKING //JDialog d = new JDialog((JFrame)null, false); // NOT WORKING //JDialog d = new JDialog((JDialog)null, false);// WORKING - WHY? d.setTitle("DIALOG"); d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); JScrollPane sp = new JScrollPane(getNewList()); d.add(sp); d.setSize(150, 150); d.setVisible(true); } public JList getNewList() { String objs[] = new String[30]; for(int i=0; i<objs.length; i++) { objs[i] = "Item "+i; } JList l = new JList(objs); return l; } } I found a solution which is present as a comment in the java code - the constructor receiving a (JDialog)null parameter. Can someone enlighten me? My opinion is that this is a java bug. Tested on Windows XP-SP3 with 1 JDK and 2 JREs: D:\Program Files\Java\jdk1.6.0_17\bin>javac -version javac 1.6.0_17 D:\Program Files\Java\jdk1.6.0_17\bin>java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) D:\Program Files\Java\jdk1.6.0_17\bin>cd .. D:\Program Files\Java\jdk1.6.0_17>java -version java version "1.6.0_18" Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing) Thank you in advance, Iulian Serbanoiu PS: The problem is not new - the code is taken from a forum (here) where this problem was also mentioned - but no solutions to it (yet)

    Read the article

  • Question on compiling java program

    - by Hulk
    I am a newbie to java, i have a query, /home/bob/java/jdk1.5.0_06/bin/javac /home/bob/output/a.java In the above when the program is compiled how to generate the classfile in /home/bob/class. Also how should the environment variables set for the following i.e, JAVA_HOME,CLASSPATH,JAVAPATH Thanks..

    Read the article

  • Get rid of redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean> warning from CXF-generate

    - by Binary255
    I generate some code using CXF from a WSDL-file. When compiling the code with version "1.6.0_16" with the flag -Xlint I get the following warning: warning: [cast] redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean> [javac] this.r = ((JAXBElement<Boolean> ) value); What does the warning mean, should I be worried? As I have generated and not written the code, what can I do to get rid of this specific warning?

    Read the article

  • Java: using foreach over strings from arrayList does not print anything

    - by HH
    $ javac ArrayListTest.java $ java ArrayListTest $ cat ArrayListTest.java import java.io.*; import java.util.*; public class ArrayListTest{ public static void main(String[] args) { try { String hello ="oeoaseu oeu hsoae sthoaust hoaeut hoasntu"; ArrayList<String> appendMe = null; for(String s : hello.split(" ")) appendMe.add(s+" "); for(String s : appendMe) System.out.println(s); //WHY DOES IT NOT PRINT? }catch(Exception e){ } } }

    Read the article

  • Java: how to access assignments in try-catch -loop?

    - by HH
    $ javac TestInit2.java TestInit2.java:13: variable unknown might not have been initialized System.out.println(unknown); ^ 1 error Code import java.util.*; import java.io.*; public class TestInit2 { public static void main(String[] args){ String unknown; try{ unknown="cannot see me, why?"; }catch(Exception e){ e.printStackTrace(); } System.out.println(unknown); } }

    Read the article

  • Classnotfound exception while running hadoop

    - by vana
    Hi, I am new to hadoop. I have a file Wordcount.java which refers hadoop.jar and stanford-parser.jar I am running the following commnad javac -classpath .:hadoop-0.20.1-core.jar:stanford-parser.jar -d ep WordCount.java jar cvf ep.jar -C ep . bin/hadoop jar ep.jar WordCount gutenburg gutenburg1 After executing i am getting the following error: lang.ClassNotFoundException: edu.stanford.nlp.parser.lexparser.LexicalizedParser The class is in stanford-parser.jar ... What can be the possible problem? Thanks

    Read the article

  • jcuda library usage problem

    - by user513164
    hi m very new to java and Linux i have a code which is taken from examples of jcuda.the code is following import jcuda.CUDA; import jcuda.driver.CUdevprop; import jcuda.driver.types.CUdevice; public class EnumDevices { public static void main(String args[]) { //Init CUDA Driver CUDA cuda = new CUDA(true); int count = cuda.getDeviceCount(); System.out.println("Total number of devices: " + count); for (int i = 0; i < count; i++) { CUdevice dev = cuda.getDevice(i); String name = cuda.getDeviceName(dev); System.out.println("Name: " + name); int version[] = cuda.getDeviceComputeCapability(dev); System.out.println("Version: " + String.format("%d.%d", version[0], version[1])); CUdevprop prop = cuda.getDeviceProperties(dev); System.out.println("Clock rate: " + prop.clockRate + " MHz"); System.out.println("Threads per block: " + prop.maxThreadsPerBlock); } } } I'm using Ubuntu as my operating system i compiled it with following command 1:-javac -cp /home/manish.yadav/Desktop/JCuda-All-0.3.2-bin-linux-x86_64 EnumDevices i got following error error: Class names, 'EnumDevices', are only accepted if annotation processing is explicitly requested 1 error i don't know what is the meaning of this error.what should i do to compile the program than i changed the compiling option which is javac -cp /home/manish.yadav/Desktop/JCuda-All-0.3.2-bin-linux-x86_64 EnumDevices.java than i got following error EnumDevices.java:36: clockRate is not public in jcuda.driver.CUdevprop; cannot be accessed from outside package System.out.println("Clock rate: " + prop.clockRate + " MHz"); ^ EnumDevices.java:37: maxThreadsPerBlock is not public in jcuda.driver.CUdevprop; cannot be accessed from outside package System.out.println("Threads per block: " + prop.maxThreadsPerBlock); ^ 2 errors Now I'm completely confused i don't know what to do? how to compile this program ? how to install the jcuda package or how to use it ? how to use package which have only jar files and .so files and the jar files don't having manifest file ? please help me

    Read the article

  • How do I run my application as superuser from Eclipse?

    - by Ronald
    I'm running in to an error when I try to run my server application from Eclipse. The error is java.net.BindException: Permission denied. I think this is because I am using port 443 to set up an SSL connection. I can get around this problem if I run my code on the command line using javac and sudo. Is there a way to set up Eclipse so that when I hit the run button, my application is executed with sudo?

    Read the article

  • Java: How can a constructor return a value?

    - by HH
    $ cat Const.java public class Const { String Const(String hello) { return hello; } public static void main(String[] args) { System.out.println(new Const("Hello!")); } } $ javac Const.java Const.java:7: cannot find symbol symbol : constructor Const(java.lang.String) location: class Const System.out.println(new Const("Hello!")); ^ 1 error

    Read the article

  • How do I add a .jar file to the compilation of .java files

    - by Christopher Schroeder
    My makefile is below Also, I would appreciate it if you told me how to move my .class files to ../bin/ JFLAGS = -cp JAR = "RSBot*.jar" JC = javac .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $(JAR) $*.java CLASSES = \ src/Banker.java \ src/Eater.java \ src/Fighter.java \ src/grotgui.java \ src/InventTab.java \ src/Looter.java \ src/Potter.java \ src/W8babyGrotworm.java \ src/Walker.java default: classes classes: $(CLASSES:.java=.class) clean: $(RM) *.class

    Read the article

  • Execute a jar file using Ant

    - by geetha
    I am trying to create a runnable jar file from java classes using ant. The java classes use external jars. When I execute the build.xml its showing class not found exception while running the java program. Its compiling fine. Part of My source code: <path id="project-libpath"> <fileset dir="${lib.dir}"> <include name="*.jar"/> </fileset> </path> <path id="project-classpath"> <fileset dir="C:/xmldecode/lib"> <include name="*.jar"/> </fileset> </path> <target name="compile" depends="prepare"> <javac srcdir="${src.dir}" destdir="${classes.dir}"> <classpath refid="project-classpath"/> </javac> </target> <target name="jar" depends="compile"> <copy todir="${classes.dir}"> <fileset dir="C:/xmldecode/lib"/> </copy> <pathconvert property="mf.classpath" pathsep=";"> <path refid="project-classpath" /> <flattenmapper /> </pathconvert> <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}"> <manifest> <attribute name="Main-Class" value="${main-class}"/> <attribute name="Class-Path" value="${mf.classpath}"/> </manifest> </jar> </target> <target name="run" depends="jar"> <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"> </java>

    Read the article

  • Java: initialization problem, cannot print "assigned" values from arrayList

    - by HH
    $ javac ArrayListTest.java $ java ArrayListTest $ cat ArrayListTest.java import java.io.*; import java.util.*; public class ArrayListTest{ public static void main(String[] args) { try { String hello ="oeoaseu oeu hsoae sthoaust hoaeut hoasntu"; ArrayList<String> appendMe = null; for(String s : hello.split(" ")) appendMe.add(s+" "); for(String s : appendMe) System.out.println(s); //WHY DOES IT NOT PRINT? }catch(Exception e){ } } }

    Read the article

  • Compiling servlets for tomcat

    - by L4N0
    Hello I am trying to modify one of the default files that comes with tomcat SessionExample.java, and trying to compile it but I get an error. javac -classpath "E:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.18\lib\servlet-api.jar" SessionExample.java Gives me this error SessionExample.java:26: package util does not exist import util.HTMLFilter; ^ SessionExample.java:90: cannot find symbol symbol : variable HTMLFilter location: class SessionExample out.println(HTMLFilter.filter(name) + " = " ^ SessionExample.java:91: cannot find symbol symbol : variable HTMLFilter location: class SessionExample + HTMLFilter.filter(value) + ""); ^ 3 errors Thank you

    Read the article

  • converting bash script to .bat

    - by Robokop
    #!/bin/bash function usage(){ cat <<EOF USAGE: $0 [strategylist] valid strategies are: ALLD ALLC TitForTat JOSS WeightedRandom Tester EOF exit 1 } [ -z $1 ] && usage javac robsAgents/*.java robsAgents/behaviours/*.java agentlist='leader:robsAgents.TournamentLeader' agentlist=$agentlist";$1:robsAgents.Contestant" while shift; do agentlist=$agentlist";$1:robsAgents.Contestant" done java jade.Boot -gui -host 127.0.0.1 "$agentlist" i have above bash script and have no access to a windows computer and i need to convert it to a .bat file, but don't even know how to do the shift and argument parsing

    Read the article

  • About import statement in Java

    - by user198729
    test.java: import javax.media; Which directories are javax.media searched from? I suppose those in CLASSPATH specified by javac -cp will of course be searched. But will it also search in the directory where test.java locates? And are there any other possible places that will be searched?

    Read the article

  • Echo target description in Ant

    - by kunjaan
    <target name="compile" description="Compile the File"> <echo>Compile the File </echo> <mkdir dir="${compilation-dir}" /> <javac srcdir="." classpath="another2" destdir="${compilation-dir}" /> </target> I want to echo the description of the target. Is there a better way of doing this other than duplicating it?

    Read the article

  • Get the File name with out file extension in VIM function.

    - by tr-sugumar
    I want to get the fine name with out the file extension in VIM. I wrote the following functions in my .vimrc file for compile and run the Java program. :function! JAVA_RUN() :!javac %^M :endfunction map <F3> :execute JAVA_RUN()<CR> :source $HOME/.vimrc<CR> In side the function how can I get the file name with out the extension.

    Read the article

  • Get the File name without file extension in VIM function.

    - by tr-sugumar
    I want to get the fine name without the file extension in VIM. I wrote the following functions in my .vimrc file for compile and run the Java program. :function! JAVA_RUN() :!javac %^M :endfunction map <F3> :execute JAVA_RUN()<CR> :source $HOME/.vimrc<CR> In side the function how can I get the file name with out the extension.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >