snipt

Ctrl+h for KB shortcuts

Java

Abrir ficheiro atraves com Java

Desktop desktop =Desktop.getDesktop();
desktop.open(new File("e:\\teste.txt"));
https://snipt.net/embed/db67bfaaf0dda8448a180d874066b7ce/
/raw/db67bfaaf0dda8448a180d874066b7ce/
db67bfaaf0dda8448a180d874066b7ce
java
Java
2
2019-06-25T20:12:10
True
False
False
/api/public/snipt/798/
abrir-ficheiro-atraves-com-java
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="n">Desktop</span> <span class="n">desktop</span> <span class="o">=</span><span class="n">Desktop</span><span class="o">.</span><span class="na">getDesktop</span><span class="o">();</span> </span><span id="L-2"><a name="L-2"></a><span class="n">desktop</span><span class="o">.</span><span class="na">open</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;e:\\teste.txt&quot;</span><span class="o">));</span> </span></pre></div> </td></tr></table>
file, java, open

Java Server Page

fn:length

${fn:length(actionBean.results)}
https://snipt.net/embed/f1486748909e1e964ffb4229569129a0/
/raw/f1486748909e1e964ffb4229569129a0/
f1486748909e1e964ffb4229569129a0
jsp
Java Server Page
1
2019-06-23T12:30:14
True
False
False
/api/public/snipt/788/
fnlength
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>${fn:length(actionBean.results)} </span></pre></div> </td></tr></table>
java, jstl